示例#1
0
HOST = sys.argv[2]
HOSTS = []

# Not all rules are implemented
RULES = {
    'default-src':[],
    'img-src':[],
    'frame-src':[],
    'xhr-src':[],
    'script-src':[],
    'media-src':[],
    'connect-src':[],
    'font-src':[],
    'style-src':[]
}
requests = burp.parse(sys.argv[1])
for req in requests:
    headers = req.get_request_headers()
    rule_type = determine_rule_type(req)
    if headers['host'] not in RULES[rule_type]:
        if HOST == headers['host']:
            RULES[rule_type].append('self')
        else:
            RULES[rule_type].append(headers['host'])

for i in RULES.keys():
    RULES[i] = wildcardify(RULES[i])

RULES = post_process(RULES)

print make_header(RULES, None, 'webkit')
示例#2
0
HOST = sys.argv[2]
HOSTS = []

# Not all rules are implemented
RULES = {
    'default-src': [],
    'img-src': [],
    'frame-src': [],
    'xhr-src': [],
    'script-src': [],
    'media-src': [],
    'connect-src': [],
    'font-src': [],
    'style-src': []
}
requests = burp.parse(sys.argv[1])
for req in requests:
    headers = req.get_request_headers()
    rule_type = determine_rule_type(req)
    if headers['host'] not in RULES[rule_type]:
        if HOST == headers['host']:
            RULES[rule_type].append('self')
        else:
            RULES[rule_type].append(headers['host'])

for i in RULES.keys():
    RULES[i] = wildcardify(RULES[i])

RULES = post_process(RULES)

print make_header(RULES, None, 'webkit')
示例#3
0
        parser.print_help()
        exit()

    if options.idrange and options.idrange < 1:
        options.idrange = 100
        print( "Invalid ID Range Entered: ID Range has been set to 100\n" )
    elif options.idrange is None:
        options.idrange = 100
        print( "ID Range for Parameter Manipulation Testing has been set to 100\n" )
        
    parsed = None

    # Parse the Burp log using the GDS Burp API    
    if os.path.exists( options.burp ):
        print( "Parsing Burp logfile" )
        parsed = parse( options.burp )
    else:
        print( "\nBurp log file entered does not exist\n" )
        exit()

    logdir = ""
    
    if options.output and os.path.exists( options.output ):
        print( "Error: Output directory already exists." )
        exit()
    elif options.output:
        logdir = options.output
    else:
        logdir = "gwtfuzz_results"+time.strftime("%Y%m%d%H%M%S")

    os.mkdir( logdir )