From f9a0aff5f96d2c9097ce9ea340675f2b8e339604 Mon Sep 17 00:00:00 2001 From: Zach Date: Fri, 18 Dec 2020 16:04:14 -0500 Subject: [PATCH] Update cloudfail.py for Python 3.8.5 cloudfail.py:177: DeprecationWarning: please use dns.resolver.Resolver.resolve() instead # Changed query() to resolve() cloudfail.py:180: SyntaxWarning: "is not" with a literal. Did you mean "!="? while choice is not 'y' and choice is not 'n': cloudfail.py:180: SyntaxWarning: "is not" with a literal. Did you mean "!="? while choice is not 'y' and choice is not 'n': cloudfail.py:182: SyntaxWarning: "is" with a literal. Did you mean "=="? if choice is 'y': # Changed the above "is not" to != and "is" to == Don't have a wildcarded cloudflare domain to check, but doesn't generate any further warnings --- cloudfail.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudfail.py b/cloudfail.py index 265be4b..a6785a9 100644 --- a/cloudfail.py +++ b/cloudfail.py @@ -174,12 +174,12 @@ def check_for_wildcard(target): #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) + answer = resolver.resolve('*.' + target) #If found, ask user if continue as long until valid answer choice = '' - while choice is not 'y' and choice is not 'n': + while choice != 'y' and choice != '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': + if choice == 'y': return False else: return True