From f12b36adeb1d034c6b606322d97d9163990c6caf Mon Sep 17 00:00:00 2001 From: Ricardo Iramar dos Santos Date: Tue, 26 Nov 2019 10:54:27 -0300 Subject: [PATCH] Cygwin Support Added ipconfig in case of Cygwin users. There is also another change requirement about the root validation. There is no root user on Cygwin so I changed the id 0 to my own user id. Maybe the solution would be check if Responder is running under Cygwin. Need to elaborate this better. --- settings.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/settings.py b/settings.py index 7083d22..6cb7dd5 100644 --- a/settings.py +++ b/settings.py @@ -233,9 +233,12 @@ class Settings: except: try: NetworkCard = subprocess.check_output(["ip", "address", "show"]) - except subprocess.CalledProcessError as ex: - NetworkCard = "Error fetching Network Interfaces:", ex - pass + except: + try: + NetworkCard = subprocess.check_output(["ipconfig"]) + except subprocess.CalledProcessError as ex: + NetworkCard = "Error fetching Network Interfaces:", ex + pass try: DNS = subprocess.check_output(["cat", "/etc/resolv.conf"]) except subprocess.CalledProcessError as ex: