Metadata-Version: 2.4
Name: pysecnet
Version: 1.0.0
Summary: Lightweight zero-dependency Python library for network engineers
Author-email: Valentino Saputra <vtino17@pm.me>
License: MIT
Project-URL: Homepage, https://github.com/vtino17/pysecnet
Project-URL: Repository, https://github.com/vtino17/pysecnet
Keywords: networking,network-tools,subnet,ping,dns,port-scanning
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Networking
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# pysecnet

Lightweight Python networking toolkit. Zero dependencies. Standard library only.

## Installation

```bash
pip install pysecnet
```

## Modules

### subnet - Subnet Calculations
```python
from pysecnet.subnet import cidr_to_mask, mask_to_cidr, subnet_info

cidr_to_mask(24)          # '255.255.255.0'
mask_to_cidr("255.255.255.0")  # 24
subnet_info("192.168.1.100", 24)
# {'network': '192.168.1.0', 'broadcast': '192.168.1.255',
#  'mask': '255.255.255.0', 'prefix': 24, 'usable_count': 254, ...}
```

### port - Port Scanning
```python
from pysecnet.port import check_port, service_name, scan_range

check_port("example.com", 80)       # True if open
service_name(443)                   # 'HTTPS'
scan_range("192.168.1.1", 1, 1024)  # [(port, service), ...]
```

### dns - DNS Lookups
```python
from pysecnet.dns import resolve_a, reverse_lookup, resolve

resolve_a("example.com")        # ['93.184.216.34']
reverse_lookup("8.8.8.8")       # 'dns.google'
resolve("example.com")          # '93.184.216.34'
```

### ping - ICMP Ping
```python
from pysecnet.ping import ping, ping_ok

result = ping("8.8.8.8")
# {'alive': True, 'avg_rtt': 12.5, 'packet_loss': 0.0, ...}

ping_ok("8.8.8.8")  # True
```

### mac - MAC Address Utilities
```python
from pysecnet.mac import validate, vendor, is_multicast

validate("00:11:22:aa:bb:cc")       # '00:11:22:aa:bb:cc'
vendor("00:0C:29:AA:BB:CC")         # 'VMware'
is_multicast("01:00:5E:00:00:01")   # True
```

### http - HTTP/SSL Utilities
```python
from pysecnet.http import get_headers, status_code, ssl_info

get_headers("https://example.com")  # {'status_code': 200, 'server': '...', ...}
status_code("https://example.com")  # 200
ssl_info("example.com")             # {'subject': '...', 'issuer': '...', ...}
```

### utils - Validation Utilities
```python
from pysecnet.utils import validate_ip, parse_cidr, is_private_ip

validate_ip("192.168.1.1")       # True
parse_cidr("10.0.0.0/24")        # ('10.0.0.0', 24)
is_private_ip("10.0.0.1")        # True
```

## License

MIT

