added helper script

This commit is contained in:
john30
2017-08-29 23:19:48 +02:00
parent 45f7f8a753
commit 29cee10ff5
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
port=8888
if [ "x$1" = "x-p" ]; then
shift
port=$1
shift
fi
addr=08
if [ "x$1" = "x-a" ]; then
shift
addr=$1
shift
fi
for (( i=0; i<512; i++ )) ; do
h=`printf "%4.4X" $i`
ret=`echo "hex ${addr}b509030d${h##??}${h%%??}"|nc localhost $port|head -n 1`
echo $i "=" $ret
done