mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-21 05:43:35 -07:00
added ip
commands in addition to ifconfig and netstat
This commit is contained in:
parent
0d441d1899
commit
db61f243c9
1 changed files with 12 additions and 6 deletions
18
settings.py
18
settings.py
|
@ -229,9 +229,12 @@ class Settings:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
NetworkCard = subprocess.check_output(["ifconfig", "-a"])
|
NetworkCard = subprocess.check_output(["ifconfig", "-a"])
|
||||||
except subprocess.CalledProcessError as ex:
|
except:
|
||||||
NetworkCard = "Error fetching Network Interfaces:", ex
|
try:
|
||||||
pass
|
NetworkCard = subprocess.check_output(["ip", "address", "show"])
|
||||||
|
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:
|
||||||
|
@ -239,9 +242,12 @@ class Settings:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
RoutingInfo = subprocess.check_output(["netstat", "-rn"])
|
RoutingInfo = subprocess.check_output(["netstat", "-rn"])
|
||||||
except subprocess.CalledProcessError as ex:
|
except:
|
||||||
RoutingInfo = "Error fetching Routing information:", ex
|
try:
|
||||||
pass
|
RoutingInfo = subprocess.check_output(["ip", "route", "show"])
|
||||||
|
except subprocess.CalledProcessError as ex:
|
||||||
|
RoutingInfo = "Error fetching Routing information:", ex
|
||||||
|
pass
|
||||||
|
|
||||||
Message = "Current environment is:\nNetwork Config:\n%s\nDNS Settings:\n%s\nRouting info:\n%s\n\n"%(NetworkCard,DNS,RoutingInfo)
|
Message = "Current environment is:\nNetwork Config:\n%s\nDNS Settings:\n%s\nRouting info:\n%s\n\n"%(NetworkCard,DNS,RoutingInfo)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue