Skip to content

Instantly share code, notes, and snippets.

Avatar
😘
Love EndlessLoop Everyday~

LeadroyaL LeadroyaL

😘
Love EndlessLoop Everyday~
View GitHub Profile
@LeadroyaL
LeadroyaL / Entry.java
Last active Sep 2, 2020
使用 xposed 自动开启 oppo usb 调试
View Entry.java
package com.leadroyal.oppousb;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XC_MethodReplacement;
import de.robv.android.xposed.XposedBridge;
@LeadroyaL
LeadroyaL / Entry.java
Last active Aug 24, 2020
使用xposed跳过oppo USB安装应用确认
View Entry.java
package com.leadroyal.oppousb;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
public class Entry implements IXposedHookLoadPackage {
@Override
@LeadroyaL
LeadroyaL / Entry.java
Created May 10, 2020
使用xposed跳过小米USB安装应用确认
View Entry.java
package com.leadroyal.miuiusb;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
@LeadroyaL
LeadroyaL / graph_demo.py
Created Oct 13, 2019
从汇编语句生成CFG:以balsnctf2019 Hack Compiler为例
View graph_demo.py
# coding:utf-8
from graphviz import Digraph
# 先加载asm文件,按照列表的方式去存
fd = open("main.asm")
lines = [l.strip('\n') for l in fd.readlines()]
fd.close()
# 遍历label,找到label对应的addr(应该是第一个label的addr)
@LeadroyaL
LeadroyaL / decrypt_armariris.py
Created Sep 15, 2019
Unicorn实战(二):去掉armariris的字符串加密
View decrypt_armariris.py
from elftools.elf.constants import P_FLAGS
from elftools.elf.elffile import ELFFile
from elftools.elf.sections import SymbolTableSection
from unicorn import Uc, UC_ARCH_ARM, UC_MODE_LITTLE_ENDIAN, UC_PROT_WRITE, UC_PROT_READ, UC_PROT_EXEC
from unicorn.arm_const import *
from capstone import Cs, CS_ARCH_ARM, CS_MODE_THUMB, CsInsn
from keystone import Ks, KS_MODE_THUMB, KS_ARCH_ARM, KS_MODE_ARM
import struct
filename = "./libcms.so"
@LeadroyaL
LeadroyaL / unflower_cms.py
Last active Feb 25, 2021
Unicorn实战(一):去掉libcms.so的花指令
View unflower_cms.py
from elftools.elf.constants import P_FLAGS
from elftools.elf.elffile import ELFFile
from unicorn import Uc, UC_ARCH_ARM, UC_MODE_LITTLE_ENDIAN, UC_HOOK_CODE, UC_PROT_READ, UC_PROT_WRITE, UC_PROT_EXEC
from unicorn.arm_const import *
from capstone import Cs, CS_ARCH_ARM, CS_MODE_THUMB, CsInsn
from keystone import Ks, KS_MODE_THUMB, KS_ARCH_ARM
# 找到.text节
filename = "./libcms.so"