1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +01:00

Added try-except for processing grep output

Ensured that errors were handled properly during password enumeration.
This commit is contained in:
Caleb Stewart 2020-09-01 21:59:24 -04:00
parent e76a741add
commit 57809be2ee

View File

@ -69,8 +69,18 @@ def enumerate() -> Generator[FactData, None, None]:
continue
if len(line) < 3:
continue
# Grab the page
path = line[0]
try:
# Grab the line number
lineno = int(line[1])
except ValueError:
# Malformed line from grep, ignore it.
continue
# Grab the content
content = ":".join(line[2:])
password = None