mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-20 21:33:31 -07:00
Fixes MDNS Name parsing error
This commit is contained in:
parent
a882d397a8
commit
3261288c82
1 changed files with 10 additions and 7 deletions
|
@ -23,12 +23,15 @@ from packets import MDNS_Ans
|
||||||
from utils import *
|
from utils import *
|
||||||
|
|
||||||
def Parse_MDNS_Name(data):
|
def Parse_MDNS_Name(data):
|
||||||
data = data[12:]
|
try:
|
||||||
NameLen = struct.unpack('>B',data[0])[0]
|
data = data[12:]
|
||||||
Name = data[1:1+NameLen]
|
NameLen = struct.unpack('>B',data[0])[0]
|
||||||
NameLen_ = struct.unpack('>B',data[1+NameLen])[0]
|
Name = data[1:1+NameLen]
|
||||||
Name_ = data[1+NameLen:1+NameLen+NameLen_+1]
|
NameLen_ = struct.unpack('>B',data[1+NameLen])[0]
|
||||||
return Name+'.'+Name_
|
Name_ = data[1+NameLen:1+NameLen+NameLen_+1]
|
||||||
|
return Name+'.'+Name_
|
||||||
|
except IndexError:
|
||||||
|
return None
|
||||||
|
|
||||||
def Poisoned_MDNS_Name(data):
|
def Poisoned_MDNS_Name(data):
|
||||||
data = data[12:]
|
data = data[12:]
|
||||||
|
@ -46,7 +49,7 @@ class MDNS(BaseRequestHandler):
|
||||||
Request_Name = Parse_MDNS_Name(data)
|
Request_Name = Parse_MDNS_Name(data)
|
||||||
|
|
||||||
# Break out if we don't want to respond to this host
|
# Break out if we don't want to respond to this host
|
||||||
if RespondToThisHost(self.client_address[0], Request_Name) is not True:
|
if Request_name and RespondToThisHost(self.client_address[0], Request_Name) is not True:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue