Skip to content

Commit 84f4fa5

Browse files
committed
Updated module based on feedback
1 parent 3918acb commit 84f4fa5

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

modules/auxiliary/scanner/http/ipboard_login.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
require 'rex/proto/http'
32
require 'msf/core'
43

54
class Metasploit3 < Msf::Auxiliary
@@ -16,7 +15,7 @@ def initialize
1615
This module attempts to validate user provided credentials against
1716
an IP Board web application.
1817
},
19-
'Author' => 'Christopher Truncer @ChrisTruncer',
18+
'Author' => 'Christopher Truncer [email protected]',
2019
'License' => MSF_LICENSE
2120
)
2221

@@ -52,7 +51,7 @@ def do_login(user, pass, ip)
5251
'method' => 'GET',
5352
}, 10)
5453

55-
if not res
54+
unless res
5655
print_error "No response when trying to connect to #{rhost_or_vhost}"
5756
return :connection_error
5857
end
@@ -72,9 +71,9 @@ def do_login(user, pass, ip)
7271
'uri' => normalize_uri(target_uri.path, "index.php?app=core&module=global&section=login&do=process"),
7372
'method' => 'POST',
7473
'vars_post' => {
75-
'auth_key' => "#{server_nonce}",
76-
'ips_username' => "#{user}",
77-
'ips_password' => "#{pass}",
74+
'auth_key' => server_nonce,
75+
'ips_username' => user,
76+
'ips_password' => pass,
7877
}
7978
})
8079

@@ -84,10 +83,9 @@ def do_login(user, pass, ip)
8483
# Iterate over header response. If the server is setting the ipsconnect and coppa cookie
8584
# then we were able to log in successfully. If they are not set, invalid credentials were
8685
# provided.
87-
res2.headers.each do |key, value|
88-
if key.include? "Set-Cookie" and value.include? "ipsconnect" and value.include? "coppa"
89-
valid_creds = true
90-
end
86+
87+
if res2.get_cookies.include?('ipsconnect') && res2.get_cookies.include?('coppa')
88+
valid_creds = true
9189
end
9290

9391
# Inform the user if the user supplied credentials were valid or not

0 commit comments

Comments
 (0)