a = 1755716071599 N = 236038564943567983056828121309828109017 Px, Py = b = ZZ((Py**2 - Px**3 - a * Px) % N) e = (b<<42) + a
enc1 = 98662590652068949920571979585725979127266112216583776160769090971169664292493813021843624362593669574513220457664819153878956311077379392531742253343961645534972639309537402874636739745717765969720117162780620981639015788423324884640935466801234207019510919768602974162878323777374364290185048275714332671356 enc2 = 58738699705013897273174837829098879580829898980458718341881900446701910685043213698485036350888862454440118347362218485065377354137391792039111639199258042591959084091242821874819864955504791788260187064338245516327147327866373690756260239728218244294166383516151782123688633986853602732137707507845681977204 NN = 149794788177729409820185150543033616327574456754306207341321223589733698623477041345453230785413920341465642754285280273761269552897080096162195035057667200692677841848045965505750839903359478511509753781737513122660495056746669041957643882516287304836822410136985711091802722010788615177574143908444311475347 M = matrix(ZZ, [ [2**256, enc1, enc2], [0, NN, 0], [0, 0, NN] ]) L = M.LLL() hd, ld = L[0][1], L[0][2] d = (hd<<512) + ld
n = 236038564943567983056828121309828109017 print(pow(2, e*d, n) == 2)
from Crypto.Util.number import * from random import randint whileTrue: k = e * d - 1 g = randint(2, n - 1) whileTrue: x = pow(g, k, n) if x > 1and n > GCD(x - 1, n) > 1: p = GCD(x - 1, n) q = n // p print(f"{p = }\n{q = }") print(p * q == n) for i inrange(8): print(long_to_bytes(p >> i)) print(long_to_bytes(q >> i)) exit() if k % 2:break k //= 2 # flag{e89f47939d12434cb201080d8b240774}
targetstart = input('[+] Enter the target hash start fragment: ') targetend = input('[+] Enter the target hash end fragment: ') print('[+] Checking all Chinese areacode') areacodelist = ['139', '138', '137', '136', '135', '134', '159', '158','157','150','151', '152', '188', '187', '182', '183', '184', '178'] phonematch = []
for areacode in areacodelist: line = '0' print('[+] Searching area code ' + areacode + ' for target...') whileint(line) < 100000000: targetphone = '86' + str(areacode) + str(line).zfill(8) targettest = hashlib.sha256(targetphone.encode()) starthashcheck = targettest.hexdigest() [0:5] endhashcheck = targettest.hexdigest() [-5:] if starthashcheck == targetstart.lower() and endhashcheck ==targetend.lower(): phonematch.append(targetphone) print(targetphone + ' matches hash fragments. Stillchecking...') line = int(line) + 1 whileint(line) == 100000000: break if phonematch: print('Your target\'s phone number may be:') formatchin phonematch: print(match) else: print('Target phone number not found in this area code set. Targetphone may use another country code.')
n = int(input()) for _ inrange(n): d, rawdata = input().strip().split() data = base64.b64decode(rawdata.encode()) now = '' for i inrange(0, len(data), 16): if d == '1': now += ' ' * 8 now += hex(i)[2:].zfill(8) + ' ' * 2 for j inrange(16): if j == 8: now += ' ' if i + j < len(data): now += hex(data[i + j])[2:].zfill(2) + ' ' else: now += ' ' * 3 now += ' ' * 2 for j inrange(16): if j == 8: now += ' ' if i + j < len(data): tmp = data[i + j] if32 <= tmp <= 126: now += chr(tmp) else: now += '.' else: now += ' ' now += '\n' print(now[:-1])