Skip to content

Commit

Permalink
Update deprecated method call in modicon_password_recovery module
Browse files Browse the repository at this point in the history
  • Loading branch information
errorxyz committed Sep 23, 2023
1 parent 9c02331 commit d9f89ad
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions modules/auxiliary/admin/scada/modicon_password_recovery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,25 @@ def grab
if httpcreds
httpuser = httpcreds[1].split(/[\r\n]+/)[0]
httppass = httpcreds[1].split(/[\r\n]+/)[1]
proof = "FTP PASV data socket: #{httpcreds}"
else
# Usual defaults
httpuser = "USER"
httppass = "USER"
proof = "Usual defaults"
end
print_status("#{rhost}:#{rport} - FTP - Storing HTTP credentials")
logins << ["http", httpuser, httppass]
report_auth_info(
:host => ip,
:port => 80,
:sname => "http",
:user => httpuser,
:pass => httppass,
:active => true

report_cred(
:ip => ip,
:port => 80,
:service_name => 'http',
:user => httpuser,
:password => httppass,
:proof => proof
)

logins << ["scada-write", "", writecreds[1]]
if writecreds # This is like an enable password, used after HTTP authentication.
report_note(
Expand Down

0 comments on commit d9f89ad

Please sign in to comment.