From 6c749df4b7878612bf6d4db3dbcb1e2322b92a8b Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Wed, 11 Dec 2019 11:47:14 -0800 Subject: [PATCH] - Updated README to reference new -q option - Added check to a few more output statements to respect silent option --- README.md | 1 + turbolist3r.py | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 98f3d23..dc1aa8c 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Short Form | Long Form | Description (none) | --inputfile | Read domains from specified file, and use them for analysis (none) | --debug | Print debug information during the analysis module (-a). Prints mostly raw DNS data, familarity with the DIG Linux DNS utility and it's output is helpful to interpret the debug output -r | --resolvers | File with DNS servers to populate as resolvers. File must have only one server IP address per line and only IP addresses are accepted +-q | --quiet | Only print found domains and/or CNAME mappings. Note errors may be printed as well ### Examples diff --git a/turbolist3r.py b/turbolist3r.py index ff2f1a3..7449d60 100644 --- a/turbolist3r.py +++ b/turbolist3r.py @@ -24,7 +24,8 @@ from collections import Counter try: from subbrute import subbrute except: - print("Failed to import subbrute, you will not be able to bruteforce") + pass + #print("Failed to import subbrute, you will not be able to bruteforce") import requests # import dnslib, which provides better features compared to dns.resolver for finding subdomains @@ -1209,7 +1210,8 @@ if __name__ == "__main__": RESOLVER_COUNT = len(resolvers) if (inputfile != None): - print(B + "[-] Reading subdomains from " + inputfile + W) + if not silent: + print(B + "[-] Reading subdomains from " + inputfile + W) f = open(inputfile, 'r') res = f.readlines() f.close() @@ -1219,14 +1221,16 @@ if __name__ == "__main__": # Code added here if (analyze): # res is the list of subdomains e.g. www.example.com, mail.example.com, etc - print(B + "[-] Using DNS resolvers:" + W) - for r in resolvers: - print(B + r + W) + if not silent: + print(B + "[-] Using DNS resolvers:" + W) + for r in resolvers: + print(B + r + W) server = 0 count = 0 total = str(len(res)) - print("") - print(B + "[-] Beginning analysis of " + total + " subdomains..." + W) + if not silent: + print("") + print(B + "[-] Beginning analysis of " + total + " subdomains..." + W) for subdomain in res: try: name = subdomain.replace('\n', '').replace('\r', '') @@ -1243,8 +1247,9 @@ if __name__ == "__main__": # update user on our progress - every 30 hosts count = count + 1 - if (count % 30) == 0: - print(str(count) + '/' + total) + if not silent: + if (count % 30) == 0: + print(str(count) + '/' + total) time.sleep(0.2) # This helps the script catch the Ctrl-C cancel without looping up to the next subdomain except KeyboardInterrupt: print(R + '\n[-] User exit' + W) @@ -1267,4 +1272,5 @@ if __name__ == "__main__": if (analysisfile!=None): # save the analysis to a file. Merge the arrays into one list for easier reading write_file(analysisfile, ahosts + ["\n"] + cnames) - print(B + "Saved reverse DNS analysis to " + analysisfile + W) + if not silent: + print(B + "Saved reverse DNS analysis to " + analysisfile + W)