Created
February 1, 2013 18:34
-
-
Save brandon15811/4693146 to your computer and use it in GitHub Desktop.
libminecraftpe.so dumper
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
#!/usr/bin/python | |
import subprocess | |
import sys | |
functions = subprocess.check_output(['./arm-eabi-nm', '-DCnS', 'libminecraftpe.so']).splitlines() | |
for functions_line in functions: | |
if "MobFactory::CreateMob" in functions_line:#if "Packet::write" in functions_line: | |
functions_line_split = functions_line.split(' ') | |
stop_address = hex(int(functions_line_split[0], 16) + int(functions_line_split[1], 16)) | |
function = subprocess.check_output(['./arm-eabi-objdump', | |
'-CD', | |
'--start-address=0x' + functions_line_split[0], | |
'--stop-address=' + stop_address, | |
'libminecraftpe.so']).splitlines()[6:] | |
print function[0].split(' ', 1)[1] | |
function = function[1:] | |
for function_line in function: | |
if not function_line.strip(): | |
continue | |
function_line_split = function_line.split('\t') | |
#print function_line | |
if function_line_split[2] == "bl" and not "<operator new(unsigned int)>" in function_line: | |
print "\t" + function_line_split[3].split(' ', 1)[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment