Example #1
0
 def get(self):
     del_type = self.get_argument("type")
     if del_type in ['waiting', 'finished', 'running', 'vulnerable']:
         conn.delete(del_type)
     elif del_type == "flushdb":
         conn.flushdb()
         return self.write(out.jump("/"))
     return self.write(out.jump("/list?type=" + del_type))
Example #2
0
 def get(self):
     proxy_type = self.get_argument("type")
     conf = {}
     if proxy_type == "mix_proxy":
         conf['mix_addr'] = config.load()['mix_addr']
         conf['mix_port'] = config.load()['mix_port']
         stat = config.load()['mix_stat']
         try:
             start_stat = self.get_argument("stat")
             start_conf = config.load()
             start_conf['mix_stat'] = start_stat
             config.update(start_conf)
             if start_stat.lower() == "true":
                 thread = threading.Thread(target=mix_proxy.main)
                 thread.start()
             else:
                 secure.kill(config.load()['mix_addr'],
                             int(config.load()['mix_port']), "GE")
             return self.write(out.jump("/proxy?type=" + proxy_type))
         except:
             pass
     elif proxy_type == "scapy":
         conf['scapy_out'] = config.load()['scapy_out']
         conf['scapy_network_card'] = config.load()['scapy_network_card']
         stat = config.load()['scapy_stat']
         try:
             start_stat = secure.clear(self.get_argument("stat"))
             start_conf = config.load()
             start_conf['scapy_stat'] = start_stat
             config.update(start_conf)
             if start_stat.lower() == "true":
                 thread = threading.Thread(target=pyscapy.main)
                 thread.start()
             return self.write(out.jump("/proxy?type=" + proxy_type))
         except:
             pass
     elif proxy_type == "tornado":
         conf['tornado_address'] = config.load()['tornado_address']
         conf['tornado_port'] = config.load()['tornado_port']
         stat = config.load()['tornado_stat']
         try:
             start_stat = secure.clear(self.get_argument("stat"))
             start_conf = config.load()
             start_conf['tornado_stat'] = start_stat
             config.update(start_conf)
             if start_stat.lower() == "true":
                 thread = threading.Thread(target=proxy_io.main)
                 thread.start()
             return self.write(out.jump("/proxy?type=" + proxy_type))
         except:
             pass
     else:
         return self.write(out.jump("/"))
     return self.render("proxy.html",
                        proxy_type=proxy_type,
                        conf=conf,
                        stat=stat)
Example #3
0
 def get(self):
     stat = secure.clear(self.get_argument("stat"))
     config_all = config.load()
     config_all['scan_stat'] = stat
     config.update(config_all)
     if stat.lower() == "true":
         thread = threading.Thread(target=scan.scan_start, args=())
         thread.start()
     return self.write(out.jump("/scan_config"))
Example #4
0
 def post(self):
     start = []
     rule = [
         "sqlireflect", "sqlitime", "sqlmap", "xpath", "xss", "lfi", "ldap",
         "sqlibool"
     ]
     conf = config.load_rule()
     for i in rule:
         on = self.get_argument(i + "_start")
         if on == "true":
             start.append(i)
         rules = self.get_argument(i + "_rule")
         config.rule_write(i, rules)
         if i == "sqlmap":
             address = self.get_argument("sqlmap_api")
             conf['sqlmap_api'] = address
     conf['scan_type'] = start
     config.update_rule(conf)
     return self.write(out.jump("/scan_config"))
Example #5
0
 def post(self):
     proxy_type = self.get_argument("type")
     if proxy_type == "mix_proxy":
         conf = config.load()
         conf["mix_addr"] = secure.clear(self.get_argument("mix_addr"))
         conf["mix_port"] = secure.clear(self.get_argument("mix_port"))
         config.update(conf)
     elif proxy_type == "scapy":
         conf = config.load()
         conf['scapy_out'] = secure.clear(self.get_argument('scapy_out'))
         conf['scapy_network_card'] = self.get_argument(
             'scapy_network_card')
         config.update(conf)
     elif proxy_type == "tornado":
         conf = config.load()
         conf['tornado_address'] = secure.clear(
             self.get_argument('tornado_address'))
         conf['tornado_port'] = secure.clear(
             self.get_argument('tornado_port'))
         config.update(conf)
     return self.write(out.jump("/proxy?type=" + proxy_type))