optimized utilities
This commit is contained in:
committed by
Somdev Sangwan
parent
b6d28ddec5
commit
5f807800c6
16
xsstrike.py
16
xsstrike.py
@@ -13,7 +13,7 @@ from core.encoders import base64
|
||||
from core.photon import photon
|
||||
from core.prompt import prompt
|
||||
from core.updater import updater
|
||||
from core.utils import extractHeaders, verboseOutput
|
||||
from core.utils import extractHeaders, verboseOutput, reader
|
||||
|
||||
from modes.bruteforcer import bruteforcer
|
||||
from modes.crawl import crawl
|
||||
@@ -32,7 +32,6 @@ except ImportError: # throws error in python2
|
||||
print('%s XSStrike isn\'t compatible with python2.\n Use python > 3.4 to run XSStrike.' % bad)
|
||||
quit()
|
||||
|
||||
|
||||
# Processing command line arguments, where dest var names will be mapped to local vars with the same name
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-u', '--url', help='url', dest='target')
|
||||
@@ -103,20 +102,11 @@ if args_file:
|
||||
if args_file == 'default':
|
||||
payloadList = core.config.payloads
|
||||
else:
|
||||
payloadList = []
|
||||
with open(args_file, 'r') as f:
|
||||
for line in f:
|
||||
payloadList.append(line.strip(
|
||||
'\n').encode('utf-8').decode('utf-8'))
|
||||
payloadList = list(filter(None, payloadList))
|
||||
payloadList = list(filter(None, reader(args_file)))
|
||||
|
||||
seedList = []
|
||||
if args_seeds:
|
||||
with open(args_seeds, 'r') as f:
|
||||
for line in f:
|
||||
seedList.append(line.strip(
|
||||
'\n').encode('utf-8').decode('utf-8'))
|
||||
seedList = list(filter(None, seedList))
|
||||
seedList = list(filter(None, reader(args_seeds)))
|
||||
|
||||
encoding = base64 if encode and encode == 'base64' else False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user