Skip to content

Commit cdd9eb1

Browse files
committed
Licence Changed. Return added when RHOST is nil
1 parent eca8555 commit cdd9eb1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

modules/post/windows/manage/rpcapd_start.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize(info={})
2929
the service in passive or active mode (useful if the client is behind a firewall).
3030
If authentication is enabled you need a local user account to capture traffic.
3131
PORT will be used depending of the mode configured.},
32-
'License' => BSD_LICENSE,
32+
'License' => MSF_LICENSE,
3333
'Author' => [ 'Borja Merino <bmerinofe[at]gmail.com>'],
3434
'Platform' => [ 'windows' ],
3535
'SessionTypes' => [ 'meterpreter' ]
@@ -60,9 +60,13 @@ def run
6060
service_change_startup("rpcapd","auto")
6161
end
6262
if datastore['ACTIVE']==true
63-
print_error("RHOST is not set ") if datastore['RHOST']==nil
64-
p = prog << " -d -a #{datastore['RHOST']},#{datastore['PORT']} -v "
65-
print_status("Installing rpcap in ACTIVE mode (remote port: #{datastore['PORT']})")
63+
if datastore['RHOST']==nil
64+
print_error("RHOST is not set ")
65+
return
66+
else
67+
p = prog << " -d -a #{datastore['RHOST']},#{datastore['PORT']} -v "
68+
print_status("Installing rpcap in ACTIVE mode (remote port: #{datastore['PORT']})")
69+
end
6670
else
6771
fw_enable(prog)
6872
print_status("Installing rpcap in PASSIVE mode (local port: #{datastore['PORT']}) ")

0 commit comments

Comments
 (0)