Exemplo n.º 1
0
 def web_fuzzer(self):
     try:
         from tools import TOOLS_DIR
         if not self.config.auto:
             to_fuzz = {'lvl1': {"lvl2": [1, 1.0, "True"]}, "lvl1-1": [{"none": None, "inf": [{"a": {"a": "a"}}]}]}
         else:
             to_fuzz = self.config.generate_json(self.config.grammar_path)
         run = "{0} http://127.0.0.1:8080/fuzzer.html".format(self.config.browser_auto)
         config = PJFConfiguration(Namespace(json=to_fuzz,
                                             html=TOOLS_DIR,
                                             ports=self.config.ports,
                                             content_type="text/plain",
                                             debug=True,
                                             nologo=True,
                                             level=2,
                                             utf8=self.config.utf8,
                                             indent=self.config.indent,
                                             notify=True,
                                             fuzz_web=True,
                                             strong_fuzz=self.config.strong_fuzz,
                                             process_to_monitor=run,
                                             recheck_ports=False))
         server = PJFServer(config)
         server.run()
         print "[\033[92mINFO\033[0m] Available URLs"
         for url in self.get_urls():
             print "[\033[92m*\033[0m] {0}".format(url)
         try:
             while True:
                     time.sleep(1)
         except KeyboardInterrupt:
             server.stop()
     except Exception as e:
         raise PJFBaseException(e.message)
Exemplo n.º 2
0
 def browser_autopwn(self):
     try:
         from tools import TOOLS_DIR
         if not self.config.auto:
             to_fuzz = {'lvl1': {"lvl2": [1, 1.0, "True"]}, "lvl1-1": [{"none": None, "inf": [{"a": {"a": "a"}}]}]}
         else:
             to_fuzz = self.config.generate_json(self.config.grammar_path)
         run = "{0} http://127.0.0.1:8080/fuzzer.html".format(self.config.browser_auto)
         config = PJFConfiguration(Namespace(json=to_fuzz,
                                             html=TOOLS_DIR,
                                             ports=self.config.ports,
                                             content_type="text/plain",
                                             debug=True,
                                             nologo=True,
                                             level=2,
                                             utf8=self.config.utf8,
                                             indent=self.config.indent,
                                             notify=True,
                                             strong_fuzz=self.config.strong_fuzz,
                                             process_to_monitor=run,
                                             recheck_ports=False))
         monitor = PJFProcessMonitor(config)
         server = PJFServer(config)
         server.run()
         try:
             while True:
                     monitor.start_monitor(standalone=False)
         except KeyboardInterrupt:
             monitor.shutdown()
             server.stop()
     except Exception as e:
         raise PJFBaseException(e.message)
Exemplo n.º 3
0
 def start_http_server(self):
     try:
         server = PJFServer(self.config)
         server.run()
         try:
             while True:
                 time.sleep(1)
         except KeyboardInterrupt:
             server.stop()
     except Exception as e:
         raise PJFBaseException(e.message)