Skip to content

Instantly share code, notes, and snippets.

@caioluders
Created November 16, 2016 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caioluders/938676f160e835291b972381c5cf43f7 to your computer and use it in GitHub Desktop.
Save caioluders/938676f160e835291b972381c5cf43f7 to your computer and use it in GitHub Desktop.
#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