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 /
testdata /
[ HOME SHELL ]
Name
Size
Permission
Action
failssh
[ DIR ]
drwxr-xr-x
generate
[ DIR ]
drwxr-xr-x
mod
[ DIR ]
drwxr-xr-x
modlegacy
[ DIR ]
drwxr-xr-x
norunexample
[ DIR ]
drwxr-xr-x
rundir
[ DIR ]
drwxr-xr-x
script
[ DIR ]
drwxr-xr-x
shadow
[ DIR ]
drwxr-xr-x
src
[ DIR ]
drwxr-xr-x
testcover
[ DIR ]
drwxr-xr-x
testimport
[ DIR ]
drwxr-xr-x
testinternal
[ DIR ]
drwxr-xr-x
testinternal2
[ DIR ]
drwxr-xr-x
testinternal3
[ DIR ]
drwxr-xr-x
testinternal4
[ DIR ]
drwxr-xr-x
testonly
[ DIR ]
drwxr-xr-x
testonly2
[ DIR ]
drwxr-xr-x
testterminal18153
[ DIR ]
drwxr-xr-x
testvendor
[ DIR ]
drwxr-xr-x
testvendor2
[ DIR ]
drwxr-xr-x
addmod.go
3.52
KB
-rw-r--r--
example1_test.go
394
B
-rw-r--r--
example2_test.go
383
B
-rw-r--r--
print_goroot.go
251
B
-rw-r--r--
savedir.go
1.5
KB
-rw-r--r--
standalone_benchmark_test.go
81
B
-rw-r--r--
standalone_fail_sub_test.go
136
B
-rw-r--r--
standalone_main_normal_test.go
247
B
-rw-r--r--
standalone_main_wrong_test.go
249
B
-rw-r--r--
standalone_parallel_sub_test.g...
296
B
-rw-r--r--
standalone_sub_test.go
112
B
-rw-r--r--
standalone_test.go
71
B
-rw-r--r--
standalone_testmain_flag_test....
606
B
-rw-r--r--
timeoutbench_test.go
127
B
-rw-r--r--
vendormod.txt
2.27
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : savedir.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. // +build ignore // Savedir archives a directory tree as a txtar archive printed to standard output. // // Usage: // // go run savedir.go /path/to/dir >saved.txt // // Typically the tree is later extracted during a test with tg.extract("testdata/saved.txt"). // package main import ( "flag" "fmt" "io/ioutil" "log" "os" "path/filepath" "strings" "unicode/utf8" "../internal/txtar" ) func usage() { fmt.Fprintf(os.Stderr, "usage: go run savedir.go dir >saved.txt\n") os.Exit(2) } const goCmd = "vgo" func main() { flag.Usage = usage flag.Parse() if flag.NArg() != 1 { usage() } log.SetPrefix("savedir: ") log.SetFlags(0) dir := flag.Arg(0) a := new(txtar.Archive) dir = filepath.Clean(dir) filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { if path == dir { return nil } name := info.Name() if strings.HasPrefix(name, ".") { if info.IsDir() { return filepath.SkipDir } return nil } if !info.Mode().IsRegular() { return nil } data, err := ioutil.ReadFile(path) if err != nil { log.Fatal(err) } if !utf8.Valid(data) { log.Printf("%s: ignoring invalid UTF-8 data", path) return nil } a.Files = append(a.Files, txtar.File{Name: strings.TrimPrefix(path, dir+string(filepath.Separator)), Data: data}) return nil }) data := txtar.Format(a) os.Stdout.Write(data) }
Close