Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure Readme installation section, mention supported Python versions range #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
38 changes: 20 additions & 18 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pmercury

pmercury provides a Python reference implementation for network fingerprinting and advanced analysis techniques. As an example, the code can generate a TLS fingerprint given a network interface or packet capture file, and then leverage the provided fingerprint database to perform process identification.
pmercury is designed to highlight the functionality of the protocol classes and to provide a simple interface into the fingerprint database.

There are four distinct (but related) components:

Expand All @@ -9,15 +10,19 @@ There are four distinct (but related) components:
* ../src/python-inference/* - A Cython port of protocols/tls.pyx that can be called from C++14 or higher code (and is used to perform process inference in mercury)
* ../resources/fingerprint_db.json.gz - The star of the show; a detailed database associating billions of network and endpoint observations

## Installation
## Requirements

On Linux pmercury requires Python>=3.6,<=3.11 with pip3 that can be installed with `sudo apt install python3-pip` on debian/ubuntu, or the equivalent command for your OS.

pmercury depends on libpcap-dev:
and requires libpcap-dev:

```bash
sudo apt-get install libpcap-dev
```

On Linux and Python 3.6 and 3.7, install pmercury with pip:
## Installation

Install pmercury with pip:

```bash
pip3 install pmercury
Expand All @@ -29,33 +34,30 @@ To build cython extensions:
python setup.py build_ext --inplace
```

To install pmercury:
## Build from source

```bash
python setup.py install
sudo apt-get install libpcap-dev
```

## pmercury

pmercury is designed to highlight the functionality of the protocol classes and to provide a simple interface into the fingerprint database.
pmercury needs `/pmercury` directory to exist in the root and be accessible
```bash
sudo mkdir /pmercury
sudo chmod 777 /pmercury
```

To install from sources

### Dependencies
```bash
python setup.py install
```

pmercury requires Python 3.6+ along with the following packages:
mercury has the following Python dependencies installed by `setup.py` script:

```bash
pip3 install pyasn
pip3 install hpack
pip3 install pypcap
pip3 install pyyaml
pip3 install cryptography

pip3 install pyasn hpack pypcap pyyaml cryptography
```

pip3 can be installed with 'sudo apt install python3-pip’ on debian/ubuntu, or the equivalent command for your OS.

### Usage

```bash
Expand Down