|
1 |
| -#!/usr/bin/env python3 |
| 1 | +#!/usr/bin/env python |
2 | 2 |
|
3 | 3 | #######################################
|
4 | 4 | # Author: Neeraj Sonaniya #
|
|
39 | 39 | help="Cookies which needs to be sent with request. User double quotes if have more than one.")
|
40 | 40 | parse.add_argument('-cop', '--cloudop',
|
41 | 41 | help="Enter the file name in which you want to save results of cloud services finding.")
|
| 42 | +parse.add_argument('-sop', '--secretop', |
| 43 | + help="Enter the file name in which you want to save results of secrets found.") |
42 | 44 | parse.add_argument(
|
43 | 45 | '-d', '--domain', help="Enter the top-level-domain to extract all the subdomain of that specific domain")
|
44 | 46 | parse.add_argument(
|
|
60 | 62 | url = args.url
|
61 | 63 | listfile = args.listfile
|
62 | 64 | cloudop = args.cloudop
|
| 65 | +secretop = args.secretop |
63 | 66 | gitToken = args.gittoken
|
64 | 67 | isGit = args.gitscan
|
65 | 68 | isSSL = args.nossl
|
@@ -693,6 +696,14 @@ def savecloudresults():
|
693 | 696 | for item in cloudurlset:
|
694 | 697 | f.write(item + '\n')
|
695 | 698 |
|
| 699 | +def savesecretsresults(): |
| 700 | + """ |
| 701 | + This function will save secret data into the given file. |
| 702 | + """ |
| 703 | + with open(secretop, 'w+') as f: |
| 704 | + for item in secretList: |
| 705 | + f.write(item + '\n') |
| 706 | + |
696 | 707 |
|
697 | 708 | def printlogo():
|
698 | 709 | """
|
@@ -915,6 +926,7 @@ def printlogo():
|
915 | 926 | print(termcolor.colored('_' * 60, color='white', attrs=['bold']))
|
916 | 927 | print(termcolor.colored("\nFound some secrets(might be false positive)...", color='yellow',
|
917 | 928 | attrs=['bold']))
|
| 929 | + |
918 | 930 | print(termcolor.colored('Total Possible Secrets: ' +
|
919 | 931 | str(sum(len(sec_lst) for sec_lst in secret_dict.values())), color='red',
|
920 | 932 | attrs=['bold']))
|
|
0 commit comments