forked from CvvT/dumpDex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
44 lines (40 loc) · 1.19 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import struct
def writeunsignedleb128(num, file):
if num <= 0x7f:
file.write(struct.pack("B", num))
else:
cur = num & 0x7F | 0x80
file.write(struct.pack("B", cur))
num >>= 7
if num <= 0x7f:
file.write(struct.pack("B", num))
else:
cur = num & 0x7f | 0x80
file.write(struct.pack("B", cur))
num >>= 7
if num <= 0x7f:
file.write(struct.pack("B", num))
else:
cur = num & 0x7f | 0x80
file.write(struct.pack("B", cur))
num >>= 7
if num <= 0x7f:
file.write(struct.pack("B", num))
else:
cur = num & 0x7f | 0x80
file.write(struct.pack("B", cur))
num >>= 7
file.write(struct.pack("B", num))
# with open("test.dat", "wb") as file:
# writeunsignedleb128(0x95ee, file)
# writeunsignedleb128(0x10001, file)
# writeunsignedleb128(0x620440, file)
def func():
print("hello")
def test():
print("yes")
return 1
list = (test() for i in range(3))
print(type(list))
for j in list:
print(j)