File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
spec/lib/metasploit/framework/login_scanner Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 52
52
end
53
53
end
54
54
55
+ context "when invalid IPBoard application" do
56
+ let ( :not_found_warning ) { 'Server nonce not present, potentially not an IP Board install or bad URI.' }
57
+ before :each do
58
+ allow_any_instance_of ( Rex ::Proto ::Http ::Client ) . to receive ( :send_recv ) do |cli , req |
59
+ Rex ::Proto ::Http ::Response . new ( 200 )
60
+ end
61
+ end
62
+
63
+ it 'returns status Metasploit::Model::Login::Status::UNABLE_TO_CONNECT' do
64
+ expect ( subject . attempt_login ( creds ) . status ) . to eq ( Metasploit ::Model ::Login ::Status ::UNABLE_TO_CONNECT )
65
+ end
66
+
67
+ it 'returns proof warning about nonce not found' do
68
+ expect ( subject . attempt_login ( creds ) . proof ) . to eq ( not_found_warning )
69
+ end
70
+ end
71
+
55
72
context "when valid IPBoard application" do
56
73
before :each do
57
74
allow_any_instance_of ( Rex ::Proto ::Http ::Client ) . to receive ( :send_recv ) do |cli , req |
You can’t perform that action at this time.
0 commit comments