Здраствуйте! Недавно нашел отличную библиотеку под Python для генерирования пакетов, сниффинга и так далее, она мне кажется очень перспективной, но не могу разобраться.............
Отправим стандартный эхо на компьютер в ЛС:
>>> a = sr(IP(dst="10.2.224.65")/ICMP())
Begin emission:
Finished to send 1 packets.
............................................................................................................^C
Received 108 packets, got 0 answers, remaining 1 packets
>>> a
(<Results: TCP:0 UDP:0 ICMP:0 Other:0>, <Unanswered: TCP:0 UDP:0 ICMP:1 Other:0>)
[shipa@shipa-pc ~]$ ping 10.2.224.65
PING 10.2.224.65 (10.2.224.65) 56(84) bytes of data.
64 bytes from 10.2.224.65: icmp_req=1 ttl=64 time=0.032 ms
64 bytes from 10.2.224.65: icmp_req=2 ttl=64 time=0.029 ms
64 bytes from 10.2.224.65: icmp_req=3 ttl=64 time=0.031 ms
64 bytes from 10.2.224.65: icmp_req=4 ttl=64 time=0.029 ms
64 bytes from 10.2.224.65: icmp_req=5 ttl=64 time=0.031 ms
^C
--- 10.2.224.65 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.029/0.030/0.032/0.005 ms
[shipa@shipa-pc ~]$