Skip to content

Commit 4b4b24b

Browse files
committed
Fix errors printing
1 parent c97cd75 commit 4b4b24b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def check
7676
}
7777
})
7878
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
79-
print_error("#{rhost}:#{rport} - Failed to connect to the web server")
79+
vprint_error("#{peer} - Failed to connect to the web server")
8080
return Exploit::CheckCode::Unknown
8181
end
8282

@@ -109,7 +109,7 @@ def request(cmd)
109109
}
110110
})
111111
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
112-
print_error("#{rhost}:#{rport} - Failed to connect to the web server")
112+
vprint_error("#{peer} - Failed to connect to the web server")
113113
return nil
114114
end
115115
vprint_status("Sent command #{cmd}")
@@ -197,17 +197,17 @@ def exploit
197197
res = request(cmd)
198198

199199
unless res
200-
fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload")
200+
fail_with(Failure::Unknown, "#{peer} - Unable to execute payload")
201201
end
202202

203-
print_status("#{rhost}:#{rport} - Blind Exploitation - unknown exploitation state")
203+
print_status("#{peer} - Blind Exploitation - unknown exploitation state")
204204
return
205205
end
206206

207207
@pl = generate_payload_exe
208208

209209
unless @pl
210-
fail_with(Failure::BadConfig, "#{rhost}:#{rport} - Please set payload before to run exploit.")
210+
fail_with(Failure::BadConfig, "#{peer} - Please set payload before to run exploit.")
211211
return
212212
end
213213

0 commit comments

Comments
 (0)