Skip to content

Instantly share code, notes, and snippets.

@flankerhqd
flankerhqd / JEB2AutoRenameByTypeInfo.py
Created September 18, 2017 07:21
JEB2 renaming script
# -*- coding: utf-8 -*-
"""
Sample client script for PNF Software's JEB2.
More samples are available on our website and within the scripts/ folder.
Refer to SCRIPTS.TXT for more information.
"""
static {
LSOItemData.CREATOR = new Parcelable.Creator() {
public LSOItemData createFromParcel(Parcel source) {
try {
int v1_1 = source.dataPosition();
int v2 = source.readByte();
source.setDataPosition(v1_1);
return LSOItemCreator.createItem(((byte)v2), source);
}
catch(Exception e) {
@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
@flankerhqd
flankerhqd / 7624.c
Created January 7, 2017 07:14
POC for CVE-2016-7624
//
// main.m
// cmdqueue1
//
// Created by keen on 2016-04-11.
// Copyright © 2016 keen. All rights reserved.
//
#include <dlfcn.h>
#import <Foundation/Foundation.h>
#include <stdlib.h>
@flankerhqd
flankerhqd / 1.py
Last active December 17, 2016 07:56
sample script for github issue
import mitmproxy
from mitmproxy.models import HTTPResponse
from netlib.http import Headers
import os
def request(context, flow):
print flow.request.url
if not flow.request.url.endswith("test.html"):
return
print "fuck"
resp = HTTPResponse([1,1], 302, "Found", ODictCaseless([["Context-Type", "text/html"], ["Location", "http://192.168.12.1/aaa.html"]]), "")
<?php
$tel_no = $_GET['hm'];
$c = $_GET['c']?$_GET['c']:0;
$c++;
?>
<!DOCTYPE html>
<html>
<head>
<title>迷你轰炸台 - 短信炸弹 - BETA!</title>
<?php
#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)
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