fixed the RespondTo/DontRespondTo issue

This commit is contained in:
lgandx 2022-08-05 18:51:57 -03:00
commit 2765ef4e66
3 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ class LLMNR(BaseRequestHandler): # LLMNR Server class
LLMNRType = Parse_IPV6_Addr(data) LLMNRType = Parse_IPV6_Addr(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], Name) is not True: if RespondToThisHost(self.client_address[0].replace("::ffff:",""), Name) is not True:
return None return None
#IPv4 #IPv4
if data[2:4] == b'\x00\x00' and LLMNRType: if data[2:4] == b'\x00\x00' and LLMNRType:
@ -99,4 +99,4 @@ class LLMNR(BaseRequestHandler): # LLMNR Server class
}) })
except: except:
raise pass

View file

@ -57,7 +57,7 @@ class MDNS(BaseRequestHandler):
MDNSType = Parse_IPV6_Addr(data) MDNSType = Parse_IPV6_Addr(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 (not Request_Name) or (RespondToThisHost(self.client_address[0], Request_Name) is not True): if (not Request_Name) or (RespondToThisHost(self.client_address[0].replace("::ffff:",""), Request_Name) is not True):
return None return None
if settings.Config.AnalyzeMode: # Analyze Mode if settings.Config.AnalyzeMode: # Analyze Mode

View file

@ -31,7 +31,7 @@ class NBTNS(BaseRequestHandler):
data, socket = self.request data, socket = self.request
Name = Decode_Name(NetworkRecvBufferPython2or3(data[13:45])) Name = Decode_Name(NetworkRecvBufferPython2or3(data[13:45]))
# 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], Name) is not True: if RespondToThisHost(self.client_address[0].replace("::ffff:",""), Name) is not True:
return None return None
if data[2:4] == b'\x01\x10': if data[2:4] == b'\x01\x10':