Linux id-dci-web1412.main-hosting.eu 5.14.0-611.20.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 14 06:35:04 EST 2026 x86_64
LiteSpeed
: 2a02:4780:6:1512:0:19fc:adf1:2 | : 216.73.216.85
Cant Read [ /etc/named.conf ]
8.1.34
u435990001
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
opt /
go /
pkg /
mod /
github.com /
miekg /
dns@v1.1.41 /
[ HOME SHELL ]
Name
Size
Permission
Action
.github
[ DIR ]
dr-xr-xr-x
dnsutil
[ DIR ]
dr-xr-xr-x
.codecov.yml
128
B
-r--r--r--
.gitignore
24
B
-r--r--r--
AUTHORS
27
B
-r--r--r--
CODEOWNERS
18
B
-r--r--r--
CONTRIBUTORS
150
B
-r--r--r--
COPYRIGHT
512
B
-r--r--r--
LICENSE
1.58
KB
-r--r--r--
Makefile.fuzz
671
B
-r--r--r--
Makefile.release
992
B
-r--r--r--
README.md
5.83
KB
-r--r--r--
acceptfunc.go
1.83
KB
-r--r--r--
acceptfunc_test.go
859
B
-r--r--r--
client.go
13.88
KB
-r--r--r--
client_test.go
16.25
KB
-r--r--r--
clientconfig.go
3.3
KB
-r--r--r--
clientconfig_test.go
4.63
KB
-r--r--r--
dane.go
997
B
-r--r--r--
defaults.go
10.3
KB
-r--r--r--
dns.go
4.34
KB
-r--r--r--
dns_bench_test.go
9.42
KB
-r--r--r--
dns_test.go
9.95
KB
-r--r--r--
dnssec.go
18.32
KB
-r--r--r--
dnssec_keygen.go
3.1
KB
-r--r--r--
dnssec_keyscan.go
6.16
KB
-r--r--r--
dnssec_privkey.go
2.27
KB
-r--r--r--
dnssec_test.go
28.57
KB
-r--r--r--
doc.go
10.54
KB
-r--r--r--
duplicate.go
953
B
-r--r--r--
duplicate_generate.go
3.95
KB
-r--r--r--
duplicate_test.go
3.77
KB
-r--r--r--
dyn_test.go
37
B
-r--r--r--
edns.go
19.69
KB
-r--r--r--
edns_test.go
3.09
KB
-r--r--r--
example_test.go
3.12
KB
-r--r--r--
format.go
2.4
KB
-r--r--r--
format_test.go
279
B
-r--r--r--
fuzz.go
536
B
-r--r--r--
fuzz_test.go
7.54
KB
-r--r--r--
generate.go
4.97
KB
-r--r--r--
generate_test.go
6.93
KB
-r--r--r--
go.mod
210
B
-r--r--r--
go.sum
1
KB
-r--r--r--
issue_test.go
1.19
KB
-r--r--r--
labels.go
4.11
KB
-r--r--r--
labels_test.go
7.88
KB
-r--r--r--
leak_test.go
1.81
KB
-r--r--r--
length_test.go
20.49
KB
-r--r--r--
listen_go111.go
881
B
-r--r--r--
listen_go_not111.go
485
B
-r--r--r--
msg.go
31.99
KB
-r--r--r--
msg_generate.go
10.22
KB
-r--r--r--
msg_helpers.go
21.54
KB
-r--r--r--
msg_helpers_test.go
11.86
KB
-r--r--r--
msg_test.go
9.12
KB
-r--r--r--
msg_truncate.go
3.4
KB
-r--r--r--
msg_truncate_test.go
5
KB
-r--r--r--
nsecx.go
2.38
KB
-r--r--r--
nsecx_test.go
4.77
KB
-r--r--r--
parse_test.go
65.88
KB
-r--r--r--
privaterr.go
3.23
KB
-r--r--r--
privaterr_test.go
3.51
KB
-r--r--r--
reverse.go
1.32
KB
-r--r--r--
rr_test.go
191
B
-r--r--r--
sanitize.go
1.98
KB
-r--r--r--
sanitize_test.go
2
KB
-r--r--r--
scan.go
29.12
KB
-r--r--r--
scan_rr.go
40.59
KB
-r--r--r--
scan_test.go
8.88
KB
-r--r--r--
serve_mux.go
3.37
KB
-r--r--r--
serve_mux_test.go
1.63
KB
-r--r--r--
server.go
21.53
KB
-r--r--r--
server_test.go
31.38
KB
-r--r--r--
sig0.go
4.59
KB
-r--r--r--
sig0_test.go
2.23
KB
-r--r--r--
singleinflight.go
1.56
KB
-r--r--r--
smimea.go
1.33
KB
-r--r--r--
svcb.go
19.95
KB
-r--r--r--
svcb_test.go
2.48
KB
-r--r--r--
tlsa.go
1.1
KB
-r--r--r--
tsig.go
10.98
KB
-r--r--r--
tsig_test.go
10.75
KB
-r--r--r--
types.go
36.03
KB
-r--r--r--
types_generate.go
8.63
KB
-r--r--r--
types_test.go
4.31
KB
-r--r--r--
udp.go
2.9
KB
-r--r--r--
udp_test.go
4.41
KB
-r--r--r--
udp_windows.go
1.15
KB
-r--r--r--
update.go
3.08
KB
-r--r--r--
update_test.go
4.38
KB
-r--r--r--
version.go
275
B
-r--r--r--
version_test.go
180
B
-r--r--r--
xfr.go
6.57
KB
-r--r--r--
xfr_test.go
2.72
KB
-r--r--r--
zduplicate.go
20.23
KB
-r--r--r--
zmsg.go
59.75
KB
-r--r--r--
ztypes.go
29.52
KB
-r--r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : types_generate.go
//+build ignore // types_generate.go is meant to run with go generate. It will use // go/{importer,types} to track down all the RR struct types. Then for each type // it will generate conversion tables (TypeToRR and TypeToString) and banal // methods (len, Header, copy) based on the struct tags. The generated source is // written to ztypes.go, and is meant to be checked into git. package main import ( "bytes" "fmt" "go/format" "go/types" "log" "os" "strings" "text/template" "golang.org/x/tools/go/packages" ) var skipLen = map[string]struct{}{ "NSEC": {}, "NSEC3": {}, "OPT": {}, "CSYNC": {}, } var packageHdr = ` // Code generated by "go run types_generate.go"; DO NOT EDIT. package dns import ( "encoding/base64" "net" ) ` var TypeToRR = template.Must(template.New("TypeToRR").Parse(` // TypeToRR is a map of constructors for each RR type. var TypeToRR = map[uint16]func() RR{ {{range .}}{{if ne . "RFC3597"}} Type{{.}}: func() RR { return new({{.}}) }, {{end}}{{end}} } `)) var typeToString = template.Must(template.New("typeToString").Parse(` // TypeToString is a map of strings for each RR type. var TypeToString = map[uint16]string{ {{range .}}{{if ne . "NSAPPTR"}} Type{{.}}: "{{.}}", {{end}}{{end}} TypeNSAPPTR: "NSAP-PTR", } `)) var headerFunc = template.Must(template.New("headerFunc").Parse(` {{range .}} func (rr *{{.}}) Header() *RR_Header { return &rr.Hdr } {{end}} `)) // getTypeStruct will take a type and the package scope, and return the // (innermost) struct if the type is considered a RR type (currently defined as // those structs beginning with a RR_Header, could be redefined as implementing // the RR interface). The bool return value indicates if embedded structs were // resolved. func getTypeStruct(t types.Type, scope *types.Scope) (*types.Struct, bool) { st, ok := t.Underlying().(*types.Struct) if !ok { return nil, false } if st.NumFields() == 0 { return nil, false } if st.Field(0).Type() == scope.Lookup("RR_Header").Type() { return st, false } if st.Field(0).Anonymous() { st, _ := getTypeStruct(st.Field(0).Type(), scope) return st, true } return nil, false } // loadModule retrieves package description for a given module. func loadModule(name string) (*types.Package, error) { conf := packages.Config{Mode: packages.NeedTypes | packages.NeedTypesInfo} pkgs, err := packages.Load(&conf, name) if err != nil { return nil, err } return pkgs[0].Types, nil } func main() { // Import and type-check the package pkg, err := loadModule("github.com/miekg/dns") fatalIfErr(err) scope := pkg.Scope() // Collect constants like TypeX var numberedTypes []string for _, name := range scope.Names() { o := scope.Lookup(name) if o == nil || !o.Exported() { continue } b, ok := o.Type().(*types.Basic) if !ok || b.Kind() != types.Uint16 { continue } if !strings.HasPrefix(o.Name(), "Type") { continue } name := strings.TrimPrefix(o.Name(), "Type") if name == "PrivateRR" { continue } numberedTypes = append(numberedTypes, name) } // Collect actual types (*X) var namedTypes []string for _, name := range scope.Names() { o := scope.Lookup(name) if o == nil || !o.Exported() { continue } if st, _ := getTypeStruct(o.Type(), scope); st == nil { continue } if name == "PrivateRR" { continue } // Check if corresponding TypeX exists if scope.Lookup("Type"+o.Name()) == nil && o.Name() != "RFC3597" { log.Fatalf("Constant Type%s does not exist.", o.Name()) } namedTypes = append(namedTypes, o.Name()) } b := &bytes.Buffer{} b.WriteString(packageHdr) // Generate TypeToRR fatalIfErr(TypeToRR.Execute(b, namedTypes)) // Generate typeToString fatalIfErr(typeToString.Execute(b, numberedTypes)) // Generate headerFunc fatalIfErr(headerFunc.Execute(b, namedTypes)) // Generate len() fmt.Fprint(b, "// len() functions\n") for _, name := range namedTypes { if _, ok := skipLen[name]; ok { continue } o := scope.Lookup(name) st, isEmbedded := getTypeStruct(o.Type(), scope) if isEmbedded { continue } fmt.Fprintf(b, "func (rr *%s) len(off int, compression map[string]struct{}) int {\n", name) fmt.Fprintf(b, "l := rr.Hdr.len(off, compression)\n") for i := 1; i < st.NumFields(); i++ { o := func(s string) { fmt.Fprintf(b, s, st.Field(i).Name()) } if _, ok := st.Field(i).Type().(*types.Slice); ok { switch st.Tag(i) { case `dns:"-"`: // ignored case `dns:"cdomain-name"`: o("for _, x := range rr.%s { l += domainNameLen(x, off+l, compression, true) }\n") case `dns:"domain-name"`: o("for _, x := range rr.%s { l += domainNameLen(x, off+l, compression, false) }\n") case `dns:"txt"`: o("for _, x := range rr.%s { l += len(x) + 1 }\n") case `dns:"apl"`: o("for _, x := range rr.%s { l += x.len() }\n") case `dns:"pairs"`: o("for _, x := range rr.%s { l += 4 + int(x.len()) }\n") default: log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) } continue } switch { case st.Tag(i) == `dns:"-"`: // ignored case st.Tag(i) == `dns:"cdomain-name"`: o("l += domainNameLen(rr.%s, off+l, compression, true)\n") case st.Tag(i) == `dns:"domain-name"`: o("l += domainNameLen(rr.%s, off+l, compression, false)\n") case st.Tag(i) == `dns:"octet"`: o("l += len(rr.%s)\n") case strings.HasPrefix(st.Tag(i), `dns:"size-base64`): fallthrough case st.Tag(i) == `dns:"base64"`: o("l += base64.StdEncoding.DecodedLen(len(rr.%s))\n") case strings.HasPrefix(st.Tag(i), `dns:"size-hex:`): // this has an extra field where the length is stored o("l += len(rr.%s)/2\n") case st.Tag(i) == `dns:"hex"`: o("l += len(rr.%s)/2\n") case st.Tag(i) == `dns:"any"`: o("l += len(rr.%s)\n") case st.Tag(i) == `dns:"a"`: o("if len(rr.%s) != 0 { l += net.IPv4len }\n") case st.Tag(i) == `dns:"aaaa"`: o("if len(rr.%s) != 0 { l += net.IPv6len }\n") case st.Tag(i) == `dns:"txt"`: o("for _, t := range rr.%s { l += len(t) + 1 }\n") case st.Tag(i) == `dns:"uint48"`: o("l += 6 // %s\n") case st.Tag(i) == "": switch st.Field(i).Type().(*types.Basic).Kind() { case types.Uint8: o("l++ // %s\n") case types.Uint16: o("l += 2 // %s\n") case types.Uint32: o("l += 4 // %s\n") case types.Uint64: o("l += 8 // %s\n") case types.String: o("l += len(rr.%s) + 1\n") default: log.Fatalln(name, st.Field(i).Name()) } default: log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) } } fmt.Fprintf(b, "return l }\n") } // Generate copy() fmt.Fprint(b, "// copy() functions\n") for _, name := range namedTypes { o := scope.Lookup(name) st, isEmbedded := getTypeStruct(o.Type(), scope) fmt.Fprintf(b, "func (rr *%s) copy() RR {\n", name) fields := make([]string, 0, st.NumFields()) if isEmbedded { a, _ := o.Type().Underlying().(*types.Struct) parent := a.Field(0).Name() fields = append(fields, "*rr."+parent+".copy().(*"+parent+")") goto WriteCopy } fields = append(fields, "rr.Hdr") for i := 1; i < st.NumFields(); i++ { f := st.Field(i).Name() if sl, ok := st.Field(i).Type().(*types.Slice); ok { t := sl.Underlying().String() t = strings.TrimPrefix(t, "[]") if strings.Contains(t, ".") { splits := strings.Split(t, ".") t = splits[len(splits)-1] } // For the EDNS0 interface (used in the OPT RR), we need to call the copy method on each element. if t == "EDNS0" { fmt.Fprintf(b, "%s := make([]%s, len(rr.%s));\nfor i,e := range rr.%s {\n %s[i] = e.copy()\n}\n", f, t, f, f, f) fields = append(fields, f) continue } if t == "APLPrefix" { fmt.Fprintf(b, "%s := make([]%s, len(rr.%s));\nfor i,e := range rr.%s {\n %s[i] = e.copy()\n}\n", f, t, f, f, f) fields = append(fields, f) continue } if t == "SVCBKeyValue" { fmt.Fprintf(b, "%s := make([]%s, len(rr.%s));\nfor i,e := range rr.%s {\n %s[i] = e.copy()\n}\n", f, t, f, f, f) fields = append(fields, f) continue } fmt.Fprintf(b, "%s := make([]%s, len(rr.%s)); copy(%s, rr.%s)\n", f, t, f, f, f) fields = append(fields, f) continue } if st.Field(i).Type().String() == "net.IP" { fields = append(fields, "copyIP(rr."+f+")") continue } fields = append(fields, "rr."+f) } WriteCopy: fmt.Fprintf(b, "return &%s{%s}\n", name, strings.Join(fields, ",")) fmt.Fprintf(b, "}\n") } // gofmt res, err := format.Source(b.Bytes()) if err != nil { b.WriteTo(os.Stderr) log.Fatal(err) } // write result f, err := os.Create("ztypes.go") fatalIfErr(err) defer f.Close() f.Write(res) } func fatalIfErr(err error) { if err != nil { log.Fatal(err) } }
Close