-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbet365raspagemapi.py
86 lines (83 loc) · 2.55 KB
/
bet365raspagemapi.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from time import sleep
import regex as re
import sys, psutil, pymem, subprocess
import numpy as np
from pdmemedit import Pdmemory
from a_pandas_ex_sequence_search import pd_add_find_sequence
import pandas as pd
bravebro = subprocess.Popen(
[
r"C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe",
"https://www.bet365.com/#/IP/B1",
]
)
pd_add_find_sequence()
allmapped = []
sleep(5)
allpids = []
allprocs = []
for q in psutil.process_iter():
try:
if q.name() == "brave.exe":
allprocs.append(q)
except Exception:
pass
resi = []
allmems = []
memmi = []
np8stuff = np.array([79, 68, 61], dtype=np.uint8)
for q in allprocs:
print("---------------------")
allmems.append(Pdmemory(pid=q.pid, filename=None))
hlist = []
allresults = []
try:
while True:
allresults.append([])
hlist.clear()
for la in allmems:
try:
la.update_region_df(
limitfunction=lambda x: True,
dtypes=(
"S1",
np.uint8,
),
allowed_protections=(
pymem.ressources.structure.MEMORY_PROTECTION.PAGE_READWRITE,
),
)
memmi.append(
la.regiondf.loc[
(
la.regiondf.aa_dump_numpy_uint8.s_find_sequence(
np8stuff,
exception_val=[],
distance=2,
).apply(lambda x: len(x) > 0)
)
]
)
for h in pd.concat(memmi, ignore_index=True).aa_dump_S1.apply(
lambda x: b"".join(x).decode("utf-8", "ignore")
):
hlist.append(h)
for h in hlist:
for hh in h.split("|"):
if not hh.strip().endswith(";") or not re.search(
r"^[A-Z]+", hh.strip()
):
continue
allresults[-1].append(hh)
print(hh)
sys.stderr.write("\nEND END END END XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n")
sys.stderr.flush()
except Exception as e:
sys.stderr.write(str(e) + "\n")
sys.stderr.flush()
except KeyboardInterrupt:
try:
sleep(1)
except:
pass
print(memmi)