当我需要select一个新的端口使用(在一个组织内部)我曾经在/ etc / services中查找。 这已经不够了,因为Wireshark知道许多其他不在/ etc / services中的端口,因此会错误标记stream量。
我想获得Wireshark知道的所有(TCP和UDP)端口列表,以便我可以使用不同的端口。
我在哪里可以find(或者如何生成)这个列表?
更新,写了一个脚本:
#!/usr/bin/env python import urllib2 response = urllib2.urlopen('http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt') text = response.read() for line in text.splitlines(): words = line.split() if len(words) < 2: continue if words[1] != 'Unassigned': continue print words[0]
Wireshark安装中有一个名为services的文件。 这是http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt的克隆