Skip to content

Instantly share code, notes, and snippets.

@marvin-marvin
Created December 12, 2022 10:33
Show Gist options
  • Save marvin-marvin/d522facc80493cda28c6dbabaac63101 to your computer and use it in GitHub Desktop.
Save marvin-marvin/d522facc80493cda28c6dbabaac63101 to your computer and use it in GitHub Desktop.
fritz_sniff
nohup ./sniff_lan.sh &
#!/bin/bash
# sniff 2 sensor
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
while true
do
#/usr/sbin/tcpdump -i lbr0 -s0 -nn -w - | /usr/bin/ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@192.168.1.201 "/usr/bin/daemonlogger -R - -o ens224 -t 60 -c 4200000"
#/root/fritz-capture/fritz_capture.py -f https://fritz.box -p PASSWORD -i 1-lan | tcpreplay -i enp0s25 -
#tcpdump -i lo -w - 'tcp and port 12345' | tcpreplay -i eth1 -
#timeout 30 /root/fritz-capture/fritz_capture.py -f https://fritz.box -p PASSWORD -i 1-lan -o 1-lan.pcap
timeout 30 /root/fritz-capture/fritz_capture.py -f https://fritz.box -p PASSWORD -i 1-lan | tcpdump -s0 -nn -r - -w 1-lan.pcap -U
#daemonlogger -R 1-lan.pcap -o lo
tcpreplay -i enp0s25 1-lan.pcap
done
#!/bin/bash
# sniff 2 sensor
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
while true
do
#/usr/sbin/tcpdump -i lbr0 -s0 -nn -w - | /usr/bin/ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@192.168.1.201 "/usr/bin/daemonlogger -R - -o ens224 -t 60 -c 4200000"
#/root/fritz-capture/fritz_capture.py -f https://fritz.box -p PASSWORD -i 1-lan | tcpreplay -i enp0s25 -
#tcpdump -i lo -w - 'tcp and port 12345' | tcpreplay -i eth1 -
timeout 30 /root/fritz-capture/fritz_capture.py -f https://fritz.box -p PASSWORD -i 1-lan | tcpdump -s0 -nn -r - -w 1-lan.pcap -U | tcpreplay -i enp0s25 1-lan.pcap
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment