Skip to content

Commit 38fa3a3

Browse files
kasperk81github-actions
authored andcommitted
block all unsafe ports
extracted from three browsers' sources: dotnet/runtime#76236 (comment).
1 parent 27089b9 commit 38fa3a3

File tree

1 file changed

+82
-9
lines changed

1 file changed

+82
-9
lines changed

src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/Config/GeneratePortNumberConfig.cs

Lines changed: 82 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,88 @@ internal class GeneratePortNumberConfig : IMacroConfig
1212
{
1313
private static readonly HashSet<int> UnsafePorts = new HashSet<int>()
1414
{
15-
2049, // nfs
16-
3659, // apple-sasl / PasswordServer
17-
4045, // lockd
18-
6000, // X11
19-
6665, // Alternate IRC [Apple addition]
20-
6666, // Alternate IRC [Apple addition]
21-
6667, // Standard IRC [Apple addition]
22-
6668, // Alternate IRC [Apple addition]
23-
6669, // Alternate IRC [Apple addition]
15+
1, // tcpmux
16+
7, // echo
17+
9, // discard
18+
11, // systat
19+
13, // daytime
20+
15, // netstat
21+
17, // qotd
22+
19, // chargen
23+
20, // FTP-data
24+
21, // FTP-control
25+
22, // SSH
26+
23, // telnet
27+
25, // SMTP
28+
37, // time
29+
42, // name
30+
43, // nicname
31+
53, // domain
32+
69, // TFTP
33+
77, // priv-rjs
34+
79, // finger
35+
87, // ttylink
36+
95, // supdup
37+
101, // hostriame
38+
102, // iso-tsap
39+
103, // gppitnp
40+
104, // acr-nema
41+
109, // POP2
42+
110, // POP3
43+
111, // sunrpc
44+
113, // auth
45+
115, // SFTP
46+
117, // uucp-path
47+
119, // nntp
48+
123, // NTP
49+
135, // loc-srv / epmap
50+
137, // NetBIOS
51+
139, // netbios
52+
143, // IMAP2
53+
161, // SNMP
54+
179, // BGP
55+
389, // LDAP
56+
427, // SLP (Also used by Apple Filing Protocol)
57+
465, // SMTP+SSL
58+
512, // print / exec
59+
513, // login
60+
514, // shell
61+
515, // printer
62+
526, // tempo
63+
530, // courier
64+
531, // Chat
65+
532, // netnews
66+
540, // UUCP
67+
548, // afpovertcp [Apple addition]
68+
554, // rtsp
69+
556, // remotefs
70+
563, // NNTP+SSL
71+
587, // ESMTP
72+
601, // syslog-conn
73+
636, // LDAP+SSL
74+
989, // ftps-data
75+
990, // ftps
76+
993, // IMAP+SSL
77+
995, // POP3+SSL
78+
1719, // H323 (RAS)
79+
1720, // H323 (Q931)
80+
1723, // H323 (H245)
81+
2049, // NFS
82+
3659, // apple-sasl / PasswordServer [Apple addition]
83+
4045, // lockd
84+
5060, // SIP
85+
5061, // SIPS
86+
6000, // X11
87+
6566, // SANE
88+
6665, // Alternate IRC [Apple addition]
89+
6666, // Alternate IRC [Apple addition]
90+
6667, // Standard IRC [Apple addition]
91+
6668, // Alternate IRC [Apple addition]
92+
6669, // Alternate IRC [Apple addition]
93+
6697, // IRC+SSL [Apple addition]
94+
10080, // amanda
95+
4190, // ManageSieve [Apple addition]
96+
6679, // Alternate IRC SSL [Apple addition]
2497
};
2598

2699
internal GeneratePortNumberConfig(string variableName, string? dataType, int fallback, int low, int high)

0 commit comments

Comments
 (0)