mirror of
https://git.freestone.net/cramer/pcapmirror.git
synced 2026-03-01 09:39:25 +01:00
Compare commits
5 Commits
33237796c2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 580009f48a | |||
| 140c8a6962 | |||
| 5629b0a6d6 | |||
| 075cdbcdd2 | |||
| 25dc160f11 |
16
Makefile
16
Makefile
@@ -20,8 +20,13 @@ TARGET = pcapmirror
|
|||||||
|
|
||||||
# Installation directory
|
# Installation directory
|
||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
ifdef prefix
|
|
||||||
PREFIX = $(prefix)
|
ifndef BINDIR
|
||||||
|
BINDIR = $(DESTDIR)$(PREFIX)/bin
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef MANDIR
|
||||||
|
MANDIR = $(DESTDIR)$(PREFIX)/share/man
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Default rule
|
# Default rule
|
||||||
@@ -47,9 +52,10 @@ clean:
|
|||||||
|
|
||||||
# Install the executable
|
# Install the executable
|
||||||
install: $(TARGET)
|
install: $(TARGET)
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
mkdir -p $(BINDIR)
|
||||||
install -s -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
|
mkdir -p $(MANDIR)/man8
|
||||||
install -D $(TARGET).8 $(DESTDIR)$(PREFIX)/share/man/man8/$(TARGET).8
|
install -s $(TARGET) $(BINDIR)/$(TARGET)
|
||||||
|
install $(TARGET).8 $(MANDIR)/man8/$(TARGET).8
|
||||||
|
|
||||||
|
|
||||||
# Uninstall the executable
|
# Uninstall the executable
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ pcapmirror [options]
|
|||||||
To capture traffic on the eth0 interface, filter for TCP port 80, and send it to the destination, use the following command:
|
To capture traffic on the eth0 interface, filter for TCP port 80, and send it to the destination, use the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo pcapmirror -i eth0 -f "tcp port 80" -r 192.168.1.100 -p 47008 -v
|
sudo pcapmirror -i eth0 -f "tcp port 80" -r 192.168.1.100 -p 37008 -v
|
||||||
```
|
```
|
||||||
*Note*: Running pcapmirror typically requires root privileges due to the use of libpcap for capturing network traffic.
|
*Note*: Running pcapmirror typically requires root privileges due to the use of libpcap for capturing network traffic.
|
||||||
|
|
||||||
@@ -49,6 +49,12 @@ To avoid capturing traffic from your own monitoring machine, configure Wireshark
|
|||||||
|
|
||||||
On the original download location you will also find several prebuilt packages.
|
On the original download location you will also find several prebuilt packages.
|
||||||
|
|
||||||
|
# Install via Homebrew (macos, linux)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install pcapmirror
|
||||||
|
```
|
||||||
|
|
||||||
## Compile and Install
|
## Compile and Install
|
||||||
|
|
||||||
### Supported Operating Systems
|
### Supported Operating Systems
|
||||||
|
|||||||
Reference in New Issue
Block a user