import sys import argparse import grbrute # http://www.pointerpointer.com/gridPositions.json class Pp_url: def __init__(self, image, x, y, max_x=2000, max_y=2000): self.base_url = "http://www.pointerpointer.com/images" self.image = image self.x = x self.y = y self.max_x = max_x self.max_y = max_y print ">>> Looking for image %d <<<" % image print ">>>> starting x=%d y=%d <<<<" % (x, y) def __iter__(self): return self def next(self): res = "%s/N%04d_%d_%d.jpg" % (self.base_url, self.image, self.x, self.y) self.y += 1 if self.y > self.max_y: self.x += 1 self.y = 0 if self.x > self.max_x: raise StopIteration return res def cb_response(res): global found if not found: print "[-] %s : %d" % (res.url, res.status_code) if res.status_code != 404: found = res.url return False return True parser = argparse.ArgumentParser(description='pphidden_async', epilog="Example: %s 73 0 0" % sys.argv[0]) parser.add_argument('image', action="store", type=int, help="Image number") parser.add_argument('start_x', action="store", type=int, help="Start at coordinate X=") parser.add_argument('start_y', action="store", type=int, help="Start at coordinate Y=") parser.add_argument('-v', action="store_true", dest="verbose", default=False, help="verbose") args = parser.parse_args() found = None url_iter = Pp_url(args.image, args.start_x, args.start_y) grbrute.Grbrute(url_iter, cb_response, verbose=args.verbose) if found is False: print "[*] not found" sys.exit(1) print "[*] found: %s" % found