forked from espenfjo/FjoSpidie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fjospidie.py
43 lines (36 loc) · 1.71 KB
/
fjospidie.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from fjospidie.fjospidie import FjoSpidie
import argparse
from fjospidie.configreader import parse_config
def read_config():
configfile = "fjospidie.conf"
parser = argparse.ArgumentParser()
description='Arguments to start FjoSpidie'
parser.add_argument('--configfile', type=str, nargs=1,
help='FjoSpidie configuration file')
args, remaining_argv = parser.parse_known_args()
parser.add_argument('--url', type=str, required=True,
help='The URL to scan')
parser.add_argument('--uuid', type=str,
help='Unique UUID of this report')
parser.add_argument('--referer', type=str, nargs='?',
help='The HTTP_REFERER to use when loading the URL')
parser.add_argument('--useragent', type=str, nargs='?',
help='The useragent used')
parser.add_argument('--firefoxprofile', type=str, nargs=1,
help='The Firefox profile used to run Firefox')
parser.add_argument('--snortconfig', type=str, nargs=1,
help='Snort configuration file')
parser.add_argument('--nopcap', help='Doesnt fire up the pcap engine, and hence, doesnt fire up snort/suricata engines', action="store_true")
parser.add_argument("-v", "--verbose", help="increase output verbosity",
action="store_true")
parser.add_argument("-d", "--debug", help="Debug output",
action="store_true")
if args.configfile:
configfile = args.configfile
config = parse_config(configfile)
parser.set_defaults(**config)
args = parser.parse_args(remaining_argv)
return args
config = read_config()
spidie = FjoSpidie(config)
spidie.run()