Skip to content

Commit

Permalink
Added SANs feature and upgraded to include URL where secret found imp…
Browse files Browse the repository at this point in the history
…roving #13
  • Loading branch information
nsonaniya2010 committed Sep 1, 2020
2 parents 5eb8510 + 54bcd0a commit ea9a166
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion SubDomainizer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python

#######################################
# Author: Neeraj Sonaniya #
Expand Down Expand Up @@ -39,6 +39,8 @@
help="Cookies which needs to be sent with request. User double quotes if have more than one.")
parse.add_argument('-cop', '--cloudop',
help="Enter the file name in which you want to save results of cloud services finding.")
parse.add_argument('-sop', '--secretop',
help="Enter the file name in which you want to save results of secrets found.")
parse.add_argument(
'-d', '--domain', help="Enter the top-level-domain to extract all the subdomain of that specific domain")
parse.add_argument(
Expand All @@ -60,6 +62,7 @@
url = args.url
listfile = args.listfile
cloudop = args.cloudop
secretop = args.secretop
gitToken = args.gittoken
isGit = args.gitscan
isSSL = args.nossl
Expand Down Expand Up @@ -693,6 +696,14 @@ def savecloudresults():
for item in cloudurlset:
f.write(item + '\n')

def savesecretsresults():
"""
This function will save secret data into the given file.
"""
with open(secretop, 'w+') as f:
for item in secretList:
f.write(item + '\n')


def printlogo():
"""
Expand Down Expand Up @@ -915,6 +926,7 @@ def printlogo():
print(termcolor.colored('_' * 60, color='white', attrs=['bold']))
print(termcolor.colored("\nFound some secrets(might be false positive)...", color='yellow',
attrs=['bold']))

print(termcolor.colored('Total Possible Secrets: ' +
str(sum(len(sec_lst) for sec_lst in secret_dict.values())), color='red',
attrs=['bold']))
Expand Down

0 comments on commit ea9a166

Please sign in to comment.