From cc3a5b5cfffbb8e7430030aa66a2981feae7fe85 Mon Sep 17 00:00:00 2001 From: lgandx Date: Sat, 20 Mar 2021 10:22:52 -0300 Subject: [PATCH] added a check for exec file --- Responder.conf | 2 +- settings.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Responder.conf b/Responder.conf index fc17d62..707a085 100644 --- a/Responder.conf +++ b/Responder.conf @@ -80,7 +80,7 @@ Serve-Html = Off HtmlFilename = files/AccessDenied.html ; Custom EXE File to serve -ExeFilename = files/BindShell.exe +ExeFilename = ;files/filetoserve.exe ; Name of the downloaded .exe that the client will see ExeDownloadName = ProxyClient.exe diff --git a/settings.py b/settings.py index 1a5a2b1..414e6dc 100644 --- a/settings.py +++ b/settings.py @@ -142,11 +142,12 @@ class Settings: self.WPAD_Script = config.get('HTTP Server', 'WPADScript') self.HtmlToInject = config.get('HTTP Server', 'HtmlToInject') - if not os.path.exists(self.Html_Filename): - print(utils.color("/!\ Warning: %s: file not found" % self.Html_Filename, 3, 1)) + if self.Serve_Exe is True: + if not os.path.exists(self.Html_Filename): + print(utils.color("/!\ Warning: %s: file not found" % self.Html_Filename, 3, 1)) - if not os.path.exists(self.Exe_Filename): - print(utils.color("/!\ Warning: %s: file not found" % self.Exe_Filename, 3, 1)) + if not os.path.exists(self.Exe_Filename): + print(utils.color("/!\ Warning: %s: file not found" % self.Exe_Filename, 3, 1)) # SSL Options self.SSLKey = config.get('HTTPS Server', 'SSLKey')