Browse Source

Add -q/quiet option and minor cleanup

Andrew Chiles 4 years ago
parent
commit
f7c9785101
2 changed files with 15 additions and 13 deletions
  1. 3 2
      README.md
  2. 12 11
      domainhunter.py

+ 3 - 2
README.md

@@ -9,11 +9,12 @@ This Python based tool was written to quickly query the Expireddomains.net searc
 ## Changelog
 ## Changelog
 
 
 - 07 January 2021
 - 07 January 2021
-   + Fix Symantec Site Review reputation checking to bypass XSRF and additional POST parameter checks
+   + Fix Symantec Site Review (Bluecoat) reputation checking to bypass XSRF and additional POST parameter checks
    + Temporary fix for broken malware domains link. This service is no longer offered in the form used by DomainHunter.
    + Temporary fix for broken malware domains link. This service is no longer offered in the form used by DomainHunter.
    + Add internal code comments for readability
    + Add internal code comments for readability
    + Add check for ExpiredDomains username before asking for a password
    + Add check for ExpiredDomains username before asking for a password
-  
+   + Disable Google Safe Browsing/PhishTank reputation from MxToolbox as this service has changed
+
 - 21 February 2020
 - 21 February 2020
    + updated Pillow version to support Python3.7+
    + updated Pillow version to support Python3.7+
    + Add instructions to install using pipenv
    + Add instructions to install using pipenv

+ 12 - 11
domainhunter.py

@@ -430,6 +430,7 @@ Examples:
     parser.add_argument('-ks','--keyword-start', help='Keyword starts with used to refine search results', required=False, default="", type=str, dest='keyword_start')
     parser.add_argument('-ks','--keyword-start', help='Keyword starts with used to refine search results', required=False, default="", type=str, dest='keyword_start')
     parser.add_argument('-ke','--keyword-end', help='Keyword ends with used to refine search results', required=False, default="", type=str, dest='keyword_end')
     parser.add_argument('-ke','--keyword-end', help='Keyword ends with used to refine search results', required=False, default="", type=str, dest='keyword_end')
     parser.add_argument('-um','--umbrella-apikey', help='API Key for umbrella (paid)', required=False, default="", type=str, dest='umbrella_apikey')
     parser.add_argument('-um','--umbrella-apikey', help='API Key for umbrella (paid)', required=False, default="", type=str, dest='umbrella_apikey')
+    parser.add_argument('-q','--quiet', help='Surpress initial ASCII art and header', required=False, default=False, action='store_true', dest='quiet')
     args = parser.parse_args()
     args = parser.parse_args()
 
 
     # Load dependent modules
     # Load dependent modules
@@ -496,7 +497,7 @@ Examples:
     expireddomainHost = "https://member.expireddomains.net"
     expireddomainHost = "https://member.expireddomains.net"
 
 
     timestamp = time.strftime("%Y%m%d_%H%M%S")
     timestamp = time.strftime("%Y%m%d_%H%M%S")
-            
+
     useragent = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'
     useragent = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'
 
 
     headers = {'User-Agent':useragent}
     headers = {'User-Agent':useragent}
@@ -520,19 +521,19 @@ Examples:
 | |_| | |_| | |  | |/ ___ \ | || |\  | |  _  | |_| | |\  | | | | |___|  _ < 
 | |_| | |_| | |  | |/ ___ \ | || |\  | |  _  | |_| | |\  | | | | |___|  _ < 
 |____/ \___/|_|  |_/_/   \_\___|_| \_| |_| |_|\___/|_| \_| |_| |_____|_| \_\ '''
 |____/ \___/|_|  |_/_/   \_\___|_| \_| |_| |_|\___/|_| \_| |_| |_____|_| \_\ '''
 
 
-    print(title)
-    print("")
-    print("Expired Domains Reputation Checker")
-    print("Authors: @joevest and @andrewchiles\n")
-    print("DISCLAIMER: This is for educational purposes only!")
-    disclaimer = '''It is designed to promote education and the improvement of computer/cyber security.  
+    # Print header
+    if not (args.quiet):
+        print(title)
+        print('''\nExpired Domains Reputation Checker
+Authors: @joevest and @andrewchiles\n
+DISCLAIMER: This is for educational purposes only!
+It is designed to promote education and the improvement of computer/cyber security.  
 The authors or employers are not liable for any illegal act or misuse performed by any user of this tool.
 The authors or employers are not liable for any illegal act or misuse performed by any user of this tool.
-If you plan to use this content for illegal purpose, don't.  Have a nice day :)'''
-    print(disclaimer)
-    print("")
+If you plan to use this content for illegal purpose, don't.  Have a nice day :)\n''')
 
 
     # Download known malware domains
     # Download known malware domains
-    print('[*] Downloading malware domain list from {}\n'.format(malwaredomainsURL))
+    # print('[*] Downloading malware domain list from {}\n'.format(malwaredomainsURL))
+    
     maldomains = downloadMalwareDomains(malwaredomainsURL)
     maldomains = downloadMalwareDomains(malwaredomainsURL)
     maldomainsList = maldomains.split("\n")
     maldomainsList = maldomains.split("\n")