Created
April 16, 2017 02:07
-
-
Save caioluders/89a7a95189a581e8d9bd557c1b9427d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from bitslicer import VirtualMemoryError, DebuggerError | |
| import keycode, keymod | |
| class Script(object): | |
| def __init__(self): | |
| self.currentLifeAddress = None # variable to store where the enemy's life address is | |
| debug.registerHotkey(keycode.A, keymod.CONTROL, self.killShip) # Add a hotkey to call the self.killShip function | |
| debug.addBreakpoint(vm.base() + 0xDC642, self.shipDamaged) # Make a breakpoint every time that mov [rdi+0x70], eax is reached and call self.shipDamaged , vm.base() is the pagination of the memory , this changes every time it loads | |
| def killShip(self,hotkeyID) : | |
| if self.currentLifeAddress is not None: | |
| vm.writeInt32(self.currentLifeAddress,0) # write 0 at the enemy's life | |
| def shipDamaged(self, instructionAddress, registers): | |
| self.currentLifeAddress = registers['rdi']+0x70 # gets the address of enemy's life | |
| debug.log(registers['rdi']) # debug shit | |
| debug.resume() | |
| def finish(self): | |
| debug.log('Cleaning up..') | |
| pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment