File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
modules/auxiliary/scanner/msf Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class Metasploit3 < Msf::Auxiliary
15
15
16
16
def initialize
17
17
super (
18
- 'Name' => 'Metasploit RPC interface Login Utility' ,
18
+ 'Name' => 'Metasploit RPC Interface Login Utility' ,
19
19
'Description' => %q{
20
20
This module simply attempts to login to a
21
21
Metasploit RPC interface using a specific
@@ -36,21 +36,29 @@ def initialize
36
36
37
37
end
38
38
39
+ @@loaded_msfrpc
40
+ begin
41
+ require 'msf/core/rpc/v10/client'
42
+ @@loaded_msfrpc = true
43
+ rescue LoadError
44
+ end
45
+
39
46
def run_host ( ip )
40
- begin
41
- require 'msf/core/rpc/v10/client'
42
- rescue LoadError
47
+
48
+ unless @@loaded_msfrpc
43
49
print_error ( "You don't have 'msgpack', please install that gem manually." )
44
50
return
45
51
end
46
52
47
53
begin
48
54
@rpc = Msf ::RPC ::Client . new (
49
- :host => datastore [ 'rhost ' ] ,
50
- :port => datastore [ 'rport ' ] ,
55
+ :host => datastore [ 'RHOST ' ] ,
56
+ :port => datastore [ 'RPORT ' ] ,
51
57
:ssl => datastore [ 'SSL' ]
52
58
)
53
- rescue => e
59
+ rescue ::Interrupt
60
+ raise $!
61
+ rescue ::Exception => e
54
62
vprint_error ( "#{ datastore [ 'SSL' ] . to_s } Cannot create RPC client : #{ e . to_s } " )
55
63
return
56
64
end
You can’t perform that action at this time.
0 commit comments