File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/auxiliary/spoof/dns Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def on_dispatch_request(cli,data)
100
100
peer = "#{ cli . ip_daddr } :" << ( cli . is_udp? ? "#{ cli . udp_dst } " : "#{ cli . tcp_dst } " )
101
101
# Deal with non DNS traffic
102
102
begin
103
- req = Packet . encode_net ( data )
103
+ req = Packet . encode_drb ( data )
104
104
rescue => e
105
105
print_error ( "Could not decode payload segment of packet from #{ peer } , check log" )
106
106
dlog e . backtrace
@@ -109,7 +109,7 @@ def on_dispatch_request(cli,data)
109
109
answered = [ ]
110
110
# Find cached items, remove request from forwarded packet
111
111
req . question . each do |ques |
112
- cached = service . cache . find ( ques . qName , ques . qType . to_s )
112
+ cached = service . cache . find ( ques . qname , ques . qtype . to_s )
113
113
if cached . empty?
114
114
next
115
115
else
@@ -154,7 +154,7 @@ def on_send_response(cli,data)
154
154
def sent_info ( cli , data )
155
155
net = Packet . encode_net ( data )
156
156
peer = "#{ cli . ip_daddr } :" << ( cli . is_udp? ? "#{ cli . udp_dst } " : "#{ cli . tcp_dst } " )
157
- asked = net . question . map ( &:qName ) . join ( ', ' )
157
+ asked = net . question . map ( &:qname ) . join ( ', ' )
158
158
vprint_good ( "Sent packet with header:\n #{ cli . inspect } " )
159
159
vprint_good ( "Spoofed records for #{ asked } to #{ peer } " )
160
160
end
You can’t perform that action at this time.
0 commit comments