Update related to the #3039

This commit is contained in:
Miroslav Stampar
2018-04-11 13:06:47 +02:00
parent 44f6951dfe
commit 8605c49911
3 changed files with 9 additions and 5 deletions

View File

@@ -125,8 +125,12 @@ def main(src, dst):
# Have the IP packet contain the ICMP packet (along with its payload)
ip.contains(icmp)
# Send it to the target host
sock.sendto(ip.get_packet(), (dst, 0))
try:
# Send it to the target host
sock.sendto(ip.get_packet(), (dst, 0))
except socket.error, ex:
sys.stderr.write("'%s'\n" % ex)
sys.stderr.flush()
if __name__ == '__main__':
if len(sys.argv) < 3: