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.
This commit is contained in:
Ricardo Iramar dos Santos 2019-11-26 10:54:27 -03:00 committed by GitHub
commit f12b36adeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -233,9 +233,12 @@ class Settings:
except: except:
try: try:
NetworkCard = subprocess.check_output(["ip", "address", "show"]) NetworkCard = subprocess.check_output(["ip", "address", "show"])
except subprocess.CalledProcessError as ex: except:
NetworkCard = "Error fetching Network Interfaces:", ex try:
pass NetworkCard = subprocess.check_output(["ipconfig"])
except subprocess.CalledProcessError as ex:
NetworkCard = "Error fetching Network Interfaces:", ex
pass
try: try:
DNS = subprocess.check_output(["cat", "/etc/resolv.conf"]) DNS = subprocess.check_output(["cat", "/etc/resolv.conf"])
except subprocess.CalledProcessError as ex: except subprocess.CalledProcessError as ex: