aboutsummaryrefslogtreecommitdiff
path: root/tools/hex.sh
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-10-10 20:01:38 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-10-10 20:01:38 +1300
commit0078b360e1d39981c941501c1dfa80b5f2d86d21 (patch)
treee9b33ba9a0b60e30c7887061262b0e3cdb5b838e /tools/hex.sh
parent4f5f815f88e81000510ef2544e3e392fd7465d8e (diff)
parent7b74b287358d09d12908f1cfef53d0eda271b0f9 (diff)
downloadtrackermap-server-0078b360e1d39981c941501c1dfa80b5f2d86d21.tar.gz
trackermap-server-0078b360e1d39981c941501c1dfa80b5f2d86d21.tar.bz2
trackermap-server-0078b360e1d39981c941501c1dfa80b5f2d86d21.zip
Merge pull request #911 from jon-stumpf/enhancement-update-tools
Update scripts in tools
Diffstat (limited to 'tools/hex.sh')
-rwxr-xr-xtools/hex.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/hex.sh b/tools/hex.sh
index 16a34b0d8..6e008b027 100755
--- a/tools/hex.sh
+++ b/tools/hex.sh
@@ -1,2 +1,13 @@
+#
+# This test data assumes device "352964051908664" exists.
+#
+# INSERT INTO device ( name, uniqueid )
+# VALUES ( 'Test Device for hex.sh', 352964051908664 );
+#
+# Note: Not all shells support "echo -e" (e.g., dash - default on Ubuntu).
+# This will cause an unknown device error for "-e".
+#
+
echo 234c233335323936343035313930383636343b4e410d0a2342233131303931343b3130323133323b353032372e35303732383b4e3b30333032362e32303336393b453b312e3937393b3238382e3137303b4e413b4e413b4e413b4e413b4e413b3b4e413bd091d0b0d182d0b0d180d0b5d18f3a333a31303020250d0a | perl -ne 's/([0-9a-f]{2})/print chr hex $1/gie' | nc -v -w 10 localhost 5039
#echo -n -e "\x0f\x00\x00\x00\x4e\x52\x30\x39\x46\x30\x34\x31\x35\x35\x00" >/dev/udp/localhost/5053
+