Skip to content

Instantly share code, notes, and snippets.

View 18z's full-sized avatar
🎐
Focusing

KunYuChen 18z

🎐
Focusing
View GitHub Profile
__author__ = 'Azzi'
#!/usr/bin/env python
from androguard.core.bytecodes import dvm, apk
from androguard.core.analysis import analysis
from androguard.decompiler.dad import decompile
from androguard.core.analysis import ganalysis
#"UILabs" is my app
#TEST = "C:/Users/Azzi/Desktop/an/UILabs.apk"
@18z
18z / tmux.md
Last active August 29, 2015 14:10 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@18z
18z / sizeup.bash
Last active August 29, 2015 14:13 — forked from ttscoff/sizeup.bash
__sizeup_build_query () {
local bool="and"
local query=""
for t in $@; do
query="$query -$bool -iname \"*.$t\""
bool="or"
done
echo -n "$query"
}
#include <stdio.h>
#define IN 1 /* inside a word */
#define OUT 0 /* outside a word */
/* count lines, words, and characters in input */
int main(){
int c, nl, nw, nc, state;
state = OUT;
nl = nw = nc = 0;
@18z
18z / TcpSeqRetrans.lua
Created January 29, 2016 01:40 — forked from lessmost/TcpSeqRetrans.lua
A simple wireshark lua script to analyze tcp retransmission and duplicated
-- A simple script to analyze Tcp Sequence Numbers
-- Usega: wireshark -X lua_script:TcpSeqRetrans.lua
-- open a pcap file in wireshark, and then select
-- the 'TOOLS/Tcp Sequence Analyze' menu.
-- menu function
function tsa_menu_func()
-- tsa analyze function
function tsa_do(ip1, ip2)
@18z
18z / TcpStreamAnalyze.lua
Created January 29, 2016 02:38 — forked from lessmost/TcpStreamAnalyze.lua
wireshark tcp stream split in lua script
-- This script is used to analyze tcp stream from the input
-- libcap file.
-- This scirpt current only works well with tshark
-- Usage:
-- tshark -X lua_script:TcpStreamAnalyze.lua -r inputfile -R display_filter
do
filter = "ip.addr == 192.168.201.53 && ip.addr == 192.168.201.46 && tcp.port == 80"
local streams_table = {} -- table to store all tcp streams
@18z
18z / keylogger.py
Created March 2, 2016 08:08 — forked from whym/keylogger.py
A simple key logger with xlib and python. Use with gist:402589
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This script is an modification of the script below.
#
#
# examples/record_demo.py -- demonstrate record extension
#
@18z
18z / gist:fa15cece0c23588a0ed5
Created March 23, 2016 09:01 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
from Xlib.display import Display
from Xlib import X
from Xlib.ext import record
from Xlib.protocol import rq
import time
disp = None
keysym_map = {
32: "SPACE",