This file contains hidden or 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 | |
def main(): | |
img = Image.open("for1.png") | |
pixels = img.load() | |
h = img.size[0] | |
w = img.size[1] | |
out1 = '' | |
for row in range(h): | |
for col in range(w): |
This file contains hidden or 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
# uncompyle6 version 3.2.4 | |
# Python bytecode 2.7 (62211) | |
# Decompiled from: Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) | |
# [GCC 7.3.0] | |
# Embedded file name: PyLock.py | |
import sys, os | |
from itertools import cycle, izip | |
import base64 | |
class XorLock: |
This file contains hidden or 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 Crypto.Util import number | |
from Crypto.PublicKey import RSA | |
from hashlib import sha1 | |
from os import urandom as rand | |
import gmpy2 | |
class RSA_key: | |
def __init__(self, magic, size=2048): | |
self._key = RSA.generate(size) | |
self._magic = magic |
This file contains hidden or 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 struct | |
import os | |
class Tictactoe: | |
def __init__(self, key): | |
self.delta = 0x9E3779B9 | |
self.mask = 0xffffffff | |
self.rounds = 64 | |
self.block_size = 8 #char | |
self.key = struct.unpack('4I', key) |
This file contains hidden or 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
function name: (null) | |
number of ops: 39 | |
compiled vars: !0 = $flag, !1 = $_box, !2 = $magic | |
line #* E I O op fetch ext return operands | |
------------------------------------------------------------------------------------- | |
3 0 E > ASSIGN !0, 'FLAG+HERE' | |
5 1 NOP | |
13 2 NOP | |
21 3 NOP | |
33 4 NOP |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import sys, hashlib | |
def decrypt_password(user, pass_enc): | |
key = hashlib.md5(user + b"283i4jfkai3389").digest() | |
passw = "" | |
for i in range(0, len(pass_enc)): | |
passw += chr(pass_enc[i] ^ key[i % len(key)]) | |
This file contains hidden or 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
#!/usr/bin/env python2 | |
from gmpy2 import powmod, is_prime | |
from flag import FLAG | |
import sys | |
from hashlib import sha256 | |
from os import urandom | |
import sys | |
def write_to_file(num): |
This file contains hidden or 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
#!/usr/bin/python2 | |
from Crypto.Cipher import AES | |
import hmac, hashlib | |
import os | |
import sys | |
menu = """Choose one: | |
1. encrypt data | |
2. decrypt data | |
3. quit |
This file contains hidden or 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 sys, os | |
def strxor(a,b): | |
return ''.join([chr(ord(x)^ord(y)) for (x,y) in zip(a,b)]) | |
records = '''I do nothing. | |
I'm a chat bot. | |
I'm from Vietnam. | |
My name is ChatBot. |
This file contains hidden or 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 random import randint | |
from sys import argv, stdout | |
from fastecdsa.curve import P256 | |
from fastecdsa.point import Point | |
from mathutil import p256_mod_sqrt, mod_inv | |
def gen_point(): | |
P = P256.G | |
d = randint(2, P256.q) | |
e = mod_inv(d, P256.q) |