When I need to choose a new port to use (internal to an organisation) I used to look in /etc/services. This is no longer sufficient, as Wireshark knows about many other ports that are not in /etc/services and therefore mislabels traffic.

I would like to get a list of all the (TCP and UDP) ports that Wireshark knows about, so that I can use a different one.

Where can I find (or how can I generate) this list?

---

Update, wrote a script:

```
#!/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]

```