简体   繁体   中英

getting source ip scapy

I am running Ubuntu of VirtualBox (windows host 10 host). I have installed PyCharm and Scapy package.

I have written a code to print the source IP in packet p

print p[IP].src

However, I get a red line under the word IP and an error unresolved reference. But when I run the script it works perfectly meaning the reference was resolved.

I have imported scapy

from scapy.all import *

What do I need to install/import to get rid of this error?

Thank you, Or

试试看

print p.getlayer(IP).src

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM