mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-04 15:55:12 -04:00
some small fixes
This commit is contained in:
parent
205c732ea0
commit
c351a52951
2 changed files with 7 additions and 8 deletions
|
@ -24,10 +24,12 @@ def bs_paillier(lo, hi, s):
|
|||
if 'None' in ans:
|
||||
print "Found it!"
|
||||
return mid + 1
|
||||
elif 'Your secret' in ans:
|
||||
return bs_paillier(lo, mid-1, s)
|
||||
elif 'Your secret is' in ans:
|
||||
print "too high"
|
||||
return bs_paillier(mid, hi, s)
|
||||
else:
|
||||
return bs_paillier(mid+1, hi, s)
|
||||
print "too low"
|
||||
return bs_paillier(lo, mid, s)
|
||||
|
||||
|
||||
|
||||
|
@ -42,8 +44,7 @@ def get_mod_paillier():
|
|||
s.recv(4096)
|
||||
|
||||
# start binary search
|
||||
hi = pow(11,307)
|
||||
lo = pow(10,307)
|
||||
hi, lo = 11**307, 10**307
|
||||
mod = bs_paillier(lo, hi, s)
|
||||
print mod
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue