Fix W605 warnings

This commit is contained in:
Shreya 2021-04-05 18:09:38 +05:30
parent 278326e4e4
commit 7bfdc3c7e5
2 changed files with 2 additions and 2 deletions

View File

@ -16,5 +16,5 @@ def get_host_from_network_location(network_location: str) -> str:
def remove_port(url):
parsed = urlparse(url)
with_port = f'{parsed.scheme}://{parsed.netloc}'
without_port = re.sub(':[0-9]+(?=$|\/)', '', with_port)
without_port = re.sub(':[0-9]+(?=$|/)', '', with_port)
return without_port

View File

@ -235,7 +235,7 @@ class WebRCE(HostExploiter):
resp = self.exploit(url, GET_ARCH_LINUX)
if resp:
# Pulls architecture string
arch = re.search('(?<=Architecture:)\s+(\w+)', resp)
arch = re.search(r'(?<=Architecture:)\s+(\w+)', resp)
try:
arch = arch.group(1)
except AttributeError: