From 8928365184c578161430e6aa5c4bf36e3b71a952 Mon Sep 17 00:00:00 2001 From: Muhammad Usman Date: Sat, 8 Nov 2025 12:40:55 -0500 Subject: [PATCH] Fix all invalid escape sequence warnings across regex and banner strings --- turbolist3r.py | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/turbolist3r.py b/turbolist3r.py index 480a4c8..2d97312 100644 --- a/turbolist3r.py +++ b/turbolist3r.py @@ -89,7 +89,7 @@ resolver_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'] def banner(): - print("""%s + print(r"""%s _____ _ _ _ _ _____ |_ _|_ _ _ __| |__ ____ | (_)___| |_|___ / _ __ | | | | | | `__| _ \/ \| | / __| __| |_ \| '__| @@ -323,11 +323,11 @@ class GoogleEnum(enumratorBaseThreaded): return def extract_domains(self, resp): - link_regx = re.compile('(.*?)<\/cite>') + link_regx = re.compile(r'(.*?)<\/cite>') try: links_list = link_regx.findall(resp) for link in links_list: - link = re.sub('', '', link) + link = re.sub(r'', '', link) if not link.startswith('http'): link = "http://" + link subdomain = urlparse.urlparse(link).netloc @@ -373,15 +373,15 @@ class YahooEnum(enumratorBaseThreaded): return def extract_domains(self, resp): - link_regx2 = re.compile('(.*?)') - link_regx = re.compile('(.*?)') + link_regx2 = re.compile(r'(.*?)') + link_regx = re.compile(r'(.*?)') links_list = [] try: links = link_regx.findall(resp) links2 = link_regx2.findall(resp) links_list = links + links2 for link in links_list: - link = re.sub("<(\/)?b>", "", link) + link = re.sub(r"<(\/)?b>", "", link) if not link.startswith('http'): link = "http://" + link subdomain = urlparse.urlparse(link).netloc @@ -425,7 +425,7 @@ class AskEnum(enumratorBaseThreaded): return def extract_domains(self, resp): - link_regx = re.compile('(.*?)', re.IGNORECASE) + link_regx = re.compile(r'(.*?)', re.IGNORECASE) try: links_list = link_regx.findall(resp) for link in links_list: @@ -468,15 +468,15 @@ class BingEnum(enumratorBaseThreaded): return def extract_domains(self, resp): - link_regx = re.compile('
  • ||<|>', '', link) + link = re.sub(r'<(\/)?strong>||<|>', '', link) if not link.startswith('http'): link = "http://" + link subdomain = urlparse.urlparse(link).netloc @@ -515,11 +515,11 @@ class BaiduEnum(enumratorBaseThreaded): def extract_domains(self, resp): found_newdomain = False subdomain_list = [] - link_regx = re.compile('(.*?)') + link_regx = re.compile(r'(.*?)') try: links = link_regx.findall(resp) for link in links: - link = re.sub('<.*?>|>|<| ', '', link) + link = re.sub(r'<.*?>|>|<| ', '', link) if not link.startswith('http'): link = "http://" + link subdomain = urlparse.urlparse(link).netloc @@ -580,9 +580,9 @@ class NetcraftEnum(enumratorBaseThreaded): return resp def get_next(self, resp): - link_regx = re.compile('Next page') + link_regx = re.compile(r'Next page') link = link_regx.findall(resp) - link = re.sub('host=.*?%s' % self.domain, 'host=%s' % self.domain, link[0]) + link = re.sub(r'host=.*?%s' % self.domain, 'host=%s' % self.domain, link[0]) url = 'https://searchdns.netcraft.com' + link return url @@ -614,7 +614,7 @@ class NetcraftEnum(enumratorBaseThreaded): url = self.get_next(resp) def extract_domains(self, resp): - link_regx = re.compile('') + link_regx = re.compile(r'') try: links_list = link_regx.findall(resp) for link in links_list: @@ -721,8 +721,8 @@ class DNSdumpster(enumratorBaseThreaded): return self.live_subdomains def extract_domains(self, resp): - tbl_regex = re.compile('<\/a>Host Records.*?(.*?)', re.S) - link_regex = re.compile('(.*?)
    ', re.S) + tbl_regex = re.compile(r'
    <\/a>Host Records.*?(.*?)', re.S) + link_regex = re.compile(r'(.*?)
    ', re.S) links = [] try: results_tbl = tbl_regex.findall(resp)[0] @@ -768,7 +768,7 @@ class Virustotal(enumratorBaseThreaded): return self.subdomains def extract_domains(self, resp): - link_regx = re.compile('
    .*?(.*?)', re.S) + link_regx = re.compile(r'
    .*?(.*?)', re.S) try: links = link_regx.findall(resp) for link in links: @@ -856,7 +856,7 @@ class CrtSearch(enumratorBaseThreaded): return self.subdomains def extract_domains(self, resp): - link_regx = re.compile('(.*?)') + link_regx = re.compile(r'(.*?)') try: links = link_regx.findall(resp) for link in links: @@ -891,7 +891,7 @@ class PassiveDNS(enumratorBaseThreaded): try: resp = session.get(agents_url, headers=self.headers, timeout=self.timeout) agents_list = self.get_response(resp) - agents_regex = re.compile('(.*)') agents = agents_regex.findall(agents_list) ua = random.choice(agents) except Exception as e: @@ -920,7 +920,7 @@ class PassiveDNS(enumratorBaseThreaded): return self.subdomains def extract_domains(self, resp): - link_regx = re.compile('(.*?)') + link_regx = re.compile(r'(.*?)') try: links = link_regx.findall(resp) for link in links: @@ -978,7 +978,7 @@ def main(domain, threads, savefile, ports, silent, verbose, enable_bruteforce, e enable_bruteforce = True # Validate domain - domain_check = re.compile("^(http|https)?[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,}$") + domain_check = re.compile(r"^(http|https)?[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,}$") if not domain_check.match(domain): if not silent: print(R + "Error: Please enter a valid domain" + W)