Python Scapy / operator, | pipe in types -


with scapy can :

p = ether() / ip() 

what kind of operation '/' ? kind of object return ? if type p in python interpreter returns this

<ether  ... | ip ...> 

what '|' mean in case ?

i trying change field dst of ip after creating p without recreating object entirely, didn't manage don't know kind of object facing.

thank you.

the div / operator used in scapy stack layers:

the / operator has been used composition operator between 2 layers. when doing so, lower layer can have 1 or more of defaults fields overloaded according upper layer.

the | in printing output text separator distinguish between stacked layers.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -