Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set IP packet "options"? #243

Open
xingdouchen opened this issue Apr 20, 2018 · 0 comments
Open

how to set IP packet "options"? #243

xingdouchen opened this issue Apr 20, 2018 · 0 comments

Comments

@xingdouchen
Copy link

xingdouchen commented Apr 20, 2018

1 >>> a=IP()
2 >>> a.show
3 <bound method Packet.show of <IP |>>
4 >>> a.show()
5 ###[ IP ]###
6 version= 4
7 ihl= None
8 tos= 0x0
9 len= None
10 id= 1
11 flags=
12 frag= 0
13 ttl= 64
14 proto= hopopt
15 chksum= None
16 src= 127.0.0.1
17 dst= 127.0.0.1
18 \options
19 >>> a.options='8.8.8.8,9.9.9.9'
20 >>> a.show()
21 ###[ IP ]###
22 version= 4
23 ihl= None
24 tos= 0x0
25 len= None
26 id= 1
27 flags=
28 frag= 0
29 ttl= 64
30 proto= hopopt
31 chksum= None
32 src= 127.0.0.1
33 dst= 127.0.0.1
34 \options
35 Traceback (most recent call last):
36 File "", line 1, in
37 File "/usr/local/lib/python3.6/site-packages/scapy3k/packet.py", line 864, in show
38 fvalue.show(indent=indent, label_lvl=label_lvl+lvl+" |")
39 AttributeError: 'str' object has no attribute 'show'
40 >>>


HI~ I want to build a IP packet and test the \options\ function,
but I don't know how to set the \options, can someone help give me some example?
Thanks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant