mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-27 19:04:15 +01:00
Added try-except for processing grep output
Ensured that errors were handled properly during password enumeration.
This commit is contained in:
parent
e76a741add
commit
57809be2ee
@ -69,8 +69,18 @@ def enumerate() -> Generator[FactData, None, None]:
|
|||||||
continue
|
continue
|
||||||
if len(line) < 3:
|
if len(line) < 3:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Grab the page
|
||||||
path = line[0]
|
path = line[0]
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Grab the line number
|
||||||
lineno = int(line[1])
|
lineno = int(line[1])
|
||||||
|
except ValueError:
|
||||||
|
# Malformed line from grep, ignore it.
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Grab the content
|
||||||
content = ":".join(line[2:])
|
content = ":".join(line[2:])
|
||||||
|
|
||||||
password = None
|
password = None
|
||||||
|
Loading…
Reference in New Issue
Block a user