[UPDATE] add crypt version

This commit is contained in:
2022-03-16 10:58:46 +01:00
parent ec039ce26a
commit 852c50002d
4 changed files with 11 additions and 3 deletions
+3 -1
View File
@@ -6,12 +6,14 @@ cd $(dirname $0)/conf-client/
SondeFile=$(pwd)/sonde.cfg
source service.cfg
[[ "${Crypted}" == "yes" ]] && NcCmd="timeout 0.1 cryptcat -k ${LocalPassword} ${RemoteIp} ${RemotePort} ${Udp}" || NcCmd="timeout 0.1 nc ${RemoteIp} ${RemotePort}"
while read DATA
do
Cmd=$(echo $DATA| cut -d"#" -f1)
Arg=$(echo $DATA| cut -d"#" -f2)
Res=$(echo -e "${Cmd}#${Arg}" | timeout 0.1 cryptcat -k ${LocalPassword} ${RemoteIp} ${RemotePort} 2> /dev/null)
Res=$( echo -e "${Cmd}#${Arg}" | eval ${NcCmd} 2> /dev/null)
if [[ -z $Res ]]
then
echo "5|No sonde $Cmd on serveur $RemoteIp"
+2
View File
@@ -1,4 +1,6 @@
RemoteIp=127.0.0.1
RemotePort=8080
LocalPassword='Evil@MonitoR-666'
Crypted=no