I
I
Iqbol2014-10-16 09:35:00
Ping
Iqbol, 2014-10-16 09:35:00

How to run programs from parsing ICMP packet?

Good afternoon!
There is such a task. There are two programs on the computer, one local and the other network.
It is necessary when analyzing the "Ping" command to launch this or that program.
Then ist if the average packet lifetime is less than 15, it will launch a network program, and if more than a local one.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2014-10-16
@CTAKAH4uK

Packet analysis has nothing to do with it, you need to parse the return values ​​of ping, in order to implement this, a simple script is enough, it all depends on the system and the scripting interpreter, an example on bash :

if ping -q -c 1 -W 15 HOST.HOST >/dev/null
then
   run_net
else
   run_local
fi

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question