Skip to content

Instantly share code, notes, and snippets.

View annidy's full-sized avatar
💭
I may be slow to respond.

fengxing annidy

💭
I may be slow to respond.
View GitHub Profile
@annidy
annidy / h264_sps_parser.h
Last active March 19, 2022 20:13
my sps parser ext
/*
* h264_sps_parser.h
*
* Copyright (c) 2014 Zhou Quan <zhouqicy@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@annidy
annidy / srb.py
Created November 10, 2016 12:24
ASLR修正lldb脚本
#!/usr/bin/python
#coding:utf-8
import lldb
import commands
import optparse
import shlex
import re
# 获取ASLR偏移地址
def get_ASLR():
# 获取'image list -o'命令的返回结果
static char *url_escape(char *path, int len) {
char *org_path = strdup(path);
memset(path, 0, len);
char *enc = path;
for (char *s = org_path; *s && (enc - path < len - 3); s++) {
if (strchr("!*'();:@&=+$,/?%%#[]", *s) != NULL) {
sprintf(enc, "%%%02X", *s);
} else {
sprintf(enc, "%c", *s);
}
@annidy
annidy / main.c
Last active May 13, 2016 15:45
leetcode binary tree loader
// create by annidy
// 2016-05-13
#include <stdio.h>
#include <utlist.h>
#include <string.h>
#include <stdlib.h>
struct TreeNode {
int val;
struct TreeNode *left;
@annidy
annidy / jpgrec.py
Created February 9, 2016 07:57
JPG照片修复
# -*- coding: utf8 -*-
# !/usr/bin/env python
__author__ = 'fengxing'
__date__ = '2012-1-18 20:13'
import sys
#!/bin/bash
ssh -p 2222 root@localhost "/sbin/hfs_uti /dev/rdisk0s2s1 cat /.journal" > my.journal
ssh -p 2222 root@localhost "/sbin/hfs_uti /dev/rdisk0s1s2 cat /.journal" > my.journal
@annidy
annidy / test.m
Last active January 30, 2023 03:25
NSCharacterSet example
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
@annidy
annidy / xcode.lua
Last active November 25, 2015 07:03
-- make xcode work on my iPhone
filename = arg[1]
mycodesign = "iPhone Developer: jie zhao (BF2E4X5CV7)"
if not string.find(filename, "project.pbxproj$") then
print("Usage: "..arg[0].." project.pbxproj")
os.exit(1)
end
@annidy
annidy / map.lua
Last active May 4, 2018 02:37
Xcode link map文件的lua分析脚本
#!/usr/bin/env lua
-- http://www.jianshu.com/p/92a041b1b825
obj_tbl = {} -- {[3]={file, module}}
syb_tbl = {} -- {[3]=47}
filter_tbl = nil -- {'Test.o'}
appname = nil
function process_object(line)
#import "NSData+OADataHelpers.h"
@implementation NSData (OADataHelpers)
- (NSString*) UTF8String
{
// First we try strict decoding to avoid iconv overhead when not needed (majority of cases).
NSString* str = [[[NSString alloc] initWithData:self encoding:NSUTF8StringEncoding] autorelease];
if (!str)
{