Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support quiet mode - no URLs printed to the screen #18

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Support quiet mode - no URLs printed to the screen
  • Loading branch information
rotemreiss committed Apr 17, 2020
commit bb732ed52c73fc8d992b6e54bc5c032725a59562
10 changes: 6 additions & 4 deletions paramspider.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def main():
parser.add_argument('-e','--exclude', help= 'extensions to exclude [ex --exclude php,aspx]')
parser.add_argument('-o','--output' , help = 'Output file name [by defualt it is \'result.txt\']')
parser.add_argument('-p','--placeholder' , help = 'The string to add as a placeholder after the parameter name.', default = "FUZZ")
parser.add_argument('-q', '--quiet', help='Do not print the results to the screen', action='store_true')
args = parser.parse_args()

url = f"http://web.archive.org/cdx/search/cdx?url=*.{args.domain}/*&output=txt&fl=original&collapse=urlkey&page=/"
Expand All @@ -54,10 +55,11 @@ def main():

final_uris = extractor.param_extract(response , args.level , black_list, args.placeholder)
save_it.save_func(final_uris , args.output , args.domain)

print("\u001b[32;1m")
print('\n'.join(final_uris))
print("\u001b[0m")

if not args.quiet:
print("\u001b[32;1m")
print('\n'.join(final_uris))
print("\u001b[0m")


print(f"\n\u001b[32m[+] Total unique urls found : {len(final_uris)}\u001b[31m")
Expand Down