- This topic has 1 reply, 2 voices, and was last updated 5 years ago by .
- You must be logged in to reply to this topic.
When I run the network scanner I get this error.
IP MAC Address
———————————————————-
Traceback (most recent call last):
File “main.py”, line 15, in <module>
scan(“10.0.2.15/24”)
File “main.py”, line 12, in scan
for element in answered_list():
TypeError: ‘SndRcvList’ object is not callable
Here is my code.
#!/usr/bin/env python
import scapy.all as scapy
def scan(ip):
arp_request = scapy.ARP(pdst=ip)
broadcast = scapy.Ether(dst=”ff:ff:ff:ff:ff:ff”)
arp_request_broadcast = broadcast/arp_request
answered_list = scapy.srp(arp_request_broadcast, timeout=1, verbose=False)[0]
print(“IP\t\t\tMAC Address\n———————————————————-“)
for element in answered_list():
print(element[1].psrc + “\t\t” + element[1].hwsrc)
scan(“10.0.2.15/24”)
Hi!
There’s no need to use () in for element in answered_list():, answered_list is a variable not a function. Please watch the lecture again and pay attention to the proper syntax.
Greetings!
Diego
Not a member yet? Register now
Are you a member? Login now
Enroll in this course to access this lesson!
All of our courses include:
✔ Lifetime, unlimited access to course materials & training videos.
✔ Verifiable certificate of completion from zSecurity, signed by the course instructor, Zaid.
✔ Get answers from our Support Team within a maximum of 15 hours.
✔ Unlimited Updates.
Get free 1 month VIP membership per course with:
✔ Live mentorship and Q&A session with the course instructor, Zaid.
✔ Instant support from community members through our private discord channel.
✔ Daily updates with the latest tutorials & news in the hacking world.
✔ Daily resources like CTFs, bug bounty programs, onion services and more!
✔ Access our VIP community & connect with like-minded people.
✔ Discounts on other zSecurity products and services.