5 Commits

Author SHA1 Message Date
580009f48a readme update 2026-02-13 22:22:04 +01:00
140c8a6962 Fix man 2026-02-12 21:13:00 +01:00
5629b0a6d6 install -D not supported on mac 2026-02-11 14:29:27 +01:00
075cdbcdd2 BINDIR and MANDIR 2026-02-11 14:06:31 +01:00
25dc160f11 HOMEBREW_PREFIX 2026-02-11 12:19:45 +01:00
2 changed files with 18 additions and 6 deletions

View File

@@ -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

View File

@@ -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