Skip to content

Instantly share code, notes, and snippets.

View blindFS's full-sized avatar
🤔
I may be slow to respond.

zc he blindFS

🤔
I may be slow to respond.
View GitHub Profile
import gmpy2
from gmpy2 import mpz
# N1 = mpz(179769313486231590772930519078902473361797697894230657273430081157732
# 6758055056206869853794492129829595855013875371640157101398586478337786
# 0692558349754108519659161512805757594075263500747593528871082364994994
# 0771895617054361149474865046711015101563940680527540071584560878577663
# 743040086340742855278549092581)
#
# N2 = mpz(64845584280807166966282426534677227872634372070697626306043907037879
import gmpy2
from gmpy2 import mpz
p = mpz(13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084171)
g = mpz(11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568)
h = mpz(3239475104050450443565264378728065788649097520952449527834792452971981976143292558073856937958553180532878928001494706097394108577585732452307673444020333)
B = 2**20
gi = gmpy2.invert(g, p)
import urllib2
import copy
TARGET = 'http://crypto-class.appspot.com/po?er='
cipher_text = 'f20bdba6ff29eed7b046d1df9fb7000058b1ffb4210a580f748b4ac714c001bd4a61044426fb515dad3f21f18aa577c0bdf302936266926ff37dbf7035d5eeb4'.decode('hex')
IV = cipher_text[:16]
c_blocks = [IV, cipher_text[16:32], cipher_text[32:48], cipher_text[48:64]]
m_blocks = [[0]*16, [0]*16, [0]*16]
from Crypto.Hash import SHA256
import os
def myhash():
file = open('./test.mp4', 'rb')
size = os.path.getsize('./test.mp4')
block_num = size/1024
file.seek(block_num*1024)
from Crypto.Cipher import AES
from Crypto.Util import Counter
def decrp():
key = '36f18357be4dbd77f050515c73fcf9f2'.decode('hex')
message = '69dda8455c7dd4254bf353b773304eec0ec7702330098ce7f7520d1cbbb20fc388d1b0adb5054dbd7370849dbf0b88d393f252e764f1f5f7ad97ef79d59ce29f5f51eeca32eabedd9afa9329'
iv = message[:32]
iv = int(iv, 16)
ctr = Counter.new(nbits=128, initial_value=iv)
[Unit]
Description=OpenVPN connection to %i
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid
PIDFile=/run/openvpn@%i.pid
[Install]
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.15.5 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <stdlib.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
# Generated by resolvconf
domain ustc.edu.cn
nameserver 202.38.64.1
google_hk = 218.253.0.159|218.253.0.154|218.253.0.185|218.253.0.166|218.253.0.87|218.253.0.144|218.253.0.84|218.253.0.85|218.253.0.148|218.189.25.181|218.253.0.82|218.189.25.174|218.189.25.173|218.253.0.90|218.253.0.81|218.253.0.170|218.253.0.165|218.253.0.176|218.189.25.167|218.253.0.174|218.189.25.166|218.253.0.177|218.189.25.152|218.253.0.91|218.189.25.159|218.189.25.160
google_cn = 218.253.0.159|218.253.0.154|218.253.0.185|218.253.0.166|218.253.0.87|218.253.0.144|218.253.0.84|218.253.0.85|218.253.0.148|218.189.25.181|218.253.0.82|218.189.25.174|218.189.25.173|218.253.0.90|218.253.0.81|218.253.0.170|218.253.0.165|218.253.0.176|218.189.25.167|218.253.0.174|218.189.25.166|218.253.0.177|218.189.25.152|218.253.0.91|218.189.25.159|218.189.25.160