Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.1.1 & Your IP : 3.142.43.53
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
landscape /
sysinfo /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
__init__.py
0
B
-rw-r--r--
2023-02-07 18:55
deployment.py
4.86
KB
-rw-r--r--
2023-02-07 18:55
disk.py
2.52
KB
-rw-r--r--
2023-02-07 18:55
landscapelink.py
336
B
-rw-r--r--
2023-02-07 18:55
load.py
287
B
-rw-r--r--
2023-02-07 18:55
loggedinusers.py
497
B
-rw-r--r--
2023-02-07 18:55
memory.py
606
B
-rw-r--r--
2023-02-07 18:55
network.py
1.66
KB
-rw-r--r--
2023-02-07 18:55
processes.py
896
B
-rw-r--r--
2023-02-07 18:55
sysinfo.py
9.67
KB
-rw-r--r--
2023-02-07 18:55
temperature.py
806
B
-rw-r--r--
2023-02-07 18:55
testplugin.py
541
B
-rw-r--r--
2023-02-07 18:55
Save
Rename
from functools import partial from operator import itemgetter from netifaces import AF_INET, AF_INET6 from twisted.internet.defer import succeed from landscape.lib.network import get_active_device_info class Network(object): """Show information about active network interfaces. @param get_device_info: Optionally, a function that returns information about network interfaces. Defaults to L{get_active_device_info}. """ def __init__(self, get_device_info=None): if get_device_info is None: get_device_info = partial(get_active_device_info, extended=True, default_only=True) self._get_device_info = get_device_info def register(self, sysinfo): """Register this plugin with the sysinfo system. @param sysinfo: The sysinfo registry. """ self._sysinfo = sysinfo def run(self): """ Gather information about network interfaces and write it to the sysinfo output. @return: A succeeded C{Deferred}. """ device_info = self._get_device_info() for info in sorted(device_info, key=itemgetter('interface')): interface = info["interface"] ipv4_addresses = info["ip_addresses"].get(AF_INET, []) ipv6_addresses = info["ip_addresses"].get(AF_INET6, []) for addr in ipv4_addresses: self._sysinfo.add_header( "IPv4 address for %s" % interface, addr['addr']) for addr in ipv6_addresses: self._sysinfo.add_header( "IPv6 address for %s" % interface, addr['addr']) return succeed(None)