Skip to content

Commit ea9a166

Browse files
committed
Added SANs feature and upgraded to include URL where secret found improving #13
2 parents 5eb8510 + 54bcd0a commit ea9a166

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

SubDomainizer.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22

33
#######################################
44
# Author: Neeraj Sonaniya #
@@ -39,6 +39,8 @@
3939
help="Cookies which needs to be sent with request. User double quotes if have more than one.")
4040
parse.add_argument('-cop', '--cloudop',
4141
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.")
4244
parse.add_argument(
4345
'-d', '--domain', help="Enter the top-level-domain to extract all the subdomain of that specific domain")
4446
parse.add_argument(
@@ -60,6 +62,7 @@
6062
url = args.url
6163
listfile = args.listfile
6264
cloudop = args.cloudop
65+
secretop = args.secretop
6366
gitToken = args.gittoken
6467
isGit = args.gitscan
6568
isSSL = args.nossl
@@ -693,6 +696,14 @@ def savecloudresults():
693696
for item in cloudurlset:
694697
f.write(item + '\n')
695698

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+
696707

697708
def printlogo():
698709
"""
@@ -915,6 +926,7 @@ def printlogo():
915926
print(termcolor.colored('_' * 60, color='white', attrs=['bold']))
916927
print(termcolor.colored("\nFound some secrets(might be false positive)...", color='yellow',
917928
attrs=['bold']))
929+
918930
print(termcolor.colored('Total Possible Secrets: ' +
919931
str(sum(len(sec_lst) for sec_lst in secret_dict.values())), color='red',
920932
attrs=['bold']))

0 commit comments

Comments
 (0)