if options.resume is not None: lastextensionsrc = os.path.join(exportpath,'lastextension.pkl') previousposition = pickle.load(open(lastextensionsrc,'r')) dictionary.seek(previousposition) guessargs = dictionary else: guessmode = 1 if options.resume is not None: lastextensionsrc = os.path.join(exportpath,'lastextension.pkl') try: previousextension = pickle.load(open(lastextensionsrc,'r')) except IOError: logging.critical('Could not read from %s' % lastipsrc) exit(1) logging.debug('Previous range: %s' % options.range) options.range = resumeFrom(previousextension,options.range) logging.debug('New range: %s' % options.range) logging.info('Resuming from %s' % previousextension) extensionstotry = getRange(options.range) guessargs = (extensionstotry,options.zeropadding,options.template) if options.save is not None: if options.resume is None: exportpath = os.path.join('.sipvicious',__prog__,options.save) if os.path.exists(exportpath): logging.warn('we found a previous scan with the same name. Please choose a new session name') exit(1) logging.debug('creating an export location %s' % exportpath) try: os.makedirs(exportpath,mode=0700) except OSError: logging.critical('could not create the export location %s' % exportpath)
if options.resume is not None: lastpasswdsrc = os.path.join(exportpath, 'lastpasswd.pkl') previousposition = pickle.load(open(lastpasswdsrc, 'r')) dictionary.seek(previousposition) crackargs = dictionary else: crackmode = 1 if options.resume is not None: lastpasswdsrc = os.path.join(exportpath, 'lastpasswd.pkl') try: previouspasswd = pickle.load(open(lastpasswdsrc, 'r')) except IOError: logging.critical('Could not read from %s' % lastpasswdsrc) exit(1) logging.debug('Previous range: %s' % options.range) options.range = resumeFrom(previouspasswd, options.range) logging.debug('New range: %s' % options.range) logging.info('Resuming from %s' % previouspasswd) rangelist = getRange(options.range) crackargs = (rangelist, options.zeropadding, options.template) if options.save is not None: if options.resume is None: exportpath = os.path.join('.sipvicious', __prog__, options.save) if os.path.exists(exportpath): logging.warn( 'we found a previous scan with the same name. Please choose a new session name' ) exit(1) logging.debug('creating an export location %s' % exportpath) try: os.makedirs(exportpath, mode=0700)
if options.resume is not None: lastextensionsrc = os.path.join(exportpath,'lastextension.pkl') previousposition = pickle.load(open(lastextensionsrc,'r')) dictionary.seek(previousposition) guessargs = dictionary else: guessmode = 1 if options.resume is not None: lastextensionsrc = os.path.join(exportpath,'lastextension.pkl') try: previousextension = pickle.load(open(lastextensionsrc,'r')) except IOError: logging.critical('Could not read from %s' % lastipsrc) exit(1) logging.debug('Previous range: %s' % options.range) options.range = resumeFrom(previousextension,options.range) logging.debug('New range: %s' % options.range) logging.info('Resuming from %s' % previousextension) extensionstotry = getRange(options.range) guessargs = (extensionstotry,options.zeropadding,options.template,options.defaults) if options.save is not None: if options.resume is None: exportpath = os.path.join('.sipvicious',__prog__,options.save) if os.path.exists(exportpath): logging.warn('we found a previous scan with the same name. Please choose a new session name') exit(1) logging.debug('creating an export location %s' % exportpath) try: os.makedirs(exportpath,mode=0700) except OSError: logging.critical('could not create the export location %s' % exportpath)
if options.resume is not None: lastpasswdsrc = os.path.join(exportpath,'lastpasswd.pkl') previousposition = pickle.load(open(lastpasswdsrc,'r')) dictionary.seek(previousposition) crackargs = dictionary else: crackmode = 1 if options.resume is not None: lastpasswdsrc = os.path.join(exportpath,'lastpasswd.pkl') try: previouspasswd = pickle.load(open(lastpasswdsrc,'r')) except IOError: logging.critical('Could not read from %s' % lastpasswdsrc) exit(1) logging.debug('Previous range: %s' % options.range) options.range = resumeFrom(previouspasswd,options.range) logging.debug('New range: %s' % options.range) logging.info('Resuming from %s' % previouspasswd) rangelist = getRange(options.range) crackargs = (rangelist,options.zeropadding,options.template) if options.save is not None: if options.resume is None: exportpath = os.path.join('.sipvicious',__prog__,options.save) if os.path.exists(exportpath): logging.warn('we found a previous scan with the same name. Please choose a new session name') exit(1) logging.debug('creating an export location %s' % exportpath) try: os.makedirs(exportpath,mode=0700) except OSError: logging.critical('could not create the export location %s' % exportpath)