Reputation: 67
I use the scapy module to create packages and want to send them over layer 2 since this is much more performant as L3. My packages look like this:
resp = srp1(Ether()/IP(dst="192.168.0.11")/ICMP(), verbose=True)
'resp' is a list of the result/answer. resp[0] shows the entire content. But since i send ethers the result is in hex.
How can i check if the ping was successfull. Simply convert/decode it doesn't work because the type is:
<class 'scapy.layers.l2.Ether'>
Is there a function provided by scapy which does the job or at least shows the result human readable in order to validate it manually?
Upvotes: 0
Views: 819
Reputation: 5411
resp.summary()
Or
repr(resp)
Or
resp.show()
They are ordered by verbosity. Their output are all different
You should read scapy's doc over https://scapy.readthedocs.io/en/latest/
Upvotes: 1