Skip to content

Commit 9a08090

Browse files
author
Tod Beardsley
committed
Inch toward making modules more testable
1 parent d4e9431 commit 9a08090

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/msf/core/exploit/capture.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module Msf
1313
#
1414
###
1515

16-
module Exploit::Capture
16+
class Exploit
17+
module Capture
1718

1819
#
1920
# Initializes an instance of an exploit module that captures traffic
@@ -555,3 +556,5 @@ def capture_icmp_echo_unpack(data)
555556
end
556557

557558
end
559+
560+
end

lib/msf/core/module.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def replicant
179179
#
180180

181181
def print_prefix
182-
if(
182+
if framework && (
183183
datastore['TimestampOutput'] =~ /^(t|y|1)/i or
184184
framework.datastore['TimestampOutput'] =~ /^(t|y|1)/i
185185
)
@@ -192,8 +192,9 @@ def print_prefix
192192
end
193193

194194
return prefix
195+
else
196+
return ''
195197
end
196-
''
197198
end
198199

199200
def print_status(msg='')

0 commit comments

Comments
 (0)