first commit

This commit is contained in:
2026-04-07 20:49:20 +08:00
commit cd80bbe528
43 changed files with 18366 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
from scapy.all import *
target = "8.8.8.8"
print(f"Traceroute to {target}...")
for i in range(1, 31):
pkt = IP(dst=target, ttl=i) / ICMP()
reply = sr1(pkt, verbose=0, timeout=1)
if reply is None:
print(f"{i}: * * *")
elif reply.type == 3: # Destination unreachable
print(f"{i}: {reply.src} (Unreachable)")
break
else:
print(f"{i}: {reply.src}")
if reply.src == target:
print("Reached target!")
break