Beispiel #1
0
 def kill_session(self):
     if len(dispatch.job_stats) > 0:
         print('[*] %d jobs are still running.' & len(dispatch.job_stats))
         print('are you sure you want to exit?')
         self.answer = raw_input('[y/n]')
         if self.answer == 'y': 
             pass
         elif self.answer == 'n':
             print('[*] returning to ArcReactor console')
             self.console()
         else:
             print('[!] invalid answer. returning to ArcReactor console.')
             self.console()
     reactor.status('info', 'arcreactor', 'shutting down ArcReactor console')
     sys.exit(0)
Beispiel #2
0
    def new(self):
        """
        Initializes a new console session

        Perform some simple environment checks to ensure that we can properly
        start a new interactive session, load needed configuration files and if
        these pass, we start our console.

        """
        reactor.status('info', 'arcreactor', 'initializing new console session')
        reactor.status('info', 'arcreactor', 'loading configuration files')
        keywords = reactor.load_keywords(reactor.PATH_CONF+'/keywords.cfg')
        sources = reactor.load_sources(reactor.PATH_CONF+'/sources.cfg')
        options = reactor.load_config(reactor.PATH_CONF+'/reactor.cfg')
        self.console()
Beispiel #3
0
    def new(self):
        """
        Initializes a new console session

        Perform some simple environment checks to ensure that we can properly
        start a new interactive session, load needed configuration files and if
        these pass, we start our console.

        """
        reactor.status('info', 'arcreactor',
                       'initializing new console session')
        reactor.status('info', 'arcreactor', 'loading configuration files')
        keywords = reactor.load_keywords(reactor.PATH_CONF + '/keywords.cfg')
        sources = reactor.load_sources(reactor.PATH_CONF + '/sources.cfg')
        options = reactor.load_config(reactor.PATH_CONF + '/reactor.cfg')
        self.console()
Beispiel #4
0
 def kill_session(self):
     if len(dispatch.job_stats) > 0:
         print('[*] %d jobs are still running.' & len(dispatch.job_stats))
         print('are you sure you want to exit?')
         self.answer = raw_input('[y/n]')
         if self.answer == 'y':
             pass
         elif self.answer == 'n':
             print('[*] returning to ArcReactor console')
             self.console()
         else:
             print('[!] invalid answer. returning to ArcReactor console.')
             self.console()
     reactor.status('info', 'arcreactor',
                    'shutting down ArcReactor console')
     sys.exit(0)
Beispiel #5
0
parser = argparse.ArgumentParser()
parser.add_argument("--interactive", help="start interactive console", action="store_true")
parser.add_argument("--collect", help="execute all collection modules", action="store_true")
parser.add_argument("--daemon", help="run --collect as background process", action="store_true")
args = parser.parse_args()

if args.interactive:
    session = console.Session()
    reactor.start_logger()
    session.new()
elif args.collect:
    if args.daemon:
        background_job = True
    launcher = dispatch.Module()
    jobs = dispatch.Jobs()
    reactor.status('info', 'arcreactor', 'launching all collection modules')
    launcher.run_knownbad()
    launcher.run_pastebin()
    launcher.run_otx()
    reactor.status('info', 'arcreactor', 'all collection modules finished')
    print('[*] Collection Statistics: ')
    jobs.get_stats()
    sys.exit(0)
else:
    print('[!] arcreactor - invalid argument!')
    sys.exit(1)




Beispiel #6
0
                    help="start interactive console",
                    action="store_true")
parser.add_argument("--collect",
                    help="execute all collection modules",
                    action="store_true")
parser.add_argument("--daemon",
                    help="run --collect as background process",
                    action="store_true")
args = parser.parse_args()

if args.interactive:
    session = console.Session()
    reactor.start_logger()
    session.new()
elif args.collect:
    if args.daemon:
        background_job = True
    launcher = dispatch.Module()
    jobs = dispatch.Jobs()
    reactor.status('info', 'arcreactor', 'launching all collection modules')
    launcher.run_knownbad()
    launcher.run_pastebin()
    launcher.run_otx()
    reactor.status('info', 'arcreactor', 'all collection modules finished')
    print('[*] Collection Statistics: ')
    jobs.get_stats()
    sys.exit(0)
else:
    print('[!] arcreactor - invalid argument!')
    sys.exit(1)