Skip to content

Commit 45d219c

Browse files
committed
Land rapid7#4102, @jhart-r7's fix for nbns_response
* Use request src_port instead of 137
2 parents 286827c + 9238d80 commit 45d219c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/auxiliary/spoof/nbns/nbns_response.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def run
6767

6868
while @run # Not exactly thrilled we can never turn this off XXX fix this sometime.
6969
packet, addr = @sock.recvfrom(512)
70+
src_port = addr[1]
7071
rhost = addr[3]
7172

7273
break if packet.length == 0
@@ -127,7 +128,7 @@ def run
127128
p.ip_daddr = rhost
128129
p.ip_ttl = 255
129130
p.udp_sport = 137
130-
p.udp_dport = 137
131+
p.udp_dport = src_port
131132
p.payload = response
132133
p.recalc
133134

0 commit comments

Comments
 (0)