This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import itertools | |
from hashlib import * | |
import string | |
import collections | |
compare = lambda x, y: collections.Counter(x) == collections.Counter(y) | |
def sum_to_n(n): | |
sum = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import * | |
import random | |
import itertools | |
h = 'f528a6ab914c1ecf856a1d93103948fe' | |
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ{}' | |
cipher = 'LMIG}RPEDOEEWKJIQIWKJWMNDTSR}TFVUFWYOCBAJBQ' | |
format_flag = 'SECCON{' | |
def repeat(a,len_b): | |
return (a*(int(len_b/len(a))+1))[:len_b] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from libnum import * | |
to_int = lambda string : int(string,16) | |
n = 1552518092300708935148979488462502555256886017116696611139052038026050952686376886330878408828646477971459063658923221258297866648143023058142446317581796810373905913084934869211153276980011573717416472395713363686571638755823503877 | |
BS = 32 | |
p = 39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915641338868201294899 | |
q = 39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806628012398823 | |
phi = (p-1)*(q-1) | |
e = 3 | |
d = modular.invmod(e,phi) | |
f = open('cipher.txt').read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import telnetlib | |
from hashlib import * | |
from Crypto.Cipher import DES | |
host = 'localhost' | |
port = 33334 | |
unpad = lambda s : s[0:-ord(s[-1])] | |
BS = DES.block_size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
import string | |
import time | |
from base64 import * | |
r = remote('localhost',33333) | |
def xor(s1,s2): | |
return ''.join([chr(ord(a) ^ ord(b)) for a,b in zip(s1,s2)]) | |
def repeat(string, len_cipher): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import string | |
import random | |
from hashlib import sha256 | |
from urlparse import parse_qsl | |
money = random.randint(1000000, 5000000) | |
signkey = ''.join([random.choice(string.letters+string.digits) for _ in xrange(random.randint(8,32))]) | |
items = [ | |
('Samsung Galaxy S9', 19990000), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
from telnetlib import * | |
from random import randint | |
host,port = '13.251.110.215',10001 | |
# len_secret 8-32 | |
def hash_length_ex(data,len_secret,append,sign,_format): | |
res_sign = '' | |
res_string = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template, request, make_response, redirect | |
import random | |
import string | |
from base64 import b64decode, b64encode | |
from Crypto.Cipher import AES | |
from hashlib import md5 | |
from Crypto.Hash import HMAC | |
BLOCK_SIZE = 16 | |
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * chr(BLOCK_SIZE - len(s) % BLOCK_SIZE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import string | |
from base64 import * | |
from Crypto.Hash import HMAC | |
alpha = string.ascii_letters + string.digits | |
BLOCK_SIZE = 16 | |
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * chr(BLOCK_SIZE - len(s) % BLOCK_SIZE) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from telnetlib import * | |
import string | |
from base64 import * | |
alpha = string.ascii_letters + string.digits | |
host,port = 'ec2-13-251-81-16.ap-southeast-1.compute.amazonaws.com',3333 | |
c = 'OEEBNFHAIECBPEFBLCBHPFFAIBCENLHOLFBANOHLIKCPLIBNOPEKKHACNOHLOHECILCOMDGGJGDDMCGHPGFDLBBEPFFALIBNPFFALEBBMAGFJBDEMAGFIJCMNOHLKEABONEIJMDJKPAKJIDNOOELILCOOIENINCINIHN' | |
text = '' |
OlderNewer