Land #6760, llmnr_response TTL fix

bug/bundler_fix 4.11.20
William Vu 2016-04-08 16:45:55 -05:00
commit 8219766538
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ attr_accessor :sock, :thread
register_options([ register_options([
OptAddress.new('SPOOFIP', [ true, "IP address with which to poison responses", ""]), OptAddress.new('SPOOFIP', [ true, "IP address with which to poison responses", ""]),
OptRegexp.new('REGEX', [ true, "Regex applied to the LLMNR Name to determine if spoofed reply is sent", '.*']), OptRegexp.new('REGEX', [ true, "Regex applied to the LLMNR Name to determine if spoofed reply is sent", '.*']),
OptInt.new('TTL', [ false, "Time To Live for the spoofed response", 300]), OptInt.new('TTL', [ false, "Time To Live for the spoofed response", 30]),
]) ])
deregister_options('RHOST', 'PCAPFILE', 'SNAPLEN', 'FILTER') deregister_options('RHOST', 'PCAPFILE', 'SNAPLEN', 'FILTER')
@ -85,7 +85,7 @@ attr_accessor :sock, :thread
when ::Net::DNS::A when ::Net::DNS::A
dns_pkt.answer << ::Net::DNS::RR::A.new( dns_pkt.answer << ::Net::DNS::RR::A.new(
:name => name, :name => name,
:ttl => 30, :ttl => datastore['TTL'],
:cls => ::Net::DNS::IN, :cls => ::Net::DNS::IN,
:type => ::Net::DNS::A, :type => ::Net::DNS::A,
:address => spoof.to_s :address => spoof.to_s
@ -93,7 +93,7 @@ attr_accessor :sock, :thread
when ::Net::DNS::AAAA when ::Net::DNS::AAAA
dns_pkt.answer << ::Net::DNS::RR::AAAA.new( dns_pkt.answer << ::Net::DNS::RR::AAAA.new(
:name => name, :name => name,
:ttl => 30, :ttl => datastore['TTL'],
:cls => ::Net::DNS::IN, :cls => ::Net::DNS::IN,
:type => ::Net::DNS::AAAA, :type => ::Net::DNS::AAAA,
:address => (spoof.ipv6? ? spoof : spoof.ipv4_mapped).to_s :address => (spoof.ipv6? ? spoof : spoof.ipv4_mapped).to_s