This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhuzhenjun-libosfp/README.md

26 lines
524 B
Markdown
Raw Normal View History

2023-09-13 09:24:11 +00:00
# libosfp
2023-10-09 15:23:31 +08:00
Libosfp is a C library for OS fingerprinting.
2023-09-13 09:24:11 +00:00
2023-09-27 15:43:32 +08:00
## install
2023-10-09 15:23:31 +08:00
2023-09-27 15:43:32 +08:00
```
# osfp_example depends on libpcap
yum install -y libpcap-devel
2023-10-12 15:05:58 +08:00
BUILD_TYPE=Debug PACKAGE=1 ./ci/travis.sh
yum install -y ./build/*.rpm
2023-09-27 15:43:32 +08:00
```
2023-10-09 15:30:06 +08:00
## library usage
```
gcc -I./src example/sample.c -o sample -L./build -losfp; cat example/sample.c
2023-10-12 15:05:58 +08:00
LD_LIBRARY_PATH=${PWD}/build ./sample
2023-10-09 15:30:06 +08:00
```
2023-09-27 15:43:32 +08:00
## run example
```
2023-10-09 15:23:31 +08:00
# load the fingerprint file and capture on eth0, filter tcp port 8888
./build/osfp_example -f /var/lib/MESA_osfp/fp.json -i eth0 "tcp port 8888"
2023-09-27 15:43:32 +08:00
```