9 lines
350 B
Bash
9 lines
350 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
#/bin/bash
|
||
|
STRING="<?xml version=\"1.0\" encoding=\"UTF-8\"?><methodCall><methodName>GetStatus</methodName><params></params></methodCall>"
|
||
|
LENGTH=$(printf "%s" "$STRING" | wc -c)
|
||
|
HEADER=$(printf "`printf '%s%08x' "0x80000000" "$LENGTH" `" | tac -rs ..)
|
||
|
RESULT=$(echo "$HEADER"| xxd -p -r)
|
||
|
echo -n $RESULT $STRING | nc -w1 localhost 5000
|