pyconn-monitor


Namepyconn-monitor JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/ParisNeo/pyconn-monitor
SummaryA Python library to monitor and log network connections of untrusted programs
upload_time2024-04-14 20:22:38
maintainerNone
docs_urlNone
authorParisNeo
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyconn-monitor

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python Version](https://img.shields.io/badge/python-3.6+-blue.svg)](https://python.org)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

`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:

```python
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:

```python
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](https://github.com/ParisNeo/pyconn-monitor).

## License

`pyconn-monitor` is licensed under the [Apache License 2.0](https://www.apache.org/licenses/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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ParisNeo/pyconn-monitor",
    "name": "pyconn-monitor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "ParisNeo",
    "author_email": "parisneoai@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/24/f0/589161bd928e1b11cae5db7b7f5156d62aa42f61a7cbcfb720cb3c49728c/pyconn-monitor-0.1.6.tar.gz",
    "platform": null,
    "description": "# pyconn-monitor\r\n\r\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\r\n[![Python Version](https://img.shields.io/badge/python-3.6+-blue.svg)](https://python.org)\r\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\r\n\r\n`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.\r\n\r\n## Why Use pyconn-monitor?\r\n\r\nWhen 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.\r\n\r\n## Features\r\n\r\n- Monitor network connections made by a program or Python script\r\n- Log connection details (timestamp, local and remote addresses, connection status, etc.)\r\n- Support for Windows and Unix-like operating systems\r\n- Command-line interface for easy usage\r\n\r\n## Installation\r\n\r\nYou can install `pyconn-monitor` using pip:\r\n\r\n```\r\npip install pyconn-monitor\r\n```\r\n\r\n## Usage\r\n\r\n### Command-line Interface\r\n\r\nTo monitor a program or Python script, use the `pyconn-monitor` command with the appropriate arguments:\r\n\r\n```\r\npyconn-monitor <program_path> [-l <log_file>] [-p]\r\n```\r\n\r\n- `program_path`: Path to the program or Python script to be monitored.\r\n- `-l`, `--log_file`: Path to the log file where connections will be logged (optional).\r\n- `-p`, `--python`: Indicate that the input is a Python script.\r\n\r\nExample usage:\r\n\r\n```\r\n# Monitor a program and log connections to connections.log\r\npyconn-monitor /path/to/program -l connections.log\r\n\r\n# Monitor a Python script\r\npyconn-monitor /path/to/script.py -p -l connections.log\r\n\r\n# 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\r\npyconn-monitor /path/to/script.py -p -l connections.log -s\r\n\r\n```\r\n\r\n### Python Library\r\n\r\nYou can also use `pyconn-monitor` as a Python library:\r\n\r\n```python\r\nfrom pyconn_monitor import monitor_connections\r\n\r\n# Monitor a program and log connections to connections.log\r\nmonitor_connections(\"/path/to/program\", \"connections.log\")\r\n\r\n# Monitor a Python script\r\nmonitor_connections(\"python /path/to/script.py\", \"connections.log\")\r\n```\r\n\r\nOptionally you can suppress all local connections to vew only remote or unknown connections:\r\n\r\n```python\r\nfrom pyconn_monitor import monitor_connections\r\n\r\n# Monitor a program and log connections to connections.log\r\nmonitor_connections(\"/path/to/program\", \"connections.log\", suppress_local=True)\r\n\r\n# Monitor a Python script\r\nmonitor_connections(\"python /path/to/script.py\", \"connections.log\", suppress_local=True)\r\n```\r\n\r\n## Contributing\r\n\r\nContributions 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](https://github.com/ParisNeo/pyconn-monitor).\r\n\r\n## License\r\n\r\n`pyconn-monitor` is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).\r\n\r\nSee ya!\r\n```\r\n\r\nThis 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.\r\n\r\nFeel free to modify or expand the README as needed to better suit your project's requirements.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library to monitor and log network connections of untrusted programs",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/ParisNeo/pyconn-monitor"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0123ca1934531beb8da0decfd6b88826116fcdff286a74fb086a8408aa858c19",
                "md5": "7ab80105bf63c3ab929a505038c90a12",
                "sha256": "c9991719040969e92c9a40e28a835ab113629560a0b2ade0d9590b91471760e1"
            },
            "downloads": -1,
            "filename": "pyconn_monitor-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7ab80105bf63c3ab929a505038c90a12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10732,
            "upload_time": "2024-04-14T20:22:36",
            "upload_time_iso_8601": "2024-04-14T20:22:36.048905Z",
            "url": "https://files.pythonhosted.org/packages/01/23/ca1934531beb8da0decfd6b88826116fcdff286a74fb086a8408aa858c19/pyconn_monitor-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "24f0589161bd928e1b11cae5db7b7f5156d62aa42f61a7cbcfb720cb3c49728c",
                "md5": "8036b6c75552354a4394354d031126ad",
                "sha256": "98954e2f1e30a71db93b4345dc420054dd960ca4713e0d7c0a96eff707c5ea69"
            },
            "downloads": -1,
            "filename": "pyconn-monitor-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "8036b6c75552354a4394354d031126ad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9736,
            "upload_time": "2024-04-14T20:22:38",
            "upload_time_iso_8601": "2024-04-14T20:22:38.982073Z",
            "url": "https://files.pythonhosted.org/packages/24/f0/589161bd928e1b11cae5db7b7f5156d62aa42f61a7cbcfb720cb3c49728c/pyconn-monitor-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-14 20:22:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ParisNeo",
    "github_project": "pyconn-monitor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pyconn-monitor"
}
        
Elapsed time: 0.20686s