示例#1
0
 def remote_captcha(self, captcha, proxy):
     """
     Get remote captcha
     """
     if proxy:
         self.ignoreproxy = 0
     self.optionCurl = CIntruderCurl(captcha, self.ignoreproxy, proxy)
     buf = self.optionCurl.request()
     if buf != "exit":
         m = hashlib.md5()
         m.update(captcha)
         c = "%s.gif" % (m.hexdigest())
         h = "inputs/" + c
         f = open(h, 'wb')
         f.write(buf.getvalue())
         f.close
         buf.close
         return h
     else:
         return  #sys.exit(2)
示例#2
0
文件: main.py 项目: zumb08/cintruder
 def track_captcha(self, captcha, proxy, num_tracks):
     """
     This technique is useful to create a dictionary of 'session based' captchas
     """
     options = self.options
     urlp = urlparse(captcha)
     self.domain = urlp.hostname
     if not os.path.exists("inputs/%s" % (self.domain)):
         os.mkdir("inputs/%s" % (self.domain))
     if proxy:
         self.ignoreproxy = 0
     buf = ""
     i = 0
     while i < int(num_tracks) and buf != "exit":
         self.optionCurl = CIntruderCurl(captcha, self.ignoreproxy, proxy)
         buf = self.optionCurl.request()
         if options.verbose:
             print("\n[-]Connection data:")
             out = self.optionCurl.print_options()
             print('-' * 45)
         if buf != "exit":
             m = hashlib.md5()
             try:
                 m.update(
                     captcha.encode('utf-8') + str(datetime.datetime.now()))
             except:
                 m.update(str(datetime.datetime.now()).encode('utf-8'))
             h = "inputs/%s/%s.gif" % (self.domain, m.hexdigest())
             f = open(h, 'wb')
             f.write(buf.getvalue())
             f.close
             buf.close
             print("[Info] Saved: " + str(h))
             print("------------")
         i = i + 1
     if buf != "exit":
         print("\n=================")
         print("Tracking Results:")
         print("=================")
         print("\nNumber of tracked captchas: [ " + str(num_tracks) +
               " ] \n")
示例#3
0
 def track_captcha(self, captcha, proxy, num_tracks):
     """
     This technique is useful to create a dictionary of 'session based' captchas
     """
     options = self.options
     urlp = urlparse(captcha)
     self.domain = urlp.hostname
     if not os.path.exists("inputs/%s" % (self.domain)):
         os.mkdir("inputs/%s" % (self.domain))
     if proxy:
         self.ignoreproxy = 0
     buf = ""
     i = 0
     while i < int(num_tracks) and buf != "exit":
         self.optionCurl = CIntruderCurl(captcha, self.ignoreproxy, proxy)
         buf = self.optionCurl.request()
         if options.verbose:
             print "\n[-]Connection data:"
             out = self.optionCurl.print_options()
             print '-' * 45
         if buf != "exit":
             m = hashlib.md5()
             m.update("%s%s" % (time.time(), captcha))
             h = "inputs/%s/%s.gif" % (self.domain, m.hexdigest())
             f = open(h, 'wb')
             f.write(buf.getvalue())
             f.close
             buf.close
             print "[Info] Saved:", h
             print "------------"
         i = i + 1
     if buf != "exit":
         print "\n================="
         print "Tracking Results:"
         print "================="
         print "\nNumber of tracked captchas: [", num_tracks, "] \n"
示例#4
0
文件: main.py 项目: zumb08/cintruder
 def remote_captcha(self, captcha, proxy):
     """
     Get remote captcha
     """
     if proxy:
         self.ignoreproxy = 0
     self.optionCurl = CIntruderCurl(captcha, self.ignoreproxy, proxy)
     buf = self.optionCurl.request()
     if buf != "exit":
         m = hashlib.md5()
         try:
             m.update(
                 captcha.encode('utf-8') + str(datetime.datetime.now()))
         except:
             m.update(str(datetime.datetime.now()).encode('utf-8'))
         c = "%s.gif" % (m.hexdigest())
         h = "inputs/" + str(c)
         f = open(h, 'wb')
         f.write(buf.getvalue())
         f.close
         buf.close
         return h
     else:
         return  #sys.exit(2)