slidge-whatsapp 0.3.1__cp313-cp313-manylinux_2_36_aarch64.whl → 0.3.4__cp313-cp313-manylinux_2_36_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of slidge-whatsapp might be problematic. Click here for more details.
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +175 -175
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +141 -141
- slidge_whatsapp/generated/go.py +1 -1
- slidge_whatsapp/generated/whatsapp.c +1423 -1423
- slidge_whatsapp/generated/whatsapp.go +1230 -1230
- slidge_whatsapp/generated/whatsapp.py +1337 -1337
- slidge_whatsapp/generated/whatsapp_go.h +175 -175
- slidge_whatsapp/go.mod +9 -9
- slidge_whatsapp/go.sum +18 -18
- slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +7 -2
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/module.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +48 -7
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +13 -0
- slidge_whatsapp/vendor/go.mau.fi/util/jsontime/helpers.go +16 -5
- slidge_whatsapp/vendor/go.mau.fi/util/jsontime/integer.go +27 -12
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +39 -28
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +17 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +18 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +40 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +24 -21
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +21 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +3213 -2851
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +108 -74
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +7 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +7 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +35 -23
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +5 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +47 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +4 -10
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +28 -42
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +33 -32
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +5 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sessioncache.go +125 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +34 -11
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +5 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +24 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +12 -1
- slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +7 -4
- slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +11 -6
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_go125.go +15 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_go126.go +15 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +24 -1
- slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +0 -1
- slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +35 -26
- slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +4 -2
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +2 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/{writesched_priority.go → writesched_priority_rfc7540.go} +52 -52
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority_rfc9128.go +209 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +1 -1
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +2 -2
- slidge_whatsapp/vendor/golang.org/x/net/internal/socks/socks.go +1 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +9 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/fdset.go +1 -3
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ifreq_linux.go +1 -3
- slidge_whatsapp/vendor/golang.org/x/sys/unix/mkall.sh +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +1 -3
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_netbsd.go +17 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +2 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +18 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +2 -9
- slidge_whatsapp/vendor/modules.txt +10 -10
- {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/METADATA +1 -1
- {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/RECORD +74 -70
- {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/WHEEL +0 -0
- {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/entry_points.txt +0 -0
- {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// Copyright 2025 The Go Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
package http2
|
|
6
|
+
|
|
7
|
+
import (
|
|
8
|
+
"fmt"
|
|
9
|
+
"math"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
type streamMetadata struct {
|
|
13
|
+
location *writeQueue
|
|
14
|
+
priority PriorityParam
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type priorityWriteSchedulerRFC9218 struct {
|
|
18
|
+
// control contains control frames (SETTINGS, PING, etc.).
|
|
19
|
+
control writeQueue
|
|
20
|
+
|
|
21
|
+
// heads contain the head of a circular list of streams.
|
|
22
|
+
// We put these heads within a nested array that represents urgency and
|
|
23
|
+
// incremental, as defined in
|
|
24
|
+
// https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters.
|
|
25
|
+
// 8 represents u=0 up to u=7, and 2 represents i=false and i=true.
|
|
26
|
+
heads [8][2]*writeQueue
|
|
27
|
+
|
|
28
|
+
// streams contains a mapping between each stream ID and their metadata, so
|
|
29
|
+
// we can quickly locate them when needing to, for example, adjust their
|
|
30
|
+
// priority.
|
|
31
|
+
streams map[uint32]streamMetadata
|
|
32
|
+
|
|
33
|
+
// queuePool are empty queues for reuse.
|
|
34
|
+
queuePool writeQueuePool
|
|
35
|
+
|
|
36
|
+
// prioritizeIncremental is used to determine whether we should prioritize
|
|
37
|
+
// incremental streams or not, when urgency is the same in a given Pop()
|
|
38
|
+
// call.
|
|
39
|
+
prioritizeIncremental bool
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
func newPriorityWriteSchedulerRFC9128() WriteScheduler {
|
|
43
|
+
ws := &priorityWriteSchedulerRFC9218{
|
|
44
|
+
streams: make(map[uint32]streamMetadata),
|
|
45
|
+
}
|
|
46
|
+
return ws
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
func (ws *priorityWriteSchedulerRFC9218) OpenStream(streamID uint32, opt OpenStreamOptions) {
|
|
50
|
+
if ws.streams[streamID].location != nil {
|
|
51
|
+
panic(fmt.Errorf("stream %d already opened", streamID))
|
|
52
|
+
}
|
|
53
|
+
q := ws.queuePool.get()
|
|
54
|
+
ws.streams[streamID] = streamMetadata{
|
|
55
|
+
location: q,
|
|
56
|
+
priority: opt.priority,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
u, i := opt.priority.urgency, opt.priority.incremental
|
|
60
|
+
if ws.heads[u][i] == nil {
|
|
61
|
+
ws.heads[u][i] = q
|
|
62
|
+
q.next = q
|
|
63
|
+
q.prev = q
|
|
64
|
+
} else {
|
|
65
|
+
// Queues are stored in a ring.
|
|
66
|
+
// Insert the new stream before ws.head, putting it at the end of the list.
|
|
67
|
+
q.prev = ws.heads[u][i].prev
|
|
68
|
+
q.next = ws.heads[u][i]
|
|
69
|
+
q.prev.next = q
|
|
70
|
+
q.next.prev = q
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
func (ws *priorityWriteSchedulerRFC9218) CloseStream(streamID uint32) {
|
|
75
|
+
metadata := ws.streams[streamID]
|
|
76
|
+
q, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental
|
|
77
|
+
if q == nil {
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
if q.next == q {
|
|
81
|
+
// This was the only open stream.
|
|
82
|
+
ws.heads[u][i] = nil
|
|
83
|
+
} else {
|
|
84
|
+
q.prev.next = q.next
|
|
85
|
+
q.next.prev = q.prev
|
|
86
|
+
if ws.heads[u][i] == q {
|
|
87
|
+
ws.heads[u][i] = q.next
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
delete(ws.streams, streamID)
|
|
91
|
+
ws.queuePool.put(q)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
func (ws *priorityWriteSchedulerRFC9218) AdjustStream(streamID uint32, priority PriorityParam) {
|
|
95
|
+
metadata := ws.streams[streamID]
|
|
96
|
+
q, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental
|
|
97
|
+
if q == nil {
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Remove stream from current location.
|
|
102
|
+
if q.next == q {
|
|
103
|
+
// This was the only open stream.
|
|
104
|
+
ws.heads[u][i] = nil
|
|
105
|
+
} else {
|
|
106
|
+
q.prev.next = q.next
|
|
107
|
+
q.next.prev = q.prev
|
|
108
|
+
if ws.heads[u][i] == q {
|
|
109
|
+
ws.heads[u][i] = q.next
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Insert stream to the new queue.
|
|
114
|
+
u, i = priority.urgency, priority.incremental
|
|
115
|
+
if ws.heads[u][i] == nil {
|
|
116
|
+
ws.heads[u][i] = q
|
|
117
|
+
q.next = q
|
|
118
|
+
q.prev = q
|
|
119
|
+
} else {
|
|
120
|
+
// Queues are stored in a ring.
|
|
121
|
+
// Insert the new stream before ws.head, putting it at the end of the list.
|
|
122
|
+
q.prev = ws.heads[u][i].prev
|
|
123
|
+
q.next = ws.heads[u][i]
|
|
124
|
+
q.prev.next = q
|
|
125
|
+
q.next.prev = q
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Update the metadata.
|
|
129
|
+
ws.streams[streamID] = streamMetadata{
|
|
130
|
+
location: q,
|
|
131
|
+
priority: priority,
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
func (ws *priorityWriteSchedulerRFC9218) Push(wr FrameWriteRequest) {
|
|
136
|
+
if wr.isControl() {
|
|
137
|
+
ws.control.push(wr)
|
|
138
|
+
return
|
|
139
|
+
}
|
|
140
|
+
q := ws.streams[wr.StreamID()].location
|
|
141
|
+
if q == nil {
|
|
142
|
+
// This is a closed stream.
|
|
143
|
+
// wr should not be a HEADERS or DATA frame.
|
|
144
|
+
// We push the request onto the control queue.
|
|
145
|
+
if wr.DataSize() > 0 {
|
|
146
|
+
panic("add DATA on non-open stream")
|
|
147
|
+
}
|
|
148
|
+
ws.control.push(wr)
|
|
149
|
+
return
|
|
150
|
+
}
|
|
151
|
+
q.push(wr)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
func (ws *priorityWriteSchedulerRFC9218) Pop() (FrameWriteRequest, bool) {
|
|
155
|
+
// Control and RST_STREAM frames first.
|
|
156
|
+
if !ws.control.empty() {
|
|
157
|
+
return ws.control.shift(), true
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// On the next Pop(), we want to prioritize incremental if we prioritized
|
|
161
|
+
// non-incremental request of the same urgency this time. Vice-versa.
|
|
162
|
+
// i.e. when there are incremental and non-incremental requests at the same
|
|
163
|
+
// priority, we give 50% of our bandwidth to the incremental ones in
|
|
164
|
+
// aggregate and 50% to the first non-incremental one (since
|
|
165
|
+
// non-incremental streams do not use round-robin writes).
|
|
166
|
+
ws.prioritizeIncremental = !ws.prioritizeIncremental
|
|
167
|
+
|
|
168
|
+
// Always prioritize lowest u (i.e. highest urgency level).
|
|
169
|
+
for u := range ws.heads {
|
|
170
|
+
for i := range ws.heads[u] {
|
|
171
|
+
// When we want to prioritize incremental, we try to pop i=true
|
|
172
|
+
// first before i=false when u is the same.
|
|
173
|
+
if ws.prioritizeIncremental {
|
|
174
|
+
i = (i + 1) % 2
|
|
175
|
+
}
|
|
176
|
+
q := ws.heads[u][i]
|
|
177
|
+
if q == nil {
|
|
178
|
+
continue
|
|
179
|
+
}
|
|
180
|
+
for {
|
|
181
|
+
if wr, ok := q.consume(math.MaxInt32); ok {
|
|
182
|
+
if i == 1 {
|
|
183
|
+
// For incremental streams, we update head to q.next so
|
|
184
|
+
// we can round-robin between multiple streams that can
|
|
185
|
+
// immediately benefit from partial writes.
|
|
186
|
+
ws.heads[u][i] = q.next
|
|
187
|
+
} else {
|
|
188
|
+
// For non-incremental streams, we try to finish one to
|
|
189
|
+
// completion rather than doing round-robin. However,
|
|
190
|
+
// we update head here so that if q.consume() is !ok
|
|
191
|
+
// (e.g. the stream has no more frame to consume), head
|
|
192
|
+
// is updated to the next q that has frames to consume
|
|
193
|
+
// on future iterations. This way, we do not prioritize
|
|
194
|
+
// writing to unavailable stream on next Pop() calls,
|
|
195
|
+
// preventing head-of-line blocking.
|
|
196
|
+
ws.heads[u][i] = q
|
|
197
|
+
}
|
|
198
|
+
return wr, true
|
|
199
|
+
}
|
|
200
|
+
q = q.next
|
|
201
|
+
if q == ws.heads[u][i] {
|
|
202
|
+
break
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return FrameWriteRequest{}, false
|
|
209
|
+
}
|
|
@@ -25,7 +25,7 @@ type roundRobinWriteScheduler struct {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// newRoundRobinWriteScheduler constructs a new write scheduler.
|
|
28
|
-
// The round robin scheduler
|
|
28
|
+
// The round robin scheduler prioritizes control frames
|
|
29
29
|
// like SETTINGS and PING over DATA frames.
|
|
30
30
|
// When there are no control frames to send, it performs a round-robin
|
|
31
31
|
// selection from the ready streams.
|
|
@@ -51,7 +51,7 @@ type EncodeHeadersParam struct {
|
|
|
51
51
|
DefaultUserAgent string
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
//
|
|
54
|
+
// EncodeHeadersResult is the result of EncodeHeaders.
|
|
55
55
|
type EncodeHeadersResult struct {
|
|
56
56
|
HasBody bool
|
|
57
57
|
HasTrailers bool
|
|
@@ -399,7 +399,7 @@ type ServerRequestResult struct {
|
|
|
399
399
|
|
|
400
400
|
// If the request should be rejected, this is a short string suitable for passing
|
|
401
401
|
// to the http2 package's CountError function.
|
|
402
|
-
// It might be a bit odd to return errors this way rather than
|
|
402
|
+
// It might be a bit odd to return errors this way rather than returning an error,
|
|
403
403
|
// but this ensures we don't forget to include a CountError reason.
|
|
404
404
|
InvalidReason string
|
|
405
405
|
}
|
|
@@ -297,7 +297,7 @@ func (up *UsernamePassword) Authenticate(ctx context.Context, rw io.ReadWriter,
|
|
|
297
297
|
b = append(b, up.Username...)
|
|
298
298
|
b = append(b, byte(len(up.Password)))
|
|
299
299
|
b = append(b, up.Password...)
|
|
300
|
-
// TODO(mikio): handle IO deadlines and
|
|
300
|
+
// TODO(mikio): handle IO deadlines and cancellation if
|
|
301
301
|
// necessary
|
|
302
302
|
if _, err := rw.Write(b); err != nil {
|
|
303
303
|
return err
|
|
@@ -41,6 +41,15 @@ func (s *CPUSet) Zero() {
|
|
|
41
41
|
clear(s[:])
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
// Fill adds all possible CPU bits to the set s. On Linux, [SchedSetaffinity]
|
|
45
|
+
// will silently ignore any invalid CPU bits in [CPUSet] so this is an
|
|
46
|
+
// efficient way of resetting the CPU affinity of a process.
|
|
47
|
+
func (s *CPUSet) Fill() {
|
|
48
|
+
for i := range s {
|
|
49
|
+
s[i] = ^cpuMask(0)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
func cpuBitsIndex(cpu int) int {
|
|
45
54
|
return cpu / _NCPUBITS
|
|
46
55
|
}
|
|
@@ -111,9 +111,7 @@ func (ifr *Ifreq) SetUint32(v uint32) {
|
|
|
111
111
|
// clear zeroes the ifreq's union field to prevent trailing garbage data from
|
|
112
112
|
// being sent to the kernel if an ifreq is reused.
|
|
113
113
|
func (ifr *Ifreq) clear() {
|
|
114
|
-
|
|
115
|
-
ifr.raw.Ifru[i] = 0
|
|
116
|
-
}
|
|
114
|
+
clear(ifr.raw.Ifru[:])
|
|
117
115
|
}
|
|
118
116
|
|
|
119
117
|
// TODO(mdlayher): export as IfreqData? For now we can provide helpers such as
|
|
@@ -49,6 +49,7 @@ esac
|
|
|
49
49
|
if [[ "$GOOS" = "linux" ]]; then
|
|
50
50
|
# Use the Docker-based build system
|
|
51
51
|
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
|
52
|
+
set -e
|
|
52
53
|
$cmd docker build --tag generate:$GOOS $GOOS
|
|
53
54
|
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS
|
|
54
55
|
exit
|
|
@@ -801,9 +801,7 @@ func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|
|
801
801
|
// one. The kernel expects SID to be in network byte order.
|
|
802
802
|
binary.BigEndian.PutUint16(sa.raw[6:8], sa.SID)
|
|
803
803
|
copy(sa.raw[8:14], sa.Remote)
|
|
804
|
-
|
|
805
|
-
sa.raw[i] = 0
|
|
806
|
-
}
|
|
804
|
+
clear(sa.raw[14 : 14+IFNAMSIZ])
|
|
807
805
|
copy(sa.raw[14:], sa.Dev)
|
|
808
806
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil
|
|
809
807
|
}
|
|
@@ -248,6 +248,23 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
|
|
|
248
248
|
return Statvfs1(path, buf, ST_WAIT)
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
func Getvfsstat(buf []Statvfs_t, flags int) (n int, err error) {
|
|
252
|
+
var (
|
|
253
|
+
_p0 unsafe.Pointer
|
|
254
|
+
bufsize uintptr
|
|
255
|
+
)
|
|
256
|
+
if len(buf) > 0 {
|
|
257
|
+
_p0 = unsafe.Pointer(&buf[0])
|
|
258
|
+
bufsize = unsafe.Sizeof(Statvfs_t{}) * uintptr(len(buf))
|
|
259
|
+
}
|
|
260
|
+
r0, _, e1 := Syscall(SYS_GETVFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
|
|
261
|
+
n = int(r0)
|
|
262
|
+
if e1 != 0 {
|
|
263
|
+
err = e1
|
|
264
|
+
}
|
|
265
|
+
return
|
|
266
|
+
}
|
|
267
|
+
|
|
251
268
|
/*
|
|
252
269
|
* Exposed directly
|
|
253
270
|
*/
|
|
@@ -321,6 +321,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
|
|
321
321
|
//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP
|
|
322
322
|
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
|
|
323
323
|
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
|
|
324
|
+
//sys GetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) = kernel32.GetNumberOfConsoleInputEvents
|
|
325
|
+
//sys FlushConsoleInputBuffer(console Handle) (err error) = kernel32.FlushConsoleInputBuffer
|
|
324
326
|
//sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole
|
|
325
327
|
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
|
|
326
328
|
//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
|
|
@@ -65,6 +65,22 @@ var signals = [...]string{
|
|
|
65
65
|
15: "terminated",
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
// File flags for [os.OpenFile]. The O_ prefix is used to indicate
|
|
69
|
+
// that these flags are specific to the OpenFile function.
|
|
70
|
+
const (
|
|
71
|
+
O_FILE_FLAG_OPEN_NO_RECALL = FILE_FLAG_OPEN_NO_RECALL
|
|
72
|
+
O_FILE_FLAG_OPEN_REPARSE_POINT = FILE_FLAG_OPEN_REPARSE_POINT
|
|
73
|
+
O_FILE_FLAG_SESSION_AWARE = FILE_FLAG_SESSION_AWARE
|
|
74
|
+
O_FILE_FLAG_POSIX_SEMANTICS = FILE_FLAG_POSIX_SEMANTICS
|
|
75
|
+
O_FILE_FLAG_BACKUP_SEMANTICS = FILE_FLAG_BACKUP_SEMANTICS
|
|
76
|
+
O_FILE_FLAG_DELETE_ON_CLOSE = FILE_FLAG_DELETE_ON_CLOSE
|
|
77
|
+
O_FILE_FLAG_SEQUENTIAL_SCAN = FILE_FLAG_SEQUENTIAL_SCAN
|
|
78
|
+
O_FILE_FLAG_RANDOM_ACCESS = FILE_FLAG_RANDOM_ACCESS
|
|
79
|
+
O_FILE_FLAG_NO_BUFFERING = FILE_FLAG_NO_BUFFERING
|
|
80
|
+
O_FILE_FLAG_OVERLAPPED = FILE_FLAG_OVERLAPPED
|
|
81
|
+
O_FILE_FLAG_WRITE_THROUGH = FILE_FLAG_WRITE_THROUGH
|
|
82
|
+
)
|
|
83
|
+
|
|
68
84
|
const (
|
|
69
85
|
FILE_READ_DATA = 0x00000001
|
|
70
86
|
FILE_READ_ATTRIBUTES = 0x00000080
|
|
@@ -238,6 +238,7 @@ var (
|
|
|
238
238
|
procFindResourceW = modkernel32.NewProc("FindResourceW")
|
|
239
239
|
procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
|
|
240
240
|
procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
|
|
241
|
+
procFlushConsoleInputBuffer = modkernel32.NewProc("FlushConsoleInputBuffer")
|
|
241
242
|
procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
|
|
242
243
|
procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
|
|
243
244
|
procFormatMessageW = modkernel32.NewProc("FormatMessageW")
|
|
@@ -284,6 +285,7 @@ var (
|
|
|
284
285
|
procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
|
|
285
286
|
procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
|
|
286
287
|
procGetNamedPipeServerProcessId = modkernel32.NewProc("GetNamedPipeServerProcessId")
|
|
288
|
+
procGetNumberOfConsoleInputEvents = modkernel32.NewProc("GetNumberOfConsoleInputEvents")
|
|
287
289
|
procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
|
|
288
290
|
procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
|
|
289
291
|
procGetProcAddress = modkernel32.NewProc("GetProcAddress")
|
|
@@ -2111,6 +2113,14 @@ func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
|
|
|
2111
2113
|
return
|
|
2112
2114
|
}
|
|
2113
2115
|
|
|
2116
|
+
func FlushConsoleInputBuffer(console Handle) (err error) {
|
|
2117
|
+
r1, _, e1 := syscall.SyscallN(procFlushConsoleInputBuffer.Addr(), uintptr(console))
|
|
2118
|
+
if r1 == 0 {
|
|
2119
|
+
err = errnoErr(e1)
|
|
2120
|
+
}
|
|
2121
|
+
return
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2114
2124
|
func FlushFileBuffers(handle Handle) (err error) {
|
|
2115
2125
|
r1, _, e1 := syscall.SyscallN(procFlushFileBuffers.Addr(), uintptr(handle))
|
|
2116
2126
|
if r1 == 0 {
|
|
@@ -2481,6 +2491,14 @@ func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err erro
|
|
|
2481
2491
|
return
|
|
2482
2492
|
}
|
|
2483
2493
|
|
|
2494
|
+
func GetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) {
|
|
2495
|
+
r1, _, e1 := syscall.SyscallN(procGetNumberOfConsoleInputEvents.Addr(), uintptr(console), uintptr(unsafe.Pointer(numevents)))
|
|
2496
|
+
if r1 == 0 {
|
|
2497
|
+
err = errnoErr(e1)
|
|
2498
|
+
}
|
|
2499
|
+
return
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2484
2502
|
func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) {
|
|
2485
2503
|
var _p0 uint32
|
|
2486
2504
|
if wait {
|
|
@@ -427,13 +427,6 @@ type isolatingRunSequence struct {
|
|
|
427
427
|
|
|
428
428
|
func (i *isolatingRunSequence) Len() int { return len(i.indexes) }
|
|
429
429
|
|
|
430
|
-
func maxLevel(a, b level) level {
|
|
431
|
-
if a > b {
|
|
432
|
-
return a
|
|
433
|
-
}
|
|
434
|
-
return b
|
|
435
|
-
}
|
|
436
|
-
|
|
437
430
|
// Rule X10, second bullet: Determine the start-of-sequence (sos) and end-of-sequence (eos) types,
|
|
438
431
|
// either L or R, for each isolating run sequence.
|
|
439
432
|
func (p *paragraph) isolatingRunSequence(indexes []int) *isolatingRunSequence {
|
|
@@ -474,8 +467,8 @@ func (p *paragraph) isolatingRunSequence(indexes []int) *isolatingRunSequence {
|
|
|
474
467
|
indexes: indexes,
|
|
475
468
|
types: types,
|
|
476
469
|
level: level,
|
|
477
|
-
sos: typeForLevel(
|
|
478
|
-
eos: typeForLevel(
|
|
470
|
+
sos: typeForLevel(max(prevLevel, level)),
|
|
471
|
+
eos: typeForLevel(max(succLevel, level)),
|
|
479
472
|
}
|
|
480
473
|
}
|
|
481
474
|
|
|
@@ -68,8 +68,8 @@ github.com/rs/zerolog/log
|
|
|
68
68
|
# github.com/vektah/gqlparser/v2 v2.5.30
|
|
69
69
|
## explicit; go 1.22
|
|
70
70
|
github.com/vektah/gqlparser/v2/ast
|
|
71
|
-
# go.mau.fi/libsignal v0.2.
|
|
72
|
-
## explicit; go 1.
|
|
71
|
+
# go.mau.fi/libsignal v0.2.1
|
|
72
|
+
## explicit; go 1.24.0
|
|
73
73
|
go.mau.fi/libsignal/cipher
|
|
74
74
|
go.mau.fi/libsignal/ecc
|
|
75
75
|
go.mau.fi/libsignal/groups
|
|
@@ -96,7 +96,7 @@ go.mau.fi/libsignal/util/errorhelper
|
|
|
96
96
|
go.mau.fi/libsignal/util/keyhelper
|
|
97
97
|
go.mau.fi/libsignal/util/medium
|
|
98
98
|
go.mau.fi/libsignal/util/optional
|
|
99
|
-
# go.mau.fi/util v0.9.
|
|
99
|
+
# go.mau.fi/util v0.9.2
|
|
100
100
|
## explicit; go 1.24.0
|
|
101
101
|
go.mau.fi/util/dbutil
|
|
102
102
|
go.mau.fi/util/exbytes
|
|
@@ -111,7 +111,7 @@ go.mau.fi/util/jsontime
|
|
|
111
111
|
go.mau.fi/util/ptr
|
|
112
112
|
go.mau.fi/util/random
|
|
113
113
|
go.mau.fi/util/retryafter
|
|
114
|
-
# go.mau.fi/whatsmeow v0.0.0-
|
|
114
|
+
# go.mau.fi/whatsmeow v0.0.0-20251016095441-02c50743e601
|
|
115
115
|
## explicit; go 1.24.0
|
|
116
116
|
go.mau.fi/whatsmeow
|
|
117
117
|
go.mau.fi/whatsmeow/appstate
|
|
@@ -168,15 +168,15 @@ go.mau.fi/whatsmeow/util/gcmutil
|
|
|
168
168
|
go.mau.fi/whatsmeow/util/hkdfutil
|
|
169
169
|
go.mau.fi/whatsmeow/util/keys
|
|
170
170
|
go.mau.fi/whatsmeow/util/log
|
|
171
|
-
# golang.org/x/crypto v0.
|
|
171
|
+
# golang.org/x/crypto v0.43.0
|
|
172
172
|
## explicit; go 1.24.0
|
|
173
173
|
golang.org/x/crypto/curve25519
|
|
174
174
|
golang.org/x/crypto/hkdf
|
|
175
175
|
golang.org/x/crypto/pbkdf2
|
|
176
|
-
# golang.org/x/exp v0.0.0-
|
|
176
|
+
# golang.org/x/exp v0.0.0-20251017212417-90e834f514db
|
|
177
177
|
## explicit; go 1.24.0
|
|
178
178
|
golang.org/x/exp/constraints
|
|
179
|
-
# golang.org/x/image v0.
|
|
179
|
+
# golang.org/x/image v0.32.0
|
|
180
180
|
## explicit; go 1.24.0
|
|
181
181
|
golang.org/x/image/draw
|
|
182
182
|
golang.org/x/image/math/f64
|
|
@@ -184,7 +184,7 @@ golang.org/x/image/riff
|
|
|
184
184
|
golang.org/x/image/vp8
|
|
185
185
|
golang.org/x/image/vp8l
|
|
186
186
|
golang.org/x/image/webp
|
|
187
|
-
# golang.org/x/net v0.
|
|
187
|
+
# golang.org/x/net v0.46.0
|
|
188
188
|
## explicit; go 1.24.0
|
|
189
189
|
golang.org/x/net/http/httpguts
|
|
190
190
|
golang.org/x/net/http2
|
|
@@ -193,11 +193,11 @@ golang.org/x/net/idna
|
|
|
193
193
|
golang.org/x/net/internal/httpcommon
|
|
194
194
|
golang.org/x/net/internal/socks
|
|
195
195
|
golang.org/x/net/proxy
|
|
196
|
-
# golang.org/x/sys v0.
|
|
196
|
+
# golang.org/x/sys v0.37.0
|
|
197
197
|
## explicit; go 1.24.0
|
|
198
198
|
golang.org/x/sys/unix
|
|
199
199
|
golang.org/x/sys/windows
|
|
200
|
-
# golang.org/x/text v0.
|
|
200
|
+
# golang.org/x/text v0.30.0
|
|
201
201
|
## explicit; go 1.24.0
|
|
202
202
|
golang.org/x/text/secure/bidirule
|
|
203
203
|
golang.org/x/text/transform
|