0
Someone could assist me here, I spent a few days trying to solve this business in my code and unfortunately I could not solve.
The operating system I am using is Windows 10.
My problem is on the bold line.
from scapy.all import *
target = input("Informe um alvo: ")
destport = input("Porta de destino: ")
port = int(destport)
ans,unans=sr(IP(dst=target,ttl=(1,30))/TCP(dport=port,flags="S"))
ans.summary(lambda s,r: r.sprintf("{IP:%IP.src%}\t{ICMP:%ICMP.type%}\t{TCP:%TCP.flags%}"))
The mistake you’re making is this: Typeerror: () Missing 1 required positional argument: 'r'
What should I change or perform some installation in order to solve ?
From now on Thank you :)
Note: I’ve made several changes to this line of code, and I’ve already researched several sites to try to get the solution, the problem is, I don’t understand enough about this subject, I’m running a course for this, but the instructor does not answer the questions and did not explain very well what this line of code does. So I’d like someone to explain to me exactly how ans.Ummary and the lambda.
This would be the expected output of this whole script.
How is the output of ans? You can put a toothpick here for us?
– Vinicius Mesel
Ready I put the result of the teacher
– Matheus Biace Torres