File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
modules/auxiliary/scanner Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ module Auxiliary::UDPScanner
13
13
# A hash of results of a given batch run, keyed by host
14
14
attr_accessor :results
15
15
16
- # A probe to be sent to each host
17
- attr_accessor :probe
18
-
19
16
#
20
17
# Initializes an instance of an auxiliary module that scans UDP
21
18
#
@@ -174,9 +171,13 @@ def rport
174
171
# The including module may override some of these methods
175
172
#
176
173
174
+ # Builds and returns the probe to be sent
175
+ def build_probe
176
+ end
177
+
177
178
# Called for each IP in the batch. This will send all necessary probes.
178
179
def scan_host ( ip )
179
- scanner_send ( @probe , ip , rport )
180
+ scanner_send ( build_probe , ip , rport )
180
181
end
181
182
182
183
# Called for each response packet
Original file line number Diff line number Diff line change @@ -48,9 +48,11 @@ def setup
48
48
super
49
49
# TODO: do any sort of preliminary sanity checking, like perhaps validating some options
50
50
# in the datastore, etc.
51
+ end
51
52
52
- # TODO: build the appropriate probe here
53
- @probe = 'abracadabra!'
53
+ # TODO: construct the appropriate probe here.
54
+ def build_probe
55
+ @probe ||= 'abracadabra!'
54
56
end
55
57
56
58
# TODO: this is called before the scan block for each batch of hosts. Do any
You can’t perform that action at this time.
0 commit comments