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 binascii, sys, random, asn1 | |
from fractions import gcd | |
def extended_gcd(aa, bb): | |
lastremainder, remainder = abs(aa), abs(bb) | |
x, lastx, y, lasty = 0, 1, 1, 0 | |
while remainder: | |
lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder) | |
x, lastx = lastx - quotient*x, x | |
y, lasty = lasty - quotient*y, y |
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 struct import unpack as up | |
import sys, os, hashlib | |
dirs, files = None, None | |
def read_at(fp, off, len): | |
fp.seek(off) | |
return fp.read(len) | |
def read_u8(fp, off): |
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 struct import unpack as up | |
import sys, os | |
dirs, files = None, None | |
def read_at(fp, off, len): | |
fp.seek(off) | |
return fp.read(len) | |
def read_u8(fp, off): |
NewerOlder