-
Notifications
You must be signed in to change notification settings - Fork 0
/
spedUpKodeArrow.txt
272 lines (222 loc) · 11.2 KB
/
spedUpKodeArrow.txt
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
import pyautogui
import keyboard
import os
import sys
import pystray
from PIL import Image
import webbrowser
import tkinter as tk
from tkinter import messagebox
import platform
import subprocess
import wmi
import itertools
pyautogui.PAUSE = 0.00000000000000001
def get_hardware_id():
system = platform.system()
if system == "Windows":
c = wmi.WMI()
bios = c.Win32_BIOS()[0]
return bios.SerialNumber
elif system == "Darwin": # macOS
command = "ioreg -l | grep IOPlatformSerialNumber"
result = subprocess.run(command, shell=True, capture_output=True, text=True)
serial_number = result.stdout.split('=')[-1].strip().strip('"')
return serial_number
elif system == "Linux":
command = "cat /sys/class/dmi/id/product_uuid"
result = subprocess.run(command, shell=True, capture_output=True, text=True)
return result.stdout.strip()
else:
raise NotImplementedError(f"Unsupported platform: {system}")
hardware_id = get_hardware_id()
# Define the tray icon image and tooltip
icon_image_path = "icon.ico"
tooltip_text = "KodeArrow by Ahmad Hassan"
premium_file_path = "systemCompatibility.txt" # File to store premium status
# Load the icon image and resize it to a suitable size for the tray (e.g., 16x16)
icon_image = Image.open(icon_image_path)
icon_image = icon_image.resize((16, 16))
def is_premium():
return os.path.exists(premium_file_path)
# Function to show the initial instructions and key combinations
def show_instructions():
message = "Thank you for using KodeArrow, project by Ahmad Hassan\n\n\n\t\t Alt + I\n\t\t (Arrow Up)\n\n Alt + J \t\t\t Alt + L \t(Arrow Left) \t\t\t(Arrow Right)\n\n\t\t Alt + K \n\t\t(Arrow Down)\n\nPlease buy Premium version to unlock ease to access features"
messagebox.showinfo("Instructions", message)
def show_instructionsPremium():
message = "Thank you for using KodeArrow, project by Ahmad Hassan\n\n\n\t\t Alt + I\n\t\t (Arrow Up)\n\n Alt + J \t\t\t Alt + L \t(Arrow Left) \t\t\t(Arrow Right)\n\n\t\t Alt + K \n\t\t(Arrow Down)\n\n\n\t ! Premium Unlocked !"
messagebox.showinfo("Instructions", message)
# Show the initial instructions when the program starts
if not is_premium():
show_instructions()
else:
show_instructionsPremium()
# Define the function to open the URL
def open_url(icon, item):
webbrowser.open("https://bted.000webhostapp.com/")
def open_url_buy(icon, item):
webbrowser.open("https://kodearrow.000webhostapp.com/")
def create_hidden_file(file_path, content):
try:
with open(file_path, "w") as file:
file.write(content)
# Try to set the hidden attribute based on the platform
if platform.system() == "Windows":
# Windows: Use ctypes to set hidden attribute
import ctypes
FILE_ATTRIBUTE_HIDDEN = 0x02
ctypes.windll.kernel32.SetFileAttributesW(file_path, FILE_ATTRIBUTE_HIDDEN)
elif platform.system() == "Darwin":
# macOS: Prefix file name with a dot to hide it
os.rename(file_path, f".{file_path}")
elif platform.system() == "Linux":
# Linux: Prefix file name with a dot to hide it
os.rename(file_path, f".{file_path}")
else:
raise NotImplementedError(f"Unsupported platform: {platform.system()}")
print(f"Hidden file '{file_path}' created successfully.")
except Exception as e:
print(f"Failed to create hidden file '{file_path}': {e}")
file_path = "systemCompatibility.txt"
content = """YOUR PREMIUM UNLOCK IS UNLOCKED
(((
(((((((////
(((((((((////
(((((///
((((((/
(((((((
(((((((
(((((((
(((((((
(((((((
###((((
#####((
#######
#######
######## ##((
######## ####(((((((
THANKS FOR BUYING KODEARROW ########## #### ((((((((((
[]][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][ @@@@@@@@@@@
]]######### &&&&&&&&&&&@@@
]]]]]## &&&&&&&&
]]]]]]] &&&&
]]]]]]%
&]]]]]]
&&&]]]]
&&&&&]]
&&&&&&&
&&&&&&&
&&&&&&&
@@@&&&&
@@@@@@@@@@@@@&
@@@@@@@@@@@@
@@@@@@@@@@@
CAUTION!
DO NOT MOVE THIS FILE UNDER ANY CIRCUMSTANCES.
DO NOT CHANGE THE DIRECTORY OF THIS FILE.
KEEP THE FILE IN THE SAME FOLDER.
DO NOT SHARE THIS FILE ACROSS ANY OTHER DEVICES.
VIOLATION OF ANY OF THESE INSTRUCTIONS MAY LEAD TO THE USER BEING HELD LIABLE FOR LEGAL ACTION.
Copyright© 2023. Ahmad Hassan(B-TED)
Project KodeArrow
"""
# Function to delete the premium file
def delete_premium_file():
if os.path.exists(premium_file_path):
os.remove(premium_file_path)
# Function to check if the program is running in premium mode
def is_premium():
return os.path.exists(premium_file_path)
# Define the function to unlock full functionality with a license key
def unlock_functionality(icon, item):
if is_premium():
print("Unlock Full Functionality", "Already unlocked (Paid version)")
else:
# Create a pop-up window to get the license key from the user
window = tk.Tk()
window.title("Enter License Key")
window.geometry("300x100")
label = tk.Label(window, text="Enter the license key:")
label.pack()
# entry = tk.Entry(window, show="*") # Hide entered characters
entry = tk.Entry(window) # Hide entered characters
entry.pack()
def submit_key():
entered_key = entry.get()
if entered_key == "BTED-KAKS-P2SE-2023":
create_hidden_file(file_path, content)
messagebox.showinfo("Congratulations", "Premium Unlocked")
#print("Unlock Full Functionality", "Full functionality unlocked (Paid version)")
else:
messagebox.showinfo("Invalid License KeY", "Invalid license key. Functionality remains limited (Free version)")
window.destroy()
# Recreate the menu and update the icon after the license key is changed
create_menu()
submit_button = tk.Button(window, text="Submit", command=submit_key)
submit_button.pack()
window.mainloop()
# Function to create the tray icon menu
def create_menu():
global menu, icon
menu = [
# pystray.MenuItem('Notification', lambda icon, item: show_tk_notification("Notification", "Your message goes here.")),
pystray.MenuItem('Created by Ahmad Hassan', open_url),
]
# Check if the program is running in the paid version and adjust the menu accordingly
if is_premium():
pass # If premium, do not show the "Buy for $2" and "Unlock Full Functionality" options
else:
menu.append(pystray.MenuItem('Buy for $2', open_url_buy))
menu.append(pystray.MenuItem('Enter Key', unlock_functionality))
menu.append(pystray.MenuItem('Exit', lambda icon, item: exit_program())) # Add the Exit option to the menu
# Update the icon with the new menu
icon.menu = pystray.Menu(*menu)
# Function to exit the program
def exit_program():
icon.stop()
sys.exit()
# Create the initial menu
menu = [] # Define an empty menu
icon = pystray.Icon("arrowTed by Ahmad Hassan", icon=icon_image, title=tooltip_text, menu=menu)
create_menu()
# Define the hotkey event hooks and suppress the default behavior (suppress=True)
def left_arrow():
pyautogui.press('left')
def down_arrow():
if is_premium():
pyautogui.press('down') # Full functionality for the paid version
else:
print("Limited Functionality", "Down arrow (Free version)") # Limited functionality for the free version
def up_arrow():
if is_premium():
pyautogui.press('up') # Full functionality for the paid version
else:
print("Limited Functionality", "Up arrow (Free version)") # Limited functionality for the free version
def right_arrow():
pyautogui.press('right')
key_actions = {
'i': up_arrow,
'j': left_arrow,
'k': down_arrow,
'l': right_arrow
}
# Function to handle combinations
def handle_combination(*keys):
for key in keys:
key_actions[key]() # Call the respective function for each key
# Add hotkeys for all combinations
keys = ['i', 'j', 'k', 'l']
# Single key combinations
for key in keys:
keyboard.add_hotkey(f'alt+{key}', handle_combination, args=(key,), suppress=True)
# Two key combinations
for combo in itertools.permutations(keys, 2):
keyboard.add_hotkey(f'alt+{combo[0]}+{combo[1]}', handle_combination, args=combo, suppress=True)
# Three key combinations
for combo in itertools.permutations(keys, 3):
keyboard.add_hotkey(f'alt+{combo[0]}+{combo[1]}+{combo[2]}', handle_combination, args=combo, suppress=True)
# Four key combinations
for combo in itertools.permutations(keys, 4):
keyboard.add_hotkey(f'alt+{combo[0]}+{combo[1]}+{combo[2]}+{combo[3]}', handle_combination, args=combo, suppress=True)
# Run the tray icon application
icon.run()