8000 Wildcard check and prompt · m0rtem/CloudFail@b1fd9eb · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Wildcard check and prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
DatDraggy committed May 4, 2018
1 parent bfd5f29 commit b1fd9eb
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions cloudfail.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import platform
from colorama import Fore, Style
from DNSDumpsterAPI import DNSDumpsterAPI
import dns.resolver

colorama.init(Style.BRIGHT)

Expand Down Expand Up @@ -167,8 +168,23 @@ def inCloudFlare(ip):
return False

def check_for_wildcard(target):

return True
resolver = dns.resolver.Resolver(configure=False)
resolver.nameservers = ['1.1.1.1', '1.0.0.1']
#Unsure how exactly I should test, for now simple appending to target. Don't know how to extract only domain to append *. for wildcard test
try:
#Throws exception if none found
answer = resolver.query('*.' + target)
#If found, ask user if continue as long until valid answer
choice = ''
while choice is not 'y' and choice is not 'n':
choice = input("A wildcard DNS entry was found. This will result in all subdomains returning an IP. Do you want to scan subdomains anyway? (y/n) ")
if choice is 'y':
return True
else:
return False
except:
#Return true to continue subdomain bruteforce because no wildcard found
return True


def subdomain_scan(target, subdomains):
Expand Down

0 comments on commit b1fd9eb

Please sign in to comment.
0