mirror of
https://github.com/casterbyte/Sara.git
synced 2026-05-13 23:11:34 +00:00
fix incorrect regex
This commit is contained in:
parent
426e6d7bfc
commit
d4362252a9
1 changed files with 3 additions and 6 deletions
9
sara.py
9
sara.py
|
|
@ -182,18 +182,15 @@ def check_rmi_services(connection):
|
|||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
# skip disabled/default
|
||||
if re.search(r"^\d+\s+X\b", line):
|
||||
# skip disabled (X*) or dynamic (D*) services
|
||||
if re.match(r"^\d+\s+[A-Z]*[XD][A-Z]*\s", line):
|
||||
continue
|
||||
if re.search(r"^\d+\s+D\b", line):
|
||||
continue
|
||||
|
||||
match = re.search(r"(\S+)\s+\d+", line)
|
||||
if not match:
|
||||
continue
|
||||
|
||||
service_name = match.group(1).lower()
|
||||
display_name = service_name.upper().replace("WWW", "HTTP").replace("WWW-SSL", "HTTPS")
|
||||
display_name = service_name.upper().replace("WWW-SSL", "HTTPS").replace("WWW", "HTTP")
|
||||
|
||||
# high risk
|
||||
if service_name in high_risk:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue