forked from extern/SSH-Snake
Fix search patterns in Python scripts.
This commit is contained in:
parent
7511505c40
commit
ff698f308d
@ -37,7 +37,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
|
||||
|
||||
prev_dest_host = None
|
||||
|
||||
if ": " in line or "->[" not in line or not line[-1].isdigit():
|
||||
if ": " in line or "]->" not in line or not line[-1].isdigit():
|
||||
continue
|
||||
|
||||
pattern = re.compile(r"(\w+)@(\d+\.\d+\.\d+\.\d+)(\[[^\]]+\])->(?=(\w+)@(\d+\.\d+\.\d+\.\d+))")
|
||||
|
@ -19,7 +19,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
|
||||
line = line.strip()
|
||||
line = re.sub(r"^\[?\d+\]?\s*", "", line)
|
||||
|
||||
if ": " in line or ">" not in line or not line[-2].isdigit() or not line[-1] == ')':
|
||||
if ": " in line or "]->" not in line or not line[-2].isdigit() or not line[-1] == ')':
|
||||
continue
|
||||
|
||||
pattern = re.compile(r"(\w+)@\(([\d\.:]+)\)(\[[^\]]+\])->(?=(\w+)@\(([\d\.:]+)\))")
|
||||
|
@ -37,7 +37,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
|
||||
|
||||
prev_dest_host = None
|
||||
|
||||
if ": " in line or ">" not in line or not line[-1].isdigit():
|
||||
if ": " in line or "]->" not in line or not line[-1].isdigit():
|
||||
continue
|
||||
|
||||
pattern = re.compile(r"(\w+)@(\d+\.\d+\.\d+\.\d+)(\[[^\]]+\])->(?=(\w+)@(\d+\.\d+\.\d+\.\d+))")
|
||||
|
@ -46,7 +46,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
|
||||
|
||||
prev_dest_host = None
|
||||
|
||||
if ":" in line or ">" not in line or not line[-1].isdigit():
|
||||
if ": " in line or "]->" not in line or not line[-1].isdigit():
|
||||
continue
|
||||
|
||||
pattern = re.compile(r"(\w+)@(\d+\.\d+\.\d+\.\d+)(\[[^\]]+\])->(?=(\w+)@(\d+\.\d+\.\d+\.\d+))")
|
||||
|
Loading…
Reference in New Issue
Block a user