Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,4 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/
venv_linux/
19 changes: 0 additions & 19 deletions 3-network-health-checker/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions 3-network-health-checker/network_tools/__init__.py

This file was deleted.

141 changes: 141 additions & 0 deletions network_health_checker/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
"""
Network Health Checker - Hálózati diagnosztikai eszközök.

Ez a modul tartalmazza a hálózati monitorozáshoz szükséges eszközöket:
- Ping monitor (ICMP)
- Port scanner (TCP)
- DNS lookup
- Subnet calculator
- SNMP query
- Network info

Használat:
>>> from network_health_checker import ping_host
>>> result = ping_host("8.8.8.8")
>>> print(f"Status: {result.status}, Latency: {result.latency_ms}ms")

CLI használat:
$ python -m network_health_checker ping 8.8.8.8
$ python -m network_health_checker scan 192.168.1.1 -p 22,80,443
$ python -m network_health_checker dns google.com -t MX
"""

__version__ = "1.0.0"
__author__ = "SysAdmin Portfolio"

# Models
from .models import (
ConnectionInfo,
DNSRecord,
HostStatus,
NetworkDevice,
NetworkInterface,
PingResult,
PortScanResult,
SNMPInterface,
SubnetInfo,
)

# Network tools
from .network_tools import (
# Ping
is_host_reachable,
ping_host,
ping_hosts,
# Port scanner
scan_common_ports,
scan_port,
scan_ports,
# DNS
get_mx_records,
get_nameservers,
lookup_all_records,
lookup_dns,
reverse_lookup,
# Subnet
calculate_subnet,
cidr_to_netmask,
get_subnet_hosts,
ip_in_subnet,
is_private_ip,
is_valid_ip,
iterate_subnet_hosts,
netmask_to_cidr,
split_subnet,
# Network info
get_active_connections,
get_default_gateway,
get_fqdn,
get_hostname,
get_interface_by_name,
get_interface_io_counters,
get_listening_ports,
get_local_interfaces,
resolve_hostname,
reverse_resolve,
# SNMP (async)
check_snmp_reachable,
get_interface_stats,
get_interfaces,
get_system_info,
snmp_get,
snmp_get_bulk,
)

__all__ = [
# Version
"__version__",
"__author__",
# Models
"HostStatus",
"PingResult",
"PortScanResult",
"DNSRecord",
"SubnetInfo",
"SNMPInterface",
"NetworkDevice",
"NetworkInterface",
"ConnectionInfo",
# Ping
"ping_host",
"ping_hosts",
"is_host_reachable",
# Port scanner
"scan_port",
"scan_ports",
"scan_common_ports",
# DNS
"lookup_dns",
"lookup_all_records",
"reverse_lookup",
"get_nameservers",
"get_mx_records",
# Subnet
"calculate_subnet",
"ip_in_subnet",
"get_subnet_hosts",
"iterate_subnet_hosts",
"netmask_to_cidr",
"cidr_to_netmask",
"split_subnet",
"is_private_ip",
"is_valid_ip",
# Network info
"get_local_interfaces",
"get_interface_by_name",
"get_default_gateway",
"get_active_connections",
"get_listening_ports",
"get_interface_io_counters",
"get_hostname",
"get_fqdn",
"resolve_hostname",
"reverse_resolve",
# SNMP
"snmp_get",
"snmp_get_bulk",
"get_system_info",
"get_interfaces",
"get_interface_stats",
"check_snmp_reachable",
]
11 changes: 11 additions & 0 deletions network_health_checker/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
Network Health Checker - Package entry point.

Lehetővé teszi a csomag közvetlen futtatását:
python -m network_health_checker [command]
"""

from .cli import main

if __name__ == "__main__":
main()
Loading
Loading