1

I made a python code like nslookup but sometimes when I run it it returns the following warning:

WARNING: Mac address to reach destination not found. Using broadcast.

I don't know why it happens only sometimes and not all the time.

from scapy.all import *
import sys

fullmsg = IP(dst=sys.argv[1]) / ICMP(type=8)
ans=sr1(fullmsg,verbose=0)
print(f"The IP of the domain is  {ans[IP].src}")
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

0 Answers0