Ejemplo n.º 1
0
                 )
 start_time = datetime.now()
 #logging.info("scan started at %s" % str(start_time))
 logging.info( "start your engines" )
 try:
     sipvicious.start()
     if exportpath is not None:
         open(os.path.join(exportpath,'closed'),'w').close()
 except KeyboardInterrupt:
     logging.warn('caught your control^c - quiting')
 except Exception, err:
     import traceback
     from helper import reportBugToAuthor                
     if options.reportBack:
         logging.critical( "Got unhandled exception : sending report to author" )
         reportBugToAuthor(traceback.format_exc())
     else:
         logging.critical( "Unhandled exception - please run same command with the -R option to send me an automated report")
         pass
     logging.exception( "Exception" )
 if options.save is not None and sipvicious.nextuser is not None:
     lastextensiondst = os.path.join(exportpath,'lastextension.pkl')
     logging.debug('saving state to %s' % lastextensiondst)
     try:
         if guessmode == 1:
             pickle.dump(sipvicious.nextuser,open(os.path.join(exportpath,'lastextension.pkl'),'w'))
             logging.debug('logged last extension %s' % sipvicious.nextuser)
         elif guessmode == 2:
             pickle.dump(sipvicious.guessargs.tell(),open(os.path.join(exportpath,'lastextension.pkl'),'w'))
             logging.debug('logged last position %s' % sipvicious.guessargs.tell())            
     except IOError:
Ejemplo n.º 2
0
                 )
 start_time = datetime.now()
 #logging.info("scan started at %s" % str(start_time))
 logging.info( "start your engines" )
 try:
     sipvicious.start()
     if exportpath is not None:
         open(os.path.join(exportpath,'closed'),'w').close()
 except KeyboardInterrupt:
     logging.warn('caught your control^c - quiting')
 except Exception, err:
     import traceback
     from helper import reportBugToAuthor                
     if options.reportBack:
         logging.critical( "Got unhandled exception : sending report to author" )
         reportBugToAuthor(traceback.format_exc())
     else:
         logging.critical( "Unhandled exception - please run same command with the -R option to send me an automated report")
         pass
     logging.exception( "Exception" )
 if options.save is not None and sipvicious.nextuser is not None:
     lastextensiondst = os.path.join(exportpath,'lastextension.pkl')
     logging.debug('saving state to %s' % lastextensiondst)
     try:
         if guessmode == 1:
             pickle.dump(sipvicious.nextuser,open(os.path.join(exportpath,'lastextension.pkl'),'w'))
             logging.debug('logged last extension %s' % sipvicious.nextuser)
         elif guessmode == 2:
             pickle.dump(sipvicious.guessargs.tell(),open(os.path.join(exportpath,'lastextension.pkl'),'w'))
             logging.debug('logged last position %s' % sipvicious.guessargs.tell())            
     except IOError: