Created
November 16, 2016 02:09
-
-
Save caioluders/938676f160e835291b972381c5cf43f7 to your computer and use it in GitHub Desktop.
This file contains 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
#Edit Me! | |
#Introduction to scripting: https://github.com/zorgiepoo/Bit-Slicer/wiki/Introduction-to-Scripting | |
from bitslicer import VirtualMemoryError, DebuggerError | |
import keycode, keymod | |
class Script(object): | |
def __init__(self): | |
self.currentLifeAddress = None | |
debug.log('Initialization..') | |
debug.registerHotkey(keycode.A, keymod.CONTROL, self.killShip) | |
debug.addBreakpoint(vm.base() + 0xDC642, self.shipDamaged) | |
def killShip(self,hotkeyID) : | |
if self.currentLifeAddress is not None: | |
vm.writeInt32(self.currentLifeAddress,0) | |
def shipDamaged(self, instructionAddress, registers): | |
#original instruction: mov [rbx+rdx], ecx | |
self.currentLifeAddress = registers['rdi']+0x70 | |
debug.log(registers['rdi']) | |
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