smemhack 5.0__py3-none-any.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.
- smemhack/__init__.py +2 -0
- smemhack/main.py +187 -0
- smemhack-5.0.dist-info/LICENSE.txt +21 -0
- smemhack-5.0.dist-info/METADATA +20 -0
- smemhack-5.0.dist-info/RECORD +7 -0
- smemhack-5.0.dist-info/WHEEL +5 -0
- smemhack-5.0.dist-info/top_level.txt +1 -0
smemhack/__init__.py
ADDED
smemhack/main.py
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
import pyautogui as py # Import the pyautogui module (aliased as py) to control mouse and keyboard actions
|
2
|
+
from pyautogui import * # Import all functions from pyautogui (note: this may be redundant)
|
3
|
+
import time # Import the time module for adding delays and calculating time intervals
|
4
|
+
import pyperclip as pycopy # Import the pyperclip module (aliased as pycopy) to perform clipboard operations
|
5
|
+
from pyperclip import * # Import all functions from pyperclip (again, may be redundant)
|
6
|
+
import json # Import the json module for reading and writing JSON files
|
7
|
+
import tensorflow as tf
|
8
|
+
from tensorflow.keras.models import Sequential
|
9
|
+
from tensorflow.keras.layers import Dense,LSTM,Embedding,Dropout,Flatten
|
10
|
+
from tensorflow.keras.callbacks import EarlyStopping
|
11
|
+
from tensorflow.keras.regularizers import l2
|
12
|
+
from tensorflow.keras.preprocessing.text import Tokenizer
|
13
|
+
from tensorflow.keras.preprocessing.sequence import pad_sequences
|
14
|
+
import numpy as np
|
15
|
+
def hack():
|
16
|
+
sox,soy=1366,768
|
17
|
+
x,y=py.size()
|
18
|
+
nx,ny=x/sox,y/soy
|
19
|
+
py.keyDown("alt") # Simulate pressing down the Alt key
|
20
|
+
time.sleep(1) # Wait for 1 second to ensure the key press is registered
|
21
|
+
py.press("tab") # Simulate pressing the Tab key to switch between applications/windows
|
22
|
+
time.sleep(1) # Wait for 1 second to allow the switch to complete
|
23
|
+
py.keyUp("alt") # Release the Alt key
|
24
|
+
tttnnn = time.time() # Record the current time (used later for measuring total process time)
|
25
|
+
data=[]
|
26
|
+
get=[]
|
27
|
+
def get_w():
|
28
|
+
py.press("enter")
|
29
|
+
time.sleep(0.5)
|
30
|
+
py.click(906*nx,106*ny)
|
31
|
+
py.click()
|
32
|
+
py.mouseDown()
|
33
|
+
py.keyDown("ctrl")
|
34
|
+
py.press("c")
|
35
|
+
py.keyUp("ctrl")
|
36
|
+
py.mouseUp()
|
37
|
+
py.click()
|
38
|
+
first=pycopy.paste()
|
39
|
+
first=first.split(" ")
|
40
|
+
first="".join(first)
|
41
|
+
time.sleep(0.5)
|
42
|
+
py.click(773*nx,157*ny)
|
43
|
+
time.sleep(0.5)
|
44
|
+
py.click(115*nx,604*ny)
|
45
|
+
time.sleep(0.5)
|
46
|
+
py.keyDown("ctrl")
|
47
|
+
py.press("a")
|
48
|
+
py.press("c")
|
49
|
+
py.keyUp("ctrl")
|
50
|
+
py.click()
|
51
|
+
time.sleep(0.5)
|
52
|
+
first_g=pycopy.paste()
|
53
|
+
py.click(906*nx,106*ny)
|
54
|
+
time.sleep(0.5)
|
55
|
+
py.typewrite(first)
|
56
|
+
time.sleep(0.5)
|
57
|
+
py.press("enter")
|
58
|
+
time.sleep(0.5)
|
59
|
+
data.append(first)
|
60
|
+
get.append(first_g)
|
61
|
+
while True:
|
62
|
+
py.press("enter")
|
63
|
+
time.sleep(0.5)
|
64
|
+
py.click(906*nx,106*ny)
|
65
|
+
py.click()
|
66
|
+
py.mouseDown()
|
67
|
+
time.sleep(0.5)
|
68
|
+
py.keyDown("ctrl")
|
69
|
+
py.press("c")
|
70
|
+
py.keyUp("ctrl")
|
71
|
+
py.mouseUp()
|
72
|
+
py.click()
|
73
|
+
time.sleep(0.5)
|
74
|
+
py.click(797*nx,156*ny)
|
75
|
+
n=pycopy.paste()
|
76
|
+
n=n.split(" ")
|
77
|
+
n="".join(n)
|
78
|
+
if n== first:
|
79
|
+
break
|
80
|
+
else:
|
81
|
+
data.append(n)
|
82
|
+
time.sleep(0.5)
|
83
|
+
py.click(115*nx,604*ny)
|
84
|
+
time.sleep(0.5)
|
85
|
+
py.keyDown("ctrl")
|
86
|
+
py.press("a")
|
87
|
+
py.press("c")
|
88
|
+
py.keyUp("ctrl")
|
89
|
+
py.click()
|
90
|
+
time.sleep(0.5)
|
91
|
+
nn=pycopy.paste()
|
92
|
+
get.append(nn)
|
93
|
+
py.click(906*nx,106*ny)
|
94
|
+
time.sleep(0.5)
|
95
|
+
py.typewrite(n)
|
96
|
+
time.sleep(0.5)
|
97
|
+
py.press("enter")
|
98
|
+
time.sleep(0.5)
|
99
|
+
time.sleep(0.5)
|
100
|
+
py.click(1316*nx,54*ny)
|
101
|
+
get_w()
|
102
|
+
py.keyDown("alt") # Simulate pressing down the Alt key
|
103
|
+
time.sleep(1) # Wait for 1 second to ensure the key press is registered
|
104
|
+
py.press("tab") # Simulate pressing the Tab key to switch between applications/windows
|
105
|
+
time.sleep(1) # Wait for 1 second to allow the switch to complete
|
106
|
+
py.keyUp("alt")
|
107
|
+
# Define the data_get function to capture and process screen text data
|
108
|
+
model=Sequential([
|
109
|
+
Embedding(input_dim=100,output_dim=50,input_length=5),
|
110
|
+
LSTM(128),
|
111
|
+
Dense(64,activation="relu"),
|
112
|
+
Dense(len(data),activation="softmax")
|
113
|
+
])
|
114
|
+
model.compile(optimizer="adam",
|
115
|
+
loss="sparse_categorical_crossentropy",
|
116
|
+
metrics=["accuracy"])
|
117
|
+
y=np.array(list(range(0,len(data))))
|
118
|
+
tokenizer=Tokenizer(num_words=100)
|
119
|
+
tokenizer.fit_on_texts(get)
|
120
|
+
x=tokenizer.texts_to_sequences(get)
|
121
|
+
x=pad_sequences(x,maxlen=5)
|
122
|
+
model.fit(x,y,epochs=100,batch_size=1)
|
123
|
+
py.keyDown("alt") # Simulate pressing down the Alt key
|
124
|
+
time.sleep(1) # Wait for 1 second to ensure the key press is registered
|
125
|
+
py.press("tab") # Simulate pressing the Tab key to switch between applications/windows
|
126
|
+
time.sleep(1) # Wait for 1 second to allow the switch to complete
|
127
|
+
py.keyUp("alt")
|
128
|
+
py.click(1053*nx,317*ny)
|
129
|
+
time.sleep(1)
|
130
|
+
lw=""
|
131
|
+
def normal_w():
|
132
|
+
get=get.split("\n")
|
133
|
+
get=get[2:]
|
134
|
+
get="\n".join(get)
|
135
|
+
for _ in range(0,len(data)+5):
|
136
|
+
py.click(115*nx,604*ny)
|
137
|
+
py.keyDown("ctrl")
|
138
|
+
py.press("a")
|
139
|
+
py.press("c")
|
140
|
+
py.keyUp("ctrl")
|
141
|
+
py.click()
|
142
|
+
time.sleep(0.5)
|
143
|
+
w=pycopy.paste()
|
144
|
+
w=w.split("\n")
|
145
|
+
w=w[2:]
|
146
|
+
w="\n".join(w)
|
147
|
+
for x in get:
|
148
|
+
if w==x:
|
149
|
+
py.click(906*nx,106*ny)
|
150
|
+
time.sleep(0.5)
|
151
|
+
py.typewrite(data[get.index(x)])
|
152
|
+
py.press("enter")
|
153
|
+
time.sleep(1)
|
154
|
+
for _ in range(0,len(data)+5):
|
155
|
+
py.click(115*nx,604*ny)
|
156
|
+
py.keyDown("ctrl")
|
157
|
+
py.press("a")
|
158
|
+
py.press("c")
|
159
|
+
py.keyUp("ctrl")
|
160
|
+
py.click()
|
161
|
+
time.sleep(0.5)
|
162
|
+
gg=pycopy.paste()
|
163
|
+
if gg== lw:
|
164
|
+
py.click(1316*nx,54*ny)
|
165
|
+
time.sleep(0.5)
|
166
|
+
py.click(1053*nx,317*ny)
|
167
|
+
normal_w()
|
168
|
+
break
|
169
|
+
else:
|
170
|
+
lw=gg
|
171
|
+
gg=[gg]
|
172
|
+
gg=tokenizer.texts_to_sequences(gg)
|
173
|
+
gg=pad_sequences(gg,maxlen=5)
|
174
|
+
prediction=model.predict(gg)
|
175
|
+
pd=np.argmax(prediction)
|
176
|
+
py.click(906*nx,106*ny)
|
177
|
+
time.sleep(0.5)
|
178
|
+
py.typewrite(data[pd])
|
179
|
+
py.press("enter")
|
180
|
+
time.sleep(1)
|
181
|
+
py.keyDown("alt") # Simulate pressing down the Alt key
|
182
|
+
time.sleep(1) # Wait for 1 second to ensure the key press is registered
|
183
|
+
py.press("tab") # Simulate pressing the Tab key to switch between applications/windows
|
184
|
+
time.sleep(1) # Wait for 1 second to allow the switch to complete
|
185
|
+
py.keyUp("alt")
|
186
|
+
input("Proccess completed...time used:%.2f"%(time.time()-tttnnn))
|
187
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 [Dickily]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: smemhack
|
3
|
+
Version: 5.0
|
4
|
+
Summary: A Python library to automate online homework tasks with AI and system control.
|
5
|
+
Home-page: UNKNOWN
|
6
|
+
Author: Dickily
|
7
|
+
License: MIT
|
8
|
+
Platform: UNKNOWN
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
12
|
+
Requires-Python: >=3.6
|
13
|
+
Requires-Dist: tensorflow
|
14
|
+
Requires-Dist: pyautogui
|
15
|
+
Requires-Dist: pyperclip
|
16
|
+
Requires-Dist: numpy
|
17
|
+
|
18
|
+
UNKNOWN
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
smemhack/__init__.py,sha256=AB-0oBos1GTmQOACLtp_ssyk5spXrGZnArORwCs8VJ8,38
|
2
|
+
smemhack/main.py,sha256=-dGMMrEAaL_5FHfZBSBvN65w5qR7wZ6G9qyEeXX8ELg,6803
|
3
|
+
smemhack-5.0.dist-info/LICENSE.txt,sha256=tP97363uLuaT-mFz0R1-JeFz_lngKvgs-aT548Ml4yE,1087
|
4
|
+
smemhack-5.0.dist-info/METADATA,sha256=_BAyYFXxlGEam-wcIMg6uaWudoZlgSElhIXetzUbnq8,504
|
5
|
+
smemhack-5.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
6
|
+
smemhack-5.0.dist-info/top_level.txt,sha256=xNcFNsBkAsQ7cvrsNoZurwu9SXFyvBe6PxS-zt5MuG8,9
|
7
|
+
smemhack-5.0.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
smemhack
|