Skip to content

Commit 0a5101c

Browse files
committed
say that we are ready after framework get loaded.
1 parent 852f6a6 commit 0a5101c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

msfrpcd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,20 @@ require 'msf/ui'
9393

9494
# Fork into the background if requested
9595
begin
96-
if foreground
97-
$stdout.puts "[*] #{rpctype}RPC ready at #{Time.now}."
98-
else
96+
unless foreground
9997
$stderr.puts "[*] #{rpctype}RPC backgrounding at #{Time.now}..."
10098
exit(0) if Process.fork()
10199
end
102100
rescue ::NotImplementedError
103101
$stderr.puts "[-] Background mode is not available on this platform"
102+
foreground = true
104103
end
105104

106105
# Create an instance of the framework
107106
$framework = Msf::Simple::Framework.create(frameworkOpts)
108107

108+
$stdout.puts "[*] #{rpctype}RPC ready at #{Time.now}." if foreground
109+
109110
# Run the plugin instance in the foreground.
110111
begin
111112
$framework.plugins.load("#{rpctype.downcase}rpc", opts).run

0 commit comments

Comments
 (0)