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 /
go /
printer /
testdata /
[ HOME SHELL ]
Name
Size
Permission
Action
alignment.golden
4.12
KB
-rw-r--r--
alignment.input
4.92
KB
-rw-r--r--
comments.golden
11.12
KB
-rw-r--r--
comments.input
11.16
KB
-rw-r--r--
comments.x
1.22
KB
-rw-r--r--
comments2.golden
2.25
KB
-rw-r--r--
comments2.input
2.29
KB
-rw-r--r--
complit.input
912
B
-rw-r--r--
complit.x
1.14
KB
-rw-r--r--
declarations.golden
16.23
KB
-rw-r--r--
declarations.input
16.46
KB
-rw-r--r--
empty.golden
94
B
-rw-r--r--
empty.input
94
B
-rw-r--r--
expressions.golden
12.41
KB
-rw-r--r--
expressions.input
12.13
KB
-rw-r--r--
expressions.raw
12.38
KB
-rw-r--r--
linebreaks.golden
5.09
KB
-rw-r--r--
linebreaks.input
5.07
KB
-rw-r--r--
parser.go
50.69
KB
-rw-r--r--
slow.golden
2.02
KB
-rw-r--r--
slow.input
1.94
KB
-rw-r--r--
statements.golden
8.04
KB
-rw-r--r--
statements.input
8.32
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : linebreaks.golden
// 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 linebreaks import ( "bytes" "fmt" "io" "os" "reflect" "strings" "testing" ) type writerTestEntry struct { header *Header contents string } type writerTest struct { file string // filename of expected output entries []*writerTestEntry } var writerTests = []*writerTest{ &writerTest{ file: "testdata/writer.tar", entries: []*writerTestEntry{ &writerTestEntry{ header: &Header{ Name: "small.txt", Mode: 0640, Uid: 73025, Gid: 5000, Size: 5, Mtime: 1246508266, Typeflag: '0', Uname: "dsymonds", Gname: "eng", }, contents: "Kilts", }, &writerTestEntry{ header: &Header{ Name: "small2.txt", Mode: 0640, Uid: 73025, Gid: 5000, Size: 11, Mtime: 1245217492, Typeflag: '0', Uname: "dsymonds", Gname: "eng", }, contents: "Google.com\n", }, }, }, // The truncated test file was produced using these commands: // dd if=/dev/zero bs=1048576 count=16384 > /tmp/16gig.txt // tar -b 1 -c -f- /tmp/16gig.txt | dd bs=512 count=8 > writer-big.tar &writerTest{ file: "testdata/writer-big.tar", entries: []*writerTestEntry{ &writerTestEntry{ header: &Header{ Name: "tmp/16gig.txt", Mode: 0640, Uid: 73025, Gid: 5000, Size: 16 << 30, Mtime: 1254699560, Typeflag: '0', Uname: "dsymonds", Gname: "eng", }, // no contents }, }, }, } type untarTest struct { file string headers []*Header } var untarTests = []*untarTest{ &untarTest{ file: "testdata/gnu.tar", headers: []*Header{ &Header{ Name: "small.txt", Mode: 0640, Uid: 73025, Gid: 5000, Size: 5, Mtime: 1244428340, Typeflag: '0', Uname: "dsymonds", Gname: "eng", }, &Header{ Name: "small2.txt", Mode: 0640, Uid: 73025, Gid: 5000, Size: 11, Mtime: 1244436044, Typeflag: '0', Uname: "dsymonds", Gname: "eng", }, }, }, &untarTest{ file: "testdata/star.tar", headers: []*Header{ &Header{ Name: "small.txt", Mode: 0640, Uid: 73025, Gid: 5000, Size: 5, Mtime: 1244592783, Typeflag: '0', Uname: "dsymonds", Gname: "eng", Atime: 1244592783, Ctime: 1244592783, }, &Header{ Name: "small2.txt", Mode: 0640, Uid: 73025, Gid: 5000, Size: 11, Mtime: 1244592783, Typeflag: '0', Uname: "dsymonds", Gname: "eng", Atime: 1244592783, Ctime: 1244592783, }, }, }, &untarTest{ file: "testdata/v7.tar", headers: []*Header{ &Header{ Name: "small.txt", Mode: 0444, Uid: 73025, Gid: 5000, Size: 5, Mtime: 1244593104, Typeflag: '\x00', }, &Header{ Name: "small2.txt", Mode: 0444, Uid: 73025, Gid: 5000, Size: 11, Mtime: 1244593104, Typeflag: '\x00', }, }, }, } var facts = map[int]string{ 0: "1", 1: "1", 2: "2", 10: "3628800", 20: "2432902008176640000", 100: "933262154439441526816992388562667004907159682643816214685929" + "638952175999932299156089414639761565182862536979208272237582" + "51185210916864000000000000000000000000", } func usage() { fmt.Fprintf(os.Stderr, // TODO(gri): the 2nd string of this string list should not be indented "usage: godoc package [name ...]\n"+ " godoc -http=:6060\n") flag.PrintDefaults() os.Exit(2) } func TestReader(t *testing.T) { testLoop: for i, test := range untarTests { f, err := os.Open(test.file, os.O_RDONLY, 0444) if err != nil { t.Errorf("test %d: Unexpected error: %v", i, err) continue } tr := NewReader(f) for j, header := range test.headers { hdr, err := tr.Next() if err != nil || hdr == nil { t.Errorf("test %d, entry %d: Didn't get entry: %v", i, j, err) f.Close() continue testLoop } if !reflect.DeepEqual(hdr, header) { t.Errorf("test %d, entry %d: Incorrect header:\nhave %+v\nwant %+v", i, j, *hdr, *header) } } hdr, err := tr.Next() if hdr != nil || err != nil { t.Errorf("test %d: Unexpected entry or error: hdr=%v err=%v", i, err) } f.Close() } } // Respect line breaks in function calls. func _() { f(x) f(x, x) f(x, x, ) f( x, x) f( x, x, ) } // Respect line breaks in function declarations. func _(x T) {} func _(x T, y T) { } func _(x T, y T, ) { } func _( x T, y T) { } func _( x T, y T, ) { } // Example from issue #2597. func ManageStatus0( in <-chan *Status, req <-chan Request, stat chan<- *TargetInfo, TargetHistorySize int) { } func ManageStatus1( in <-chan *Status, req <-chan Request, stat chan<- *TargetInfo, TargetHistorySize int, ) { } // Example from issue #9064. func (y *y) xerrors() error { _ = "xerror.test" //TODO- _ = []byte(` foo bar foo bar foo bar `) //TODO- } func _() { _ = "abc" // foo _ = `abc_0123456789_` // foo } func _() { _ = "abc" // foo _ = `abc 0123456789 ` // foo } // There should be exactly one linebreak after this comment.
Close