mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-12 16:13:04 -07:00
added support for either resolv.conf or resolvectl
This commit is contained in:
parent
e51f24e36c
commit
1a2f2fdb22
1 changed files with 6 additions and 4 deletions
10
settings.py
10
settings.py
|
@ -335,10 +335,12 @@ class Settings:
|
||||||
NetworkCard = "Error fetching Network Interfaces:", ex
|
NetworkCard = "Error fetching Network Interfaces:", ex
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
DNS = subprocess.check_output(["resolvectl", "status"])
|
p = subprocess.Popen('resolvectl', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError as ex:
|
DNS = p.stdout.read()
|
||||||
DNS = "Error fetching DNS configuration:", ex
|
except:
|
||||||
pass
|
p = subprocess.Popen(['cat', '/etc/resolv.conf'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
DNS = p.stdout.read()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
RoutingInfo = subprocess.check_output(["netstat", "-rn"])
|
RoutingInfo = subprocess.check_output(["netstat", "-rn"])
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue