Skip to content

Instantly share code, notes, and snippets.

View mengxipeng1122's full-sized avatar

Meng Xipeng mengxipeng1122

View GitHub Profile
@mengxipeng1122
mengxipeng1122 / gist:22aee547f2f8348cfe469ca771671f5a
Created August 7, 2023 08:14
Python script to decrypt files in asset.dat using Thumb incstructions at mkemu
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import base64
import os
import struct
import unicorn
from unicorn import *
@mengxipeng1122
mengxipeng1122 / gist:b161b62ce6ecaa9479ada6b1b45f99d8
Created August 7, 2023 07:54
Python script to decrypto config.data file by emulating Thumb instructions in loader
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import unicorn
from unicorn import *
from unicorn.arm_const import *
from capstone import *
from capstone.arm import *
from hexdump import *
@mengxipeng1122
mengxipeng1122 / gist:dc6b97944f370bf0f87a377946971229
Created August 7, 2023 07:36
Calculate the key for the LUKS file by emulating Thumb instructions in loader
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import unicorn
from unicorn import *
from unicorn.arm_const import *
from capstone import *
from capstone.arm import *
from hexdump import *
extern "C" int test(void* baseaddress, char* outdir)
{
#ifdef __arm__ // for 32-bit ARM
LOG_INFO(0x100,"arch armeabi ");
#else
#ifdef __aarch64__ // 64-bit ARM
LOG_INFO(0x100,"arch aach64 ");
#else