pyconn-monitor
pyconn-monitor is a Python library and command-line tool that helps you monitor and log network connections made by untrusted programs or Python scripts. It can be useful for identifying potential data leaks or unauthorized communication with remote servers.
Why Use pyconn-monitor?
When running untrusted or third-party programs on your system, it's essential to ensure that they're not secretly leaking sensitive data or establishing unauthorized connections with remote servers. pyconn-monitor provides a way to monitor and log all network connections made by a program or Python script, allowing you to identify and investigate any suspicious activity.
Features
- Monitor network connections made by a program or Python script
- Log connection details (timestamp, local and remote addresses, connection status, etc.)
- Support for Windows and Unix-like operating systems
- Command-line interface for easy usage
Installation
You can install pyconn-monitor using pip:
pip install pyconn-monitor
Usage
Command-line Interface
To monitor a program or Python script, use the pyconn-monitor command with the appropriate arguments:
pyconn-monitor <program_path> [-l <log_file>] [-p]
program_path: Path to the program or Python script to be monitored.-l,--log_file: Path to the log file where connections will be logged (optional).-p,--python: Indicate that the input is a Python script.
Example usage:
# Monitor a program and log connections to connections.log
pyconn-monitor /path/to/program -l connections.log
# Monitor a Python script
pyconn-monitor /path/to/script.py -p -l connections.log
# You can use --suppress-local option or -s to remove local connections logging which may be useful to reduce the number of logged entries if your objective is to view external connections
pyconn-monitor /path/to/script.py -p -l connections.log -s
Python Library
You can also use pyconn-monitor as a Python library:
from pyconn_monitor import monitor_connections
# Monitor a program and log connections to connections.log
monitor_connections("/path/to/program", "connections.log")
# Monitor a Python script
monitor_connections("python /path/to/script.py", "connections.log")
Optionally you can suppress all local connections to vew only remote or unknown connections:
from pyconn_monitor import monitor_connections
# Monitor a program and log connections to connections.log
monitor_connections("/path/to/program", "connections.log", suppress_local=True)
# Monitor a Python script
monitor_connections("python /path/to/script.py", "connections.log", suppress_local=True)
Contributing
Contributions to pyconn-monitor are welcome! If you find any issues or have ideas for improvements, please open an issue or submit a pull request on the GitHub repository.
License
pyconn-monitor is licensed under the Apache License 2.0.
See ya!
This README provides an overview of the `pyconn-monitor` application, its purpose, features, installation instructions, usage examples (both for the command-line tool and Python library), contribution guidelines, and license information.
Feel free to modify or expand the README as needed to better suit your project's requirements.
Metadata
Release files for pyconn-monitor 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyconn-monitor-0.1.6.tar.gz | 9.7 kB | Without provenance | Details for pyconn-monitor-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyconn_monitor-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for pyconn_monitor-0.1.6-py3-none-any.whl |
Total release size: 20.5 kB
Release files / pyconn-monitor-0.1.6.tar.gz
| Download URL | pyconn-monitor-0.1.6.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98954e2f1e30a71db93b4345dc420054dd960ca4713e0d7c0a96eff707c5ea69
|
|
BLAKE2b-256 checksum How to use checksums |
24f0589161bd928e1b11cae5db7b7f5156d62aa42f61a7cbcfb720cb3c49728c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Release files / pyconn_monitor-0.1.6-py3-none-any.whl
| Download URL | pyconn_monitor-0.1.6-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9991719040969e92c9a40e28a835ab113629560a0b2ade0d9590b91471760e1
|
|
BLAKE2b-256 checksum How to use checksums |
0123ca1934531beb8da0decfd6b88826116fcdff286a74fb086a8408aa858c19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Security for pyconn-monitor 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.