Skip to content

Instantly share code, notes, and snippets.

View korniltsev's full-sized avatar
🍭
s/jz/jnz/

Tolya Korniltsev korniltsev

🍭
s/jz/jnz/
View GitHub Profile
@korniltsev
korniltsev / count_apk_methods.sh
Created October 22, 2016 16:11 — forked from chetbox/count_apk_methods.sh
Method count of multidex APK one-liner
apk=app.apk count=0 ; for dex in $(unzip -Z1 $apk classes*.dex); do count=$(($count + $(unzip -p $apk $dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'))) ; done ; echo $count
@korniltsev
korniltsev / crashlytics.gradle
Created June 1, 2017 15:39
crashlytics.gradle
task prepareCrashlyticsNdkDirs(type: PrepareCrashlyticsNdkDirs) {
libs = ["imgp","jpeg-turbo1500","lum","native_tools","usb100","uvc","UVCCamera"]
archs = ["x86", "armeabi-v7a"]
flavorPath = ["prod", "obfuscate"]
libsDir = new File(projectDir, 'libs')
objDir = new File(projectDir, 'obj')
}
class PrepareCrashlyticsNdkDirs extends DefaultTask {
@Input List<String> libs
@korniltsev
korniltsev / ok.diff
Created June 27, 2017 19:01
ok.diff
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6eb87b0..3dee761 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -45,6 +45,8 @@
</intent-filter>
</activity>
+ <activity android:name="ru.ok.android.sdk.OkAuthActivity"/>
+
@korniltsev
korniltsev / gist:214d81d0869df79245da7469240f0e89
Created March 8, 2018 10:22
Wathsap UncaughtExceptionHandler
.class final Lcom/whatsapp/App$1;
.super Ljava/lang/Object;
.source ""
# interfaces
.implements Ljava/lang/Thread$UncaughtExceptionHandler;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
@korniltsev
korniltsev / OkApy.py
Last active February 19, 2019 08:44
OkApy.py
import requests
import json
import urllib
import gzip
import cStringIO
urllib.quote_plus = urllib.quote
class Request:
@korniltsev
korniltsev / qemu-networking.md
Created August 6, 2019 22:37 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@korniltsev
korniltsev / scapy_bridge.py
Created September 3, 2019 19:23 — forked from eXenon/scapy_bridge.py
Use scapy as a modifying proxy
#!/usr/bin/python2
"""
Use scapy to modify packets going through your machine.
Based on nfqueue to block packets in the kernel and pass them to scapy for validation
"""
import nfqueue
from scapy.all import *
import os
@korniltsev
korniltsev / unflower_cms.py
Created November 12, 2019 21:59 — forked from LeadroyaL/unflower_cms.py
Unicorn实战(一):去掉libcms.so的花指令
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"
@korniltsev
korniltsev / listdevices
Created November 23, 2019 21:23 — forked from PsychoTea/PanicParser.py
A collection of useful iOS-related scripts
#!/bin/bash
for id in $(idevice_id -l); do
ideviceinfo_data=$(ideviceinfo -u $id)
product_type=$(echo "$ideviceinfo_data" | grep ProductType | sed 's/ProductType: //g')
# strip 'iPhone' or 'iPad' and the comma from the product type
short_product_type=$(echo "$product_type" | sed 's/iPhone//g; s/iPad//g; s/,//g' )
@korniltsev
korniltsev / _.md
Created January 13, 2020 07:24 — forked from Jinmo/_.md
C/C++ header to IDA

Usage

In IDAPython,

execfile('<path>/cxxparser.py')
parse_file('<path>/a.cpp',[r'-I<path>\LuaJIT-2.0.5\src', '-D__NT__', '-D__X64__', '-D__EA64__'])
parse_file('<path>/malloc.c',['-target=x86_64-linux-gnu'])