return if __name__ == '__main__': from fphelper import fpdynamic, fpstatic, getdynamic, getstatic, hashstatic, fpstore, fpdynamicstore from fphelper import getfingerprints, getheader, fpexists, uploadfp from optparse import OptionParser from helper import makeRequest, calcloglevel, fingerPrintPacket, standardoptions, bindto from regen import generateregex import logging import sys, re log = logging.getLogger('') usage = '%prog [siphost]\r\n' usage += 'example: %prog 10.0.0.2\r\n' parser = OptionParser(usage) parser = standardoptions(parser) parser.add_option( '--force', dest="force", action="store_true", default=False, help= "This tool is not supported anymore and is being rewritten. If you really want to use it you need force ;-)" ) parser.add_option("-S", "--samples", dest="samples", type="int", default=222, help="Number of samples to take") parser.add_option(
from datetime import datetime import anydbm import os from sys import exit import logging import pickle from helper import resumeFrom, calcloglevel from helper import standardoptions, standardscanneroptions from helper import getRange usage = "usage: %prog [options] target\r\n" usage += "examples:\r\n" usage += "%prog -e100-999 10.0.0.1\r\n" usage += "%prog -d dictionary.txt 10.0.0.2\r\n" parser = OptionParser(usage,version="%prog v"+str(__version__)+__GPL__) parser = standardoptions(parser) parser = standardscanneroptions(parser) parser.add_option("-d", "--dictionary", dest="dictionary", type="string", help="specify a dictionary file with possible extension names", metavar="DICTIONARY") parser.add_option("-m", "--method", dest="method", type="string", help="specify a request method. The default is REGISTER. Other possible methods are OPTIONS and INVITE", default="REGISTER", metavar="OPTIONS") parser.add_option("-e", "--extensions", dest="range", default='100-999', help="specify an extension or extension range\r\nexample: -e 100-999,1000-1500,9999", metavar="RANGE") parser.add_option("-z", "--zeropadding", dest="zeropadding", type="int", help="""the number of zeros used to padd the username. the options "-e 1-9999 -z 4" would give 0001 0002 0003 ... 9999""", default=0,