Skip to content

Instantly share code, notes, and snippets.

@flankerhqd
flankerhqd / ddi class dump
Created July 10, 2014 14:45
ddi class dump
I/dalvikvm( 705): Ljava/lang/Long;
I/dalvikvm( 705): Landroid/graphics/LightingColorFilter;
I/dalvikvm( 705): Landroid/os/StrictMode$LogStackTrace;
I/dalvikvm( 705): Landroid/net/Uri$Part;
I/dalvikvm( 705): Lcom/android/internal/app/AlertController$ButtonHandler;
I/dalvikvm( 705): Landroid/widget/QuickContactBadge$QueryHandler;
I/dalvikvm( 705): Ljava/security/KeyFactorySpi;
I/dalvikvm( 705): Landroid/util/StateSet;
I/dalvikvm( 705): Lcom/android/org/bouncycastle/asn1/x509/AlgorithmIdentifier;
I/dalvikvm( 705): Ljava/util/concurrent/Executors$DefaultThreadFactory;
@flankerhqd
flankerhqd / external.patch
Created June 5, 2014 13:17
Patch on mksh to enable shell command logging into logcat. Rememeber to replace ash to mksh on emulator builds.
diff --git a/Android.mk b/Android.mk
index e53b863..1d3854e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -8,7 +8,6 @@ LOCAL_PATH:= $(call my-dir)
# /system/etc/mkshrc
include $(CLEAR_VARS)
-
LOCAL_MODULE:= mkshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="ys"
# Example aliases
@flankerhqd
flankerhqd / ddi test
Created May 10, 2014 06:44
ddi SmsManager hook test
/*
* Collin's Dynamic Dalvik Instrumentation Toolkit for Android
* Collin Mulliner <collin[at]mulliner.org>
*
* (c) 2012,2013
*
* License: LGPL v2.1
*
*/
@flankerhqd
flankerhqd / sslfun.py
Last active August 29, 2015 13:58
python sslfun
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
#include <sched.h>
#include <sys/ptrace.h>
#include <sys/user.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <signal.h>
/* S */
int nuke_cpu(void)
<?php
$tel_no = $_GET['hm'];
$c = $_GET['c']?$_GET['c']:0;
$c++;
?>
<!DOCTYPE html>
<html>
<head>
<title>迷你轰炸台 - 短信炸弹 - BETA!</title>
<?php
5LmL5YmN5rKh55yL5Yiw5ZOq5Liq6auY566h6KKr6L+Z5LmI5a6h5Yik55qE77yM5LiA55u05oSf6KeJ6JaE5Y+q5piv5pS/5rK75paX5LqJ55qE5aSx6LSl6ICF77yM5omA5Lul5omN6KKr6L+Z5qC356S65LyX44CC5pyJ5Liq6K+05rOV5piv5Lit5YWx6YOo57qn5Lul5LiK6auY566h77yM5ouJ5Ye65Y675p6q5q+Z5LqG5LqL5ZCO5p+l5LiN5Lya5pyJ5LiA5Liq5Yak5p6J55qE
@flankerhqd
flankerhqd / gist:6035369
Created July 19, 2013 04:31
selenium mouse test
url = "http://www.html5canvastutorials.com/demos/advanced/html5-canvas-mouse-coordinates/index.php"
import selenium
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get(url)
time.sleep(1)
print "starting movement"
#name = driver.find_element_by_id("pixelCanvas")
import Tkinter as tk
class GameBoard(tk.Frame):
def __init__(self, parent, rows=8, columns=8, size=32, color1="white", color2="black", color3="blue"):
'''size is the size of a square, in pixels'''
self.rows = rows + 1
self.columns = columns + 1