Skip to content

Commit 9527c6f

Browse files
committed
Ensure all messages are read from external modules
1 parent 3363bcf commit 9527c6f

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

lib/msf/core/module/external.rb

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@ module Msf::Module::External
33

44
def wait_status(mod)
55
begin
6-
while mod.running
7-
m = mod.get_status
8-
if m
9-
case m.method
10-
when :message
11-
log_output(m)
12-
when :report
13-
process_report(m)
14-
when :reply
15-
# we're done
16-
break
17-
end
6+
while m = mod.get_status
7+
case m.method
8+
when :message
9+
log_output(m)
10+
when :report
11+
process_report(m)
12+
when :reply
13+
# we're done
14+
break
1815
end
1916
end
2017
rescue Interrupt => e

lib/msf/core/modules/external/bridge.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def run(datastore)
2626
end
2727

2828
def get_status
29-
if self.running
29+
if self.running || !self.messages.empty?
3030
m = receive_notification
3131
if m.nil?
3232
close_ios
33+
self.messages.close
3334
self.running = false
3435
end
3536

0 commit comments

Comments
 (0)