scapy.send(ip/UDP()/("E"*10))
这里的“/”是如何代替“,”进行参数传递的?
http://hg.secdev.org/scapy/file/d02d7e7b0989/scapy/packet.py#l264
它是使用了__div__
这类的魔术方法,那个"/"是一个方法调用,返回一个新的对象
可参考《Python 魔术方法指南》:
- 中文:https://pycoders-weekly-chinese.readthedocs.org/en/latest/issue6/a-guide-to-pythons-magic-methods.html
- 英文:http://www.rafekettler.com/magicmethods.html#table