Skip to content

Commit 752ae33

Browse files
author
HD Moore
committed
Minor tweak (kill useless variable, fix gsub)
1 parent 99ab722 commit 752ae33

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/msf/core/auxiliary/udp_scanner.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,12 @@ def scanner_recv(timeout=0.1)
118118
next if not (res[0] and res[0].length > 0)
119119

120120
# Trim the IPv6-compat prefix off if needed
121-
shost = res[1].gsub(/^::ffff:/, '')
122-
123-
# Store the source port
124-
sport = res[2]
121+
shost = res[1].sub(/^::ffff:/, '')
125122

126123
# Ignore the response if we have a boundary
127124
next unless inside_workspace_boundary?(shost)
128125

129-
queue << [res[0], shost, sport]
126+
queue << [res[0], shost, res[2]]
130127

131128
if queue.length > datastore['ScannerRecvQueueLimit']
132129
break

0 commit comments

Comments
 (0)