├── ModMenu ├── settings.py └── gui.py ├── injecting-code.py └── infinite_ammo_hack.py /ModMenu/settings.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | BG = "black" 4 | FG = "white" 5 | 6 | OPEN = "f1" 7 | -------------------------------------------------------------------------------- /injecting-code.py: -------------------------------------------------------------------------------- 1 | import pymem 2 | import subprocess 3 | 4 | try: 5 | mem = pymem.Pymem("notepad.exe") ### reads memory of notepad.exe 6 | except: 7 | subprocess.Popen("notepad.exe") 8 | mem = pymem.Pymem("notepad.exe") 9 | 10 | mem.inject_python_interpreter() ### injects the python interpreter to be able to understand python code 11 | 12 | ### code which we will be injecting 13 | code = """ 14 | import tkinter as tk 15 | 16 | win = tk.Tk() 17 | win.mainloop() 18 | """ 19 | 20 | mem.inject_python_shellcode(code) ### injecting the code 21 | -------------------------------------------------------------------------------- /infinite_ammo_hack.py: -------------------------------------------------------------------------------- 1 | from pymem import * 2 | from pymem.process import * 3 | 4 | 5 | mem = Pymem("ac_client.exe") 6 | game_module = module_from_name(mem.process_handle, "ac_client.exe").lpBaseOfDll 7 | 8 | 9 | def getPtrAddr(address, offsets): 10 | addr = mem.read_int(address) 11 | for offset in offsets: 12 | if offset != offsets[-1]: 13 | addr = mem.read_int(addr + offset) 14 | addr = addr + offsets[-1] 15 | return addr 16 | 17 | while True: 18 | mem.write_int(getPtrAddr(game_module + 0x0011E20C, [0x520, 0x568, 0x1E8, 0x3F0, 0x4E0]), 1000) 19 | -------------------------------------------------------------------------------- /ModMenu/gui.py: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | from pymem import * 3 | from pymem.process import * 4 | from settings import * 5 | import keyboard as kb 6 | from threading import Thread 7 | from time import sleep 8 | 9 | mem = Pymem("ac_client.exe") 10 | module = module_from_name(mem.process_handle, "ac_client.exe").lpBaseOfDll 11 | ammo_offsets = [0x598, 0x410, 0x434, 0x3C8, 0xC] 12 | 13 | def getPointerAddr(base, offsets): 14 | addr = mem.read_int(base) 15 | for offset in offsets: 16 | if offset != offsets[-1]: 17 | addr = mem.read_int(addr + offset) 18 | addr = addr + offsets[-1] 19 | return addr 20 | 21 | class ModMenu(): 22 | def __init__(self, window_title, width, height): 23 | self.win = Tk() 24 | x, y = self.center(width, height) 25 | self.win.geometry(f"{width}x{height}+{x}+{y}") 26 | self.win.overrideredirect(True) 27 | self.win.wm_attributes("-topmost", 1) 28 | self.win.wm_attributes("-alpha", 0.7) 29 | self.win.configure(background=BG) 30 | 31 | self.title_label = Label(self.win, text=window_title, font=('Arial',12), bg=BG, fg=FG) 32 | self.title_label.pack() 33 | 34 | self.ammo_btn = Button(self.win, text="Ammo Hack", font=('Arial',14), bg=BG, fg=FG, command=self.ammo_hack) 35 | self.ammo_btn.pack() 36 | 37 | self.exit_btn = Button(self.win, text="Exit", font=('Arial',14), bg=BG, fg=FG, command=self.win.destroy) 38 | self.exit_btn.place(x=160, y=150) 39 | 40 | def ammo_hack(self): 41 | mem.write_int(getPointerAddr(module + 0x0011E20C, ammo_offsets), 1000) 42 | 43 | def center(self, width, height): 44 | swidth = self.win.winfo_screenwidth() 45 | sheight = self.win.winfo_screenheight() 46 | x = (swidth/2) - (width/2) 47 | y = (sheight/2) - (height/2) 48 | return int(x), int(y) 49 | 50 | 51 | 52 | def keybinds(modmenu): 53 | isopen = True 54 | while True: 55 | if kb.is_pressed(OPEN): 56 | if isopen == True: 57 | modmenu.win.withdraw() 58 | isopen = False 59 | else: 60 | modmenu.win.deiconify() 61 | isopen = True 62 | modmenu.win.focus_force() 63 | sleep(0.5) 64 | 65 | 66 | 67 | 68 | 69 | 70 | modmenu = ModMenu("Assault Cube Hack", 350, 200) 71 | 72 | keybinds_thread = Thread(target=keybinds, args=(modmenu,)) 73 | keybinds_thread.setDaemon(True) 74 | keybinds_thread.start() 75 | 76 | modmenu.win.mainloop() 77 | --------------------------------------------------------------------------------