mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-06-29 00:57:08 -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:
|
if 'None' in ans:
|
||||||
print "Found it!"
|
print "Found it!"
|
||||||
return mid + 1
|
return mid + 1
|
||||||
elif 'Your secret' in ans:
|
elif 'Your secret is' in ans:
|
||||||
return bs_paillier(lo, mid-1, s)
|
print "too high"
|
||||||
|
return bs_paillier(mid, hi, s)
|
||||||
else:
|
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)
|
s.recv(4096)
|
||||||
|
|
||||||
# start binary search
|
# start binary search
|
||||||
hi = pow(11,307)
|
hi, lo = 11**307, 10**307
|
||||||
lo = pow(10,307)
|
|
||||||
mod = bs_paillier(lo, hi, s)
|
mod = bs_paillier(lo, hi, s)
|
||||||
print mod
|
print mod
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
All in one big bag.
|
All in one big bag.
|
||||||
|
|
||||||
More [here].
|
|
||||||
|
|
||||||
|
|
||||||
[here]: https://gist.github.com/bt3gl/8e3aa9538d6122f74274
|
[here]: https://gist.github.com/bt3gl/8e3aa9538d6122f74274
|
||||||
|
|
||||||

|

|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue