1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
Description: Fix "SyntaxWarning: invalid escape sequence …"
Closes: #1087102
Author: Sven Geuer <sge@debian.org>
Origin: backport, https://github.com/aboul3la/Sublist3r/pull/412
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087102
Forwarded: not-needed
Last-Update: 2025-12-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/subbrute/subbrute.py
+++ b/subbrute/subbrute.py
@@ -371,7 +371,7 @@
#Return a list of unique sub domains, sorted by frequency.
#Only match domains that have 3 or more sections subdomain.domain.tld
-domain_match = re.compile("([a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*)+")
+domain_match = re.compile(r"([a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*)+")
def extract_subdomains(file_name):
#Avoid re-compilation
global domain_match
--- a/sublist3r.py
+++ b/sublist3r.py
@@ -72,7 +72,7 @@
def banner():
- print("""%s
+ print(r"""%s
____ _ _ _ _ _____
/ ___| _ _| |__ | (_)___| |_|___ / _ __
\___ \| | | | '_ \| | / __| __| |_ \| '__|
@@ -284,7 +284,7 @@
def extract_domains(self, resp):
links_list = list()
- link_regx = re.compile('<cite.*?>(.*?)<\/cite>')
+ link_regx = re.compile(r'<cite.*?>(.*?)<\/cite>')
try:
links_list = link_regx.findall(resp)
for link in links_list:
@@ -341,7 +341,7 @@
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
@@ -437,7 +437,7 @@
links_list = links + links2
for link in links_list:
- link = re.sub('<(\/)?strong>|<span.*?>|<|>', '', link)
+ link = re.sub(r'<(\/)?strong>|<span.*?>|<|>', '', link)
if not link.startswith('http'):
link = "http://" + link
subdomain = urlparse.urlparse(link).netloc
@@ -657,7 +657,7 @@
return self.live_subdomains
def extract_domains(self, resp):
- tbl_regex = re.compile('<a name="hostanchor"><\/a>Host Records.*?<table.*?>(.*?)</table>', re.S)
+ tbl_regex = re.compile(r'<a name="hostanchor"><\/a>Host Records.*?<table.*?>(.*?)</table>', re.S)
link_regex = re.compile('<td class="col-md-4">(.*?)<br>', re.S)
links = []
try:
@@ -902,7 +902,7 @@
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)
|