From 7e6d49bf426466114a96e8594a2c7ffdec602943 Mon Sep 17 00:00:00 2001 From: vflame6 <80809363+vflame6@users.noreply.github.com> Date: Wed, 9 Jul 2025 13:33:07 +0500 Subject: [PATCH] Disabled printing of ignored LLMNR, NBT-NS and MDNS messages in Analyze + Quiet modes --- .gitignore | 4 ++++ poisoners/LLMNR.py | 4 +++- poisoners/MDNS.py | 4 +++- poisoners/NBTNS.py | 4 +++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 238411b..332eb71 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Python artifacts *.pyc +.venv/ # Responder logs *.db @@ -9,3 +10,6 @@ # Generated certificates and keys certs/*.crt certs/*.key + +# IDE +.idea/ diff --git a/poisoners/LLMNR.py b/poisoners/LLMNR.py index 25e020e..204bc6c 100755 --- a/poisoners/LLMNR.py +++ b/poisoners/LLMNR.py @@ -71,7 +71,9 @@ class LLMNR(BaseRequestHandler): # LLMNR Server class if data[2:4] == b'\x00\x00' and LLMNRType: if settings.Config.AnalyzeMode: LineHeader = "[Analyze mode: LLMNR]" - print(color("%s Request by %s for %s, ignoring" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name), 2, 1)) + # Don't print if in Quiet Mode + if not settings.Config.Quite_Mode: + print(color("%s Request by %s for %s, ignoring" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name), 2, 1)) SavePoisonersToDb({ 'Poisoner': 'LLMNR', 'SentToIp': self.client_address[0], diff --git a/poisoners/MDNS.py b/poisoners/MDNS.py index 3ef0c7c..ae57124 100755 --- a/poisoners/MDNS.py +++ b/poisoners/MDNS.py @@ -64,7 +64,9 @@ class MDNS(BaseRequestHandler): return None if settings.Config.AnalyzeMode: # Analyze Mode - print(text('[Analyze mode: MDNS] Request by %-15s for %s, ignoring' % (color(self.client_address[0].replace("::ffff:",""), 3), color(Request_Name, 3)))) + # Don't print if in Quiet Mode + if not settings.Config.Quite_Mode: + print(text('[Analyze mode: MDNS] Request by %-15s for %s, ignoring' % (color(self.client_address[0].replace("::ffff:",""), 3), color(Request_Name, 3)))) SavePoisonersToDb({ 'Poisoner': 'MDNS', 'SentToIp': self.client_address[0], diff --git a/poisoners/NBTNS.py b/poisoners/NBTNS.py index ff3a1cd..491dca3 100755 --- a/poisoners/NBTNS.py +++ b/poisoners/NBTNS.py @@ -36,7 +36,9 @@ class NBTNS(BaseRequestHandler): if data[2:4] == b'\x01\x10': if settings.Config.AnalyzeMode: # Analyze Mode - print(text('[Analyze mode: NBT-NS] Request by %-15s for %s, ignoring' % (color(self.client_address[0].replace("::ffff:",""), 3), color(Name, 3)))) + # Don't print if in Quiet Mode + if not settings.Config.Quite_Mode: + print(text('[Analyze mode: NBT-NS] Request by %-15s for %s, ignoring' % (color(self.client_address[0].replace("::ffff:",""), 3), color(Name, 3)))) SavePoisonersToDb({ 'Poisoner': 'NBT-NS', 'SentToIp': self.client_address[0],