Skip to content

Commit 0778f5a

Browse files
committed
Restructure Readme installation section, mention supported Python versions range
1 parent 1c1637a commit 0778f5a

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

python/README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# pmercury
22

33
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.
4+
pmercury is designed to highlight the functionality of the protocol classes and to provide a simple interface into the fingerprint database.
45

56
There are four distinct (but related) components:
67

@@ -9,15 +10,19 @@ There are four distinct (but related) components:
910
* ../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)
1011
* ../resources/fingerprint_db.json.gz - The star of the show; a detailed database associating billions of network and endpoint observations
1112

12-
## Installation
13+
## Requirements
14+
15+
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.
1316

14-
pmercury depends on libpcap-dev:
17+
and requires libpcap-dev:
1518

1619
```bash
1720
sudo apt-get install libpcap-dev
1821
```
1922

20-
On Linux and Python 3.6 and 3.7, install pmercury with pip:
23+
## Installation
24+
25+
Install pmercury with pip:
2126

2227
```bash
2328
pip3 install pmercury
@@ -29,33 +34,30 @@ To build cython extensions:
2934
python setup.py build_ext --inplace
3035
```
3136

32-
To install pmercury:
37+
## Build from source
3338

3439
```bash
35-
python setup.py install
40+
sudo apt-get install libpcap-dev
3641
```
3742

38-
## pmercury
39-
40-
pmercury is designed to highlight the functionality of the protocol classes and to provide a simple interface into the fingerprint database.
43+
pmercury needs `/pmercury` directory to exist in the root and be accessible
44+
```bash
45+
sudo mkdir /pmercury
46+
sudo chmod 777 /pmercury
47+
```
4148

49+
To install from sources
4250

43-
### Dependencies
51+
```bash
52+
python setup.py install
53+
```
4454

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

4757
```bash
48-
pip3 install pyasn
49-
pip3 install hpack
50-
pip3 install pypcap
51-
pip3 install pyyaml
52-
pip3 install cryptography
53-
5458
pip3 install pyasn hpack pypcap pyyaml cryptography
5559
```
5660

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

6163
```bash

0 commit comments

Comments
 (0)