コード例 #1
0
ファイル: cansina.py プロジェクト: Expertasif/cansina
parser.add_argument('-t', dest='threads', type=int,
                    help="Number of threads (default 4)", default=THREADS)
parser.add_argument('-u', dest='target',
                    help="Target url", default=None)
parser.add_argument('-r', dest='resume',
                    help="Resume a session", default=False)
parser.add_argument('-R', dest="parse_robots", action="store_true",
                    help="Parse robots.txt and check its contents", default=False)
parser.add_argument('--recursive', dest="recursive",
                    help="Recursive descend on path directories", default=False, action="store_true")
parser.add_argument('--persist', dest="persist",
                    help="Use HTTP persistent connections", default=False, action="store_true")
args = parser.parse_args()

# Initialize a Resumer object
resumer = Resumer(args, 0)
resume = args.resume
# If we are ressuming a former session revive last args object
if resume:
    try:
        with open(resume) as f:
            resumer = pickle.load(f)
            args = resumer.get_args()
    except:
        sys.stdout.write("Could not load a correct resume file, sorry.")
        sys.exit()

if not args.target:
    print("You need to specify a target")
    parser.print_help()
    sys.exit()
コード例 #2
0
    dest='no_progress',
    help="Don't show tested words and progress. (For dumb terminals)",
    default=False,
    action="store_true")
parser.add_argument(
    '--no-colors',
    dest='no_colors',
    help=
    "Don't use output colors to keep output clean, e.g. when redirecting output to file",
    default=False,
    action="store_true")

args = parser.parse_args()

# Initialize a Resumer object
resumer = Resumer(args, args.continue_line)
resume = args.resume
# If we are ressuming a former session revive last args object
if resume:
    try:
        with open(resume) as f:
            resumer = pickle.load(f)
            args = resumer.get_args()
    except:
        sys.stdout.write("[!] Could not load a correct resume file, sorry.")
        sys.exit()

# Target check and preparation
if not args.target:
    print("[!] You need to specify a target")
    parser.print_help()
コード例 #3
0
ファイル: cansina.py プロジェクト: deibit/cansina
                            help="Do not follow redirections", default=True, action="store_false")
parser.add_argument('--line', dest='continue_line', type=int,
                    help="Continue payload in line <n>", default=0)
parser.add_argument('--headers', dest='headers',
        help="Set personalized headers: key=value;key=value...", default="")
parser.add_argument('--capitalize', dest='capitalize',
        help="Transform 'word' into 'Word'.", default=False, action="store_true")
parser.add_argument('--strip-extension', dest='strip_extension',
        help="Strip word extension: word.ext into word", default=False, action="store_true")
parser.add_argument('--alpha', dest='only_alpha',
        help="Filter non alphanumeric words from wordlist", default=False, action="store_true")

args = parser.parse_args()

# Initialize a Resumer object
resumer = Resumer(args, args.continue_line)
resume = args.resume
# If we are ressuming a former session revive last args object
if resume:
    try:
        with open(resume) as f:
            resumer = pickle.load(f)
            args = resumer.get_args()
    except:
        sys.stdout.write("[!] Could not load a correct resume file, sorry.")
        sys.exit()

# Target check and preparation
if not args.target:
    print("[!] You need to specify a target")
    parser.print_help()