Update parse.py

main
witchdocsec 2024-05-16 13:12:09 +01:00 committed by GitHub
parent 2970156be7
commit cd90e9cc35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -1,8 +1,14 @@
#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)
@ -15,10 +21,12 @@ def parser():
npparser.add_argument("-mp","--makepreset",action="store_true")
npparser.add_argument("-pn","--presetname")
#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)
#return parsed arguments
args = parser.parse_args()
return args