mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 20:55:13 +02:00
xt_pknock: replace nemesis by socat
Use a utility much more widely available.
This commit is contained in:
@@ -1,15 +1,6 @@
|
||||
#!/bin/bash
|
||||
# $1 -> IP src
|
||||
# $2 -> IP dst
|
||||
# $3 -> PORT dst
|
||||
# $4 -> secret
|
||||
|
||||
if [ -z $4 ]; then
|
||||
if [ "$#" -ne 4 ]; then
|
||||
echo "usage: $0 <IP src> <IP dst> <PORT dst> <secret>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
digest_file="/tmp/digest.txt"
|
||||
|
||||
python ../test/py/gen_hmac.py $4 $1 > $digest_file
|
||||
nemesis udp -S $1 -D $2 -y $3 -P $digest_file
|
||||
python gen_hmac.py "$4" "$1" | socat - "udp-sendto:$2:$3,bind=$1"
|
||||
|
Reference in New Issue
Block a user