Skip to content

Instantly share code, notes, and snippets.

View zhangkn's full-sized avatar
❣️
https://kunnan.blog.csdn.net/

公众号:iOS逆向 zhangkn

❣️
https://kunnan.blog.csdn.net/
View GitHub Profile
@ryanchang
ryanchang / lldb_cheat_sheet.md
Last active May 2, 2024 11:24
LLDB Cheat Sheet

LLDB Cheat Sheet

A complete gdb to lldb command map.

Print out

  • Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
  • p - Print primitive type
@joswr1ght
joswr1ght / getios10beta1kernelcache.sh
Created June 23, 2016 10:44
Get iOS 10 Beta 1 Kernelcache for reverse engineering (iPhone 6s hardware)
# Get decrypted kernelcache
# URL for iOS 10 Beta 1 for iPhone 6s taken from http://pastebin.com/FRMfanmT
wget -q http://apple.co/28R9rhS -O ios10beta1-iphone6s.zip
mkdir ios10beta1
unzip -q ios10beta1-iphone6s.zip -d ios10beta1
cd ios10beta1
wget -q http://nah6.com/%7Eitsme/cvs-xdadevtools/iphone/tools/lzssdec.cpp
g++ -o lzssdec lzssdec.cpp
./lzssdec -o 439 < AssetData/boot/kernelcache.release.n71 >kernelcache.decrypted # 439 is offset byte count to 0xFFCFFAEDFE header
xxd kernelcache.decrypted | head -1
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@interface People : NSObject
- (People *(^)())run;
- (People *(^)())study;
- (People *(^)(NSString* name))name;
@end
@implementation People
- (People *(^)())run{
return ^{
NSLog(@"run");
return self;
@jridgewell
jridgewell / iOSOpenDev-Install.sh
Created April 3, 2013 06:32
A script to install iOSOpenDev
#!/bin/bash
# --------------------------------------------------------------
# iOSOpenDev -- iOS Open Development (http://www.iOSOpenDev.com)
# Copyright (C) 2012 Spencer W.S. James <dev@iosopendev.com>
# --------------------------------------------------------------
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
@tuupola
tuupola / protomower.sh
Last active June 29, 2021 21:52
Extract protocol buffer messages from binary data
#!/bin/bash
#
# Try to decode hidden protocol buffers message from binary
size=$(wc -c < $1)
for ((i=1; i<=$size; i++))
do
# Skip $i bytes and decode
dd if=$1 bs=1 skip=$i | protoc --decode_raw
@nowa
nowa / iOS App Store Crawler
Created August 4, 2010 04:19
iOS App Store Crawler
#!/usr/bin/env ruby
# iOS App Store Crawler by Nowa <nowazhu@gmail.com>
# 2010-08-04
require 'rubygems'
require 'hpricot'
require 'open-uri'
USERAGENT = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4'
LETTERS = %w{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z *}
@zhangkn
zhangkn / confuse.sh
Last active January 5, 2019 06:30
简易的混淆脚本,主要思路是把敏感方法名集中写在一个名叫func.list的文件中,逐一#define成随机字符,追加写入.h。------痛点就是一个一个手写
#!/usr/bin/env bash
TABLENAME=symbols
SYMBOL_DB_FILE="symbols"
STRING_SYMBOL_FILE="func.list"
HEAD_FILE="$PROJECT_DIR/$PROJECT_NAME/codeObfuscation.h"
export LC_CTYPE=C
#维护数据库方便日后作排重
createTable()