diff options
author | Laurent Ghigonis <laurent@p1sec.com> | 2013-04-16 00:36:02 +0200 |
---|---|---|
committer | Laurent Ghigonis <laurent@p1sec.com> | 2013-04-16 00:36:02 +0200 |
commit | becc00d77c3f6c076d16df162da7a62eb3a798ef (patch) | |
tree | 437425e38a7b6dc571aca650e38b13930b46d424 /toys | |
parent | Merge branch 'master' of zx2c4.com:laurent-tools (diff) | |
download | laurent-tools-becc00d77c3f6c076d16df162da7a62eb3a798ef.tar.xz laurent-tools-becc00d77c3f6c076d16df162da7a62eb3a798ef.zip |
pphidden: reuse same TCP connection, and don't sleep
Diffstat (limited to 'toys')
-rw-r--r-- | toys/pphidden.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/toys/pphidden.py b/toys/pphidden.py index 14419aa..cef18e2 100644 --- a/toys/pphidden.py +++ b/toys/pphidden.py @@ -13,15 +13,17 @@ sy = int(sys.argv[3]) print ">>> Looking for image %d <<<" % image print ">>>> starting x=%d y=%d <<<<" % (sx, sy) +s = requests.Session() + for x in range(sx, 2000): for y in range(sy, 2000): url = "%s/N%04d_%d_%d.jpg" % (BASE_URL, image, x, y) sys.stdout.write("[-] %s: " % url) sys.stdout.flush() - r = requests.get(url) + r = s.get(url) print r.status_code if r.status_code != 404: print "[*] found !" sys.exit(0) - time.sleep(0.2) + # time.sleep(0.2) sys.exit(1) |