Update parse.py

main
witchdocsec 2024-05-17 18:19:51 +01:00 committed by GitHub
parent bacaa88fdc
commit 3ddc9c2911
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 9 deletions

View File

@ -1,32 +1,27 @@
#import
import argparse
#defines parser function
def parser():
#create base argument parser
parser = argparse.ArgumentParser(description="browser brute args")
subparse=parser.add_subparsers(dest="command")
#create subparser for brute mode
npparser=subparse.add_parser("brute")
npparser.add_argument("-b","--browser",required=True, choices=["chrome","firefox"])
npparser.add_argument("-u","--url",required=True)
npparser.add_argument("-un","--username",required=True)
npparser.add_argument("-uf","--userfield",required=True)
npparser.add_argument("-pf","--passwordfield",required=True)
npparser.add_argument("-fn","--formnumber",required=True)
npparser.add_argument("-fn","--formnumber")
npparser.add_argument("-btn","--button")
npparser.add_argument("-wl","--wordlist",required=True)
npparser.add_argument("-tu","--targeturl",required=True)
npparser.add_argument("-mp","--makepreset",action="store_true")
npparser.add_argument("-pn","--presetname")
npparser.add_argument("-ud","--undetected",action="store_true")
#create subparser for preset mode
pparser=subparse.add_parser("preset")
pparser.add_argument("-pn","--presetname",required=True)
pparser.add_argument("-un","--username",required=True)
pparser.add_argument("-wl","--wordlist",required=True)
pparser.add_argument("-ud","--undetected",action="store_true")
#return parsed arguments
args = parser.parse_args()
return args