From becc00d77c3f6c076d16df162da7a62eb3a798ef Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Tue, 16 Apr 2013 00:36:02 +0200 Subject: pphidden: reuse same TCP connection, and don't sleep --- toys/pphidden.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'toys') 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) -- cgit v1.2.3-59-g8ed1b