Linux 120.141.167.72.host.secureserver.net 4.18.0-553.150.1.el8_10.x86_64 #1 SMP Fri Jul 31 15:23:31 EDT 2026 x86_64
Apache
: 72.167.141.120 | : 216.73.217.14
808 Domain
7.4.33
bestseocompany
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
net /
[ HOME SHELL ]
Name
Size
Permission
Action
http
[ DIR ]
drwxr-xr-x
internal
[ DIR ]
drwxr-xr-x
mail
[ DIR ]
drwxr-xr-x
netip
[ DIR ]
drwxr-xr-x
rpc
[ DIR ]
drwxr-xr-x
smtp
[ DIR ]
drwxr-xr-x
testdata
[ DIR ]
drwxr-xr-x
textproto
[ DIR ]
drwxr-xr-x
url
[ DIR ]
drwxr-xr-x
addrselect.go
9.69
KB
-rw-r--r--
addrselect_test.go
8.5
KB
-rw-r--r--
cgo_aix.go
582
B
-rw-r--r--
cgo_android.go
272
B
-rw-r--r--
cgo_bsd.go
343
B
-rw-r--r--
cgo_darwin.go
298
B
-rw-r--r--
cgo_linux.go
642
B
-rw-r--r--
cgo_netbsd.go
276
B
-rw-r--r--
cgo_openbsd.go
276
B
-rw-r--r--
cgo_resnew.go
580
B
-rw-r--r--
cgo_resold.go
579
B
-rw-r--r--
cgo_socknew.go
753
B
-rw-r--r--
cgo_sockold.go
842
B
-rw-r--r--
cgo_solaris.go
343
B
-rw-r--r--
cgo_stub.go
1.33
KB
-rw-r--r--
cgo_unix.go
11.42
KB
-rw-r--r--
cgo_unix_cgo.go
2.24
KB
-rw-r--r--
cgo_unix_cgo_res.go
892
B
-rw-r--r--
cgo_unix_cgo_resn.go
979
B
-rw-r--r--
cgo_unix_syscall.go
3
KB
-rw-r--r--
cgo_unix_test.go
1.44
KB
-rw-r--r--
conf.go
15.48
KB
-rw-r--r--
conf_test.go
12.29
KB
-rw-r--r--
conn_test.go
1.82
KB
-rw-r--r--
dial.go
26.85
KB
-rw-r--r--
dial_test.go
30.28
KB
-rw-r--r--
dial_unix_test.go
2.77
KB
-rw-r--r--
dnsclient.go
5.67
KB
-rw-r--r--
dnsclient_test.go
1.51
KB
-rw-r--r--
dnsclient_unix.go
24.66
KB
-rw-r--r--
dnsclient_unix_test.go
72.77
KB
-rw-r--r--
dnsconfig.go
2.19
KB
-rw-r--r--
dnsconfig_unix.go
4.12
KB
-rw-r--r--
dnsconfig_unix_test.go
7.07
KB
-rw-r--r--
dnsconfig_windows.go
1.61
KB
-rw-r--r--
dnsname_test.go
1.96
KB
-rw-r--r--
error_plan9.go
224
B
-rw-r--r--
error_plan9_test.go
437
B
-rw-r--r--
error_posix.go
543
B
-rw-r--r--
error_posix_test.go
981
B
-rw-r--r--
error_test.go
20.32
KB
-rw-r--r--
error_unix.go
382
B
-rw-r--r--
error_unix_test.go
723
B
-rw-r--r--
error_windows.go
355
B
-rw-r--r--
error_windows_test.go
757
B
-rw-r--r--
example_test.go
8.45
KB
-rw-r--r--
external_test.go
4.05
KB
-rw-r--r--
fd_fake.go
3.79
KB
-rw-r--r--
fd_js.go
627
B
-rw-r--r--
fd_plan9.go
3.56
KB
-rw-r--r--
fd_posix.go
4.29
KB
-rw-r--r--
fd_unix.go
5.43
KB
-rw-r--r--
fd_wasip1.go
496
B
-rw-r--r--
fd_windows.go
6.21
KB
-rw-r--r--
file.go
1.69
KB
-rw-r--r--
file_plan9.go
2.77
KB
-rw-r--r--
file_stub.go
481
B
-rw-r--r--
file_test.go
6.43
KB
-rw-r--r--
file_unix.go
2.55
KB
-rw-r--r--
file_unix_test.go
2.07
KB
-rw-r--r--
file_wasip1.go
2.2
KB
-rw-r--r--
file_wasip1_test.go
3.76
KB
-rw-r--r--
file_windows.go
521
B
-rw-r--r--
hook.go
934
B
-rw-r--r--
hook_plan9.go
211
B
-rw-r--r--
hook_unix.go
658
B
-rw-r--r--
hook_windows.go
720
B
-rw-r--r--
hosts.go
3.48
KB
-rw-r--r--
hosts_test.go
5.6
KB
-rw-r--r--
interface.go
7.57
KB
-rw-r--r--
interface_aix.go
4.46
KB
-rw-r--r--
interface_bsd.go
2.82
KB
-rw-r--r--
interface_bsd_test.go
1.44
KB
-rw-r--r--
interface_bsdvar.go
718
B
-rw-r--r--
interface_darwin.go
1.29
KB
-rw-r--r--
interface_freebsd.go
1.29
KB
-rw-r--r--
interface_linux.go
6.96
KB
-rw-r--r--
interface_linux_test.go
3.65
KB
-rw-r--r--
interface_plan9.go
4.74
KB
-rw-r--r--
interface_solaris.go
2.13
KB
-rw-r--r--
interface_stub.go
814
B
-rw-r--r--
interface_test.go
9.76
KB
-rw-r--r--
interface_unix_test.go
4.85
KB
-rw-r--r--
interface_windows.go
5.49
KB
-rw-r--r--
ip.go
13.97
KB
-rw-r--r--
ip_test.go
25.69
KB
-rw-r--r--
iprawsock.go
7.11
KB
-rw-r--r--
iprawsock_plan9.go
874
B
-rw-r--r--
iprawsock_posix.go
3.89
KB
-rw-r--r--
iprawsock_test.go
5.98
KB
-rw-r--r--
ipsock.go
9.43
KB
-rw-r--r--
ipsock_plan9.go
7.48
KB
-rw-r--r--
ipsock_plan9_test.go
645
B
-rw-r--r--
ipsock_posix.go
8.62
KB
-rw-r--r--
ipsock_test.go
6.81
KB
-rw-r--r--
listen_test.go
20.5
KB
-rw-r--r--
lookup.go
28.6
KB
-rw-r--r--
lookup_plan9.go
9.89
KB
-rw-r--r--
lookup_test.go
41.45
KB
-rw-r--r--
lookup_unix.go
3.35
KB
-rw-r--r--
lookup_windows.go
14.19
KB
-rw-r--r--
lookup_windows_test.go
8.7
KB
-rw-r--r--
mac.go
1.88
KB
-rw-r--r--
mac_test.go
3.26
KB
-rw-r--r--
main_cloexec_test.go
693
B
-rw-r--r--
main_conf_test.go
2.45
KB
-rw-r--r--
main_plan9_test.go
392
B
-rw-r--r--
main_posix_test.go
1.37
KB
-rw-r--r--
main_test.go
7.53
KB
-rw-r--r--
main_unix_test.go
1.19
KB
-rw-r--r--
main_wasm_test.go
284
B
-rw-r--r--
main_windows_test.go
1
KB
-rw-r--r--
mockserver_test.go
13.28
KB
-rw-r--r--
mptcpsock_linux.go
3.96
KB
-rw-r--r--
mptcpsock_linux_test.go
4.06
KB
-rw-r--r--
mptcpsock_stub.go
542
B
-rw-r--r--
net.go
27.12
KB
-rw-r--r--
net_fake.go
26.45
KB
-rw-r--r--
net_fake_test.go
2.79
KB
-rw-r--r--
net_test.go
13.3
KB
-rw-r--r--
net_windows_test.go
16.28
KB
-rw-r--r--
netcgo_off.go
222
B
-rw-r--r--
netcgo_on.go
220
B
-rw-r--r--
netgo_netcgo.go
453
B
-rw-r--r--
netgo_off.go
220
B
-rw-r--r--
netgo_on.go
218
B
-rw-r--r--
nss.go
5.48
KB
-rw-r--r--
nss_test.go
3.4
KB
-rw-r--r--
packetconn_test.go
3.02
KB
-rw-r--r--
parse.go
5.66
KB
-rw-r--r--
parse_test.go
1.65
KB
-rw-r--r--
pipe.go
5.43
KB
-rw-r--r--
pipe_test.go
1.2
KB
-rw-r--r--
platform_test.go
4.33
KB
-rw-r--r--
port.go
1.46
KB
-rw-r--r--
port_test.go
1.34
KB
-rw-r--r--
port_unix.go
1.24
KB
-rw-r--r--
protoconn_test.go
7.44
KB
-rw-r--r--
rawconn.go
2.7
KB
-rw-r--r--
rawconn_stub_test.go
631
B
-rw-r--r--
rawconn_test.go
4.33
KB
-rw-r--r--
rawconn_unix_test.go
2.96
KB
-rw-r--r--
rawconn_windows_test.go
3.12
KB
-rw-r--r--
resolverdialfunc_test.go
8.25
KB
-rw-r--r--
rlimit_js.go
346
B
-rw-r--r--
rlimit_unix.go
1.1
KB
-rw-r--r--
sendfile_linux.go
1.15
KB
-rw-r--r--
sendfile_stub.go
403
B
-rw-r--r--
sendfile_test.go
12.06
KB
-rw-r--r--
sendfile_unix_alt.go
2.27
KB
-rw-r--r--
sendfile_windows.go
1.05
KB
-rw-r--r--
server_test.go
11.67
KB
-rw-r--r--
sock_bsd.go
918
B
-rw-r--r--
sock_cloexec.go
730
B
-rw-r--r--
sock_cloexec_solaris.go
1.43
KB
-rw-r--r--
sock_linux.go
993
B
-rw-r--r--
sock_linux_test.go
575
B
-rw-r--r--
sock_plan9.go
262
B
-rw-r--r--
sock_posix.go
6.29
KB
-rw-r--r--
sock_stub.go
390
B
-rw-r--r--
sock_windows.go
802
B
-rw-r--r--
sockaddr_posix.go
1.45
KB
-rw-r--r--
sockopt_aix.go
1.43
KB
-rw-r--r--
sockopt_bsd.go
2.21
KB
-rw-r--r--
sockopt_fake.go
955
B
-rw-r--r--
sockopt_linux.go
1.25
KB
-rw-r--r--
sockopt_plan9.go
406
B
-rw-r--r--
sockopt_posix.go
2.13
KB
-rw-r--r--
sockopt_solaris.go
1.25
KB
-rw-r--r--
sockopt_windows.go
1.51
KB
-rw-r--r--
sockoptip_bsdvar.go
867
B
-rw-r--r--
sockoptip_linux.go
735
B
-rw-r--r--
sockoptip_posix.go
1.38
KB
-rw-r--r--
sockoptip_stub.go
769
B
-rw-r--r--
sockoptip_windows.go
786
B
-rw-r--r--
splice_linux.go
1.71
KB
-rw-r--r--
splice_linux_test.go
14.49
KB
-rw-r--r--
splice_stub.go
376
B
-rw-r--r--
sys_cloexec.go
962
B
-rw-r--r--
tcpconn_keepalive_conf_darwin_...
430
B
-rw-r--r--
tcpconn_keepalive_conf_posix_t...
1.55
KB
-rw-r--r--
tcpconn_keepalive_conf_solaris...
1.77
KB
-rw-r--r--
tcpconn_keepalive_conf_unix_te...
490
B
-rw-r--r--
tcpconn_keepalive_conf_windows...
987
B
-rw-r--r--
tcpconn_keepalive_illumos_test...
3.98
KB
-rw-r--r--
tcpconn_keepalive_posix_test.g...
2.52
KB
-rw-r--r--
tcpconn_keepalive_solaris_test...
5.67
KB
-rw-r--r--
tcpconn_keepalive_test.go
4.15
KB
-rw-r--r--
tcpsock.go
13.67
KB
-rw-r--r--
tcpsock_plan9.go
2.3
KB
-rw-r--r--
tcpsock_posix.go
6.27
KB
-rw-r--r--
tcpsock_solaris.go
1.32
KB
-rw-r--r--
tcpsock_test.go
17.68
KB
-rw-r--r--
tcpsock_unix.go
1.05
KB
-rw-r--r--
tcpsock_unix_test.go
2.34
KB
-rw-r--r--
tcpsock_windows.go
1.31
KB
-rw-r--r--
tcpsockopt_darwin.go
1.4
KB
-rw-r--r--
tcpsockopt_openbsd.go
759
B
-rw-r--r--
tcpsockopt_plan9.go
762
B
-rw-r--r--
tcpsockopt_posix.go
442
B
-rw-r--r--
tcpsockopt_solaris.go
3.35
KB
-rw-r--r--
tcpsockopt_stub.go
570
B
-rw-r--r--
tcpsockopt_unix.go
1.32
KB
-rw-r--r--
tcpsockopt_windows.go
3.76
KB
-rw-r--r--
timeout_test.go
30.01
KB
-rw-r--r--
udpsock.go
11.83
KB
-rw-r--r--
udpsock_plan9.go
4.64
KB
-rw-r--r--
udpsock_plan9_test.go
1.31
KB
-rw-r--r--
udpsock_posix.go
7.53
KB
-rw-r--r--
udpsock_test.go
17.24
KB
-rw-r--r--
unixsock.go
10.12
KB
-rw-r--r--
unixsock_linux_test.go
2.29
KB
-rw-r--r--
unixsock_plan9.go
1.24
KB
-rw-r--r--
unixsock_posix.go
6.64
KB
-rw-r--r--
unixsock_readmsg_cloexec.go
654
B
-rw-r--r--
unixsock_readmsg_cmsg_cloexec....
332
B
-rw-r--r--
unixsock_readmsg_other.go
275
B
-rw-r--r--
unixsock_readmsg_test.go
2.51
KB
-rw-r--r--
unixsock_test.go
10.64
KB
-rw-r--r--
unixsock_windows_test.go
1.83
KB
-rw-r--r--
write_unix_test.go
1.61
KB
-rw-r--r--
writev_test.go
5.03
KB
-rw-r--r--
writev_unix.go
666
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : dnsclient.go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net import ( "cmp" "internal/bytealg" "internal/itoa" "slices" _ "unsafe" // for go:linkname "golang.org/x/net/dns/dnsmessage" ) // provided by runtime // //go:linkname runtime_rand runtime.rand func runtime_rand() uint64 func randInt() int { return int(uint(runtime_rand()) >> 1) // clear sign bit } func randIntn(n int) int { return randInt() % n } // reverseaddr returns the in-addr.arpa. or ip6.arpa. hostname of the IP // address addr suitable for rDNS (PTR) record lookup or an error if it fails // to parse the IP address. func reverseaddr(addr string) (arpa string, err error) { ip := ParseIP(addr) if ip == nil { return "", &DNSError{Err: "unrecognized address", Name: addr} } if ip.To4() != nil { return itoa.Uitoa(uint(ip[15])) + "." + itoa.Uitoa(uint(ip[14])) + "." + itoa.Uitoa(uint(ip[13])) + "." + itoa.Uitoa(uint(ip[12])) + ".in-addr.arpa.", nil } // Must be IPv6 buf := make([]byte, 0, len(ip)*4+len("ip6.arpa.")) // Add it, in reverse, to the buffer for i := len(ip) - 1; i >= 0; i-- { v := ip[i] buf = append(buf, hexDigit[v&0xF], '.', hexDigit[v>>4], '.') } // Append "ip6.arpa." and return (buf already has the final .) buf = append(buf, "ip6.arpa."...) return string(buf), nil } func equalASCIIName(x, y dnsmessage.Name) bool { if x.Length != y.Length { return false } for i := 0; i < int(x.Length); i++ { a := x.Data[i] b := y.Data[i] if 'A' <= a && a <= 'Z' { a += 0x20 } if 'A' <= b && b <= 'Z' { b += 0x20 } if a != b { return false } } return true } // isDomainName checks if a string is a presentation-format domain name // (currently restricted to hostname-compatible "preferred name" LDH labels and // SRV-like "underscore labels"; see golang.org/issue/12421). // // isDomainName should be an internal detail, // but widely used packages access it using linkname. // Notable members of the hall of shame include: // - github.com/sagernet/sing // // Do not remove or change the type signature. // See go.dev/issue/67401. // //go:linkname isDomainName func isDomainName(s string) bool { // The root domain name is valid. See golang.org/issue/45715. if s == "." { return true } // See RFC 1035, RFC 3696. // Presentation format has dots before every label except the first, and the // terminal empty label is optional here because we assume fully-qualified // (absolute) input. We must therefore reserve space for the first and last // labels' length octets in wire format, where they are necessary and the // maximum total length is 255. // So our _effective_ maximum is 253, but 254 is not rejected if the last // character is a dot. l := len(s) if l == 0 || l > 254 || l == 254 && s[l-1] != '.' { return false } last := byte('.') nonNumeric := false // true once we've seen a letter or hyphen partlen := 0 for i := 0; i < len(s); i++ { c := s[i] switch { default: return false case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || c == '_': nonNumeric = true partlen++ case '0' <= c && c <= '9': // fine partlen++ case c == '-': // Byte before dash cannot be dot. if last == '.' { return false } partlen++ nonNumeric = true case c == '.': // Byte before dot cannot be dot, dash. if last == '.' || last == '-' { return false } if partlen > 63 || partlen == 0 { return false } partlen = 0 } last = c } if last == '-' || partlen > 63 { return false } return nonNumeric } // absDomainName returns an absolute domain name which ends with a // trailing dot to match pure Go reverse resolver and all other lookup // routines. // See golang.org/issue/12189. // But we don't want to add dots for local names from /etc/hosts. // It's hard to tell so we settle on the heuristic that names without dots // (like "localhost" or "myhost") do not get trailing dots, but any other // names do. func absDomainName(s string) string { if bytealg.IndexByteString(s, '.') != -1 && s[len(s)-1] != '.' { s += "." } return s } // An SRV represents a single DNS SRV record. type SRV struct { Target string Port uint16 Priority uint16 Weight uint16 } // byPriorityWeight sorts SRV records by ascending priority and weight. type byPriorityWeight []*SRV // shuffleByWeight shuffles SRV records by weight using the algorithm // described in RFC 2782. func (addrs byPriorityWeight) shuffleByWeight() { sum := 0 for _, addr := range addrs { sum += int(addr.Weight) } for sum > 0 && len(addrs) > 1 { s := 0 n := randIntn(sum) for i := range addrs { s += int(addrs[i].Weight) if s > n { if i > 0 { addrs[0], addrs[i] = addrs[i], addrs[0] } break } } sum -= int(addrs[0].Weight) addrs = addrs[1:] } } // sort reorders SRV records as specified in RFC 2782. func (addrs byPriorityWeight) sort() { slices.SortFunc(addrs, func(a, b *SRV) int { if r := cmp.Compare(a.Priority, b.Priority); r != 0 { return r } return cmp.Compare(a.Weight, b.Weight) }) i := 0 for j := 1; j < len(addrs); j++ { if addrs[i].Priority != addrs[j].Priority { addrs[i:j].shuffleByWeight() i = j } } addrs[i:].shuffleByWeight() } // An MX represents a single DNS MX record. type MX struct { Host string Pref uint16 } // byPref sorts MX records by preference type byPref []*MX // sort reorders MX records as specified in RFC 5321. func (s byPref) sort() { for i := range s { j := randIntn(i + 1) s[i], s[j] = s[j], s[i] } slices.SortFunc(s, func(a, b *MX) int { return cmp.Compare(a.Pref, b.Pref) }) } // An NS represents a single DNS NS record. type NS struct { Host string }
Close