diff --git a/README.md b/README.md index d5172ef..ceebbe5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

Bhedak diff --git a/bhedak.py b/bhedak.py index 3dc2960..fae1753 100644 --- a/bhedak.py +++ b/bhedak.py @@ -7,14 +7,18 @@ import urllib.parse as ul from sys import stdin, stdout, argv, exit -encoded = ul.quote(str(argv[1]), safe='') +#@> TAKE INPUT FROM USER AS "sys.argv[1]"", ELSE IT WILL USE "FUZZ" AS THE VALUE +try: + encoded = ul.quote(str(argv[1]), safe='') +except IndexError: + encoded = ul.quote("FUZZ", safe='') + +#@> READ URLs AS STDIN AND USE REGEX TO FILTER AND REPLACE try: for url in stdin.readlines(): domain = str(url.strip()) stdout.write(re.sub(r"=[^?\|&]*", '=' + str(encoded), str(domain)) + '\n') except KeyboardInterrupt: exit(0) -except IndexError: - exit(127) except: - exit(127) + exit(127) \ No newline at end of file