Skip to main content
# pyort
Command line tool for monitoring and logging all foreign network connections. Best way to use this tool is along with other network monitoring tools such as `iftop`

## Installation (python 2.7 or higher)
`pip install pyort`
or
`pip install git+https://github.com/Gananath/pyort.git`
or
`python3.5 -m pip install pyort`


## Usage

###### Monitoring and Logging
Help: `pyort -h`

Start: `pyort --start`

Save: `pyort -s -Sv` (need to install sqlite manually)

Custom: `pyort -s --kind tcp6`

Silent: `pyort -s -Sv -x`

###### Database viewing
Incidence = `pyort -d -l 100`

Ip = `pyort -d -o ip -c xxx.xxx.xxx.xxx`

## Configuration
`config.ini` and database files exists in the directory `$HOME/.config/pyort`.
```
db_path = database path
db_name = database name
interval = time interval for updating ip's
kind = kind of connections all,tcp,udp etc
geo_ip = for getting geo location info
project_honey_pot_key = projecthoneypot.org's api key
threat_update_count = interval for updating the threat score from projecthoneypot.org
table_format = organize the output table
version = show the version number
```
###### table_format
```
+--------+-------------+-------------------------------------------------------------------+
| Code | Name | Description |
+--------+-------------+-------------------------------------------------------------------+
| r | Recent | Will show the date if database enabled |
| l | Local | Local IP |
| p | L Port | Port used by the local IP |
| f | Foregin | Remote IP |
| fp | F Port | Port used by the remote IP |
| pid | PID | Process ID associated with the connections |
| t | Threat | Project honey pot's threat score |
| c | Count | Number of times remote ip tried to connect (only with db enabled) |
| p | Process | Process associated with the connections |
| loc | Location | Geo location of the remote ip (need Maxmind's GeoIP) |
| fd | File Desc | File Descriptor (refer psutil documentation) |
| fam | Family | Address family (refer psutil documentation) |
| typ | Type | Address Type (refer psutil documentation) |
| sc | Status | Connection establishment status |
+--------+-------------+-------------------------------------------------------------------+
```
## Optional

###### Database
You can save the logs in a sqlite database and the `--save` option only works with sqlite installed. You can install sqlite by `pip install pysqlite` for pyhton 2.7.

###### Project Honey pot
If wanted you can also get [project honey pot's](https://www.projecthoneypot.org/) threat score for foreign ip's but needs project honey pot's api key and `pip install httpbl` then add api key to `config.ini` without quotes. This only works when `--save` option is enabled.

###### Maxmind's GeoIP
If you needed the geo location of foreign ip's first install `pip install geoip2` then in the `config.ini` file change `geo_ip =` to `geo_ip = True` without quotes.

## Notice
If anything goes wrong to pyort afer updating to a newer version of pyort then try to delete the config and database files inside `$HOME/.config/pyort/` and then reinstall the new version.

Metadata

Release files for pyort 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyort 0.1.8
File Size Uploaded Provenance Actions
pyort-0.1.8.tar.gz 8.7 kB Without provenance Details for pyort-0.1.8.tar.gz

Release files / pyort-0.1.8.tar.gz

Download URL pyort-0.1.8.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6d715ace96720723dca7571b1bc4ceb4c4faf41be343dbf057731505db38fee6
BLAKE2b-256 checksum
How to use checksums
830c9b3b98d63671bc0facf34472fee8bed2e319eca2125d27bdc9f93edf6b50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/36.2.7 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.12

Security for pyort 0.1.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page