mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-06 04:51:23 -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
|
||||
pass
|
||||
try:
|
||||
DNS = subprocess.check_output(["resolvectl", "status"])
|
||||
except subprocess.CalledProcessError as ex:
|
||||
DNS = "Error fetching DNS configuration:", ex
|
||||
pass
|
||||
p = subprocess.Popen('resolvectl', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
DNS = p.stdout.read()
|
||||
except:
|
||||
p = subprocess.Popen(['cat', '/etc/resolv.conf'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
DNS = p.stdout.read()
|
||||
|
||||
try:
|
||||
RoutingInfo = subprocess.check_output(["netstat", "-rn"])
|
||||
except:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue