Skip to content

Instantly share code, notes, and snippets.

@ihciah
ihciah / tieba1.py
Created June 1, 2015 08:18
两个无聊的小脚本
# -*- coding: utf-8 -*-
#过滤最近1月发帖并且12级的用户
import urllib,urllib2,re
from multiprocessing import Pool
from multiprocessing.dummy import Pool as ThreadPool
URLBASE='http://tieba.baidu.com/f?kw=%E5%8D%8E%E4%B8%9C%E7%90%86%E5%B7%A5%E5%A4%A7%E5%AD%A6&ie=utf-8&pn='
result=set()
realres=[]
pool = ThreadPool(10)
@ihciah
ihciah / annotator.py
Last active February 1, 2016 15:02
Simple Object Postion Annotator
# Based on code by ShaoWeiYuan
# Multi-object annotation supported
# Depends on opencv and numpy
# Press 'n' to switch to next one, 'r' to restart annotation for this picture, and press 'q' when you want to stop.
import cv2, os
import numpy as np
file_list = []
saved_list = []
@ihciah
ihciah / tw.md
Last active February 17, 2016 15:40
台湾旅行计划

台湾行程 (Draft)

By Ihc

2.16~2.26


准备&Tips

  • 华夏银行银行
  • 准备visa(网上订高铁支付等)、银联银行卡
  • 随身物品备忘:证件(学生证、身份证、入台证、台湾通行证、护照)、银行卡、手机、相机、充电器以及连接线、移动电源、雨伞、衣服、耳机、一转多插头、一次性毛巾、洗漱用品(电动牙刷充好电
  • 打印入台证(彩)
  • 空白本子(用来盖纪念章)
@ihciah
ihciah / surge
Created April 5, 2016 02:51
surge_config
# Original: @shanskc
[General]
# warning, notify, info, verbose
loglevel = warning
# all-tcp-mode = false
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, e.crashlytics.com, apple.cn
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114, 8.8.8.8
[Proxy]
@ihciah
ihciah / jtr2hashcat
Created April 28, 2016 10:36
John the Ripper to Hashcat Convertor
#!/usr/bin/python
import re
pat=re.compile(r'NETNTLM:\s{1}(.*?):\$NETNTLM\$(.*?)\$(.*?)$', re.M)
with open('/home/ihciah/hostapd-2.2/hostapd/hostapd-wpe.log') as fo:
lines=fo.read()
user_list={x[0]:x for x in pat.findall(lines)}
with open('mschap.hash','w') as f:
f.write('\n'.join(map(lambda x:x[0]+"::::"+x[2]+":"+x[1],user_list.values())))
@ihciah
ihciah / GAME_MASTER_v0_1.json
Created July 17, 2016 08:38 — forked from rmkane/GAME_MASTER_v0_1.json
Pokemon GO Game Data
{
"Items": [ {
"TemplateId": "BADGE_BATTLE_ATTACK_WON",
"Badge": {
"BadgeType": "BADGE_BATTLE_ATTACK_WON",
"BadgeRanks": 4,
"Targets": "\\nd\\350\\007"
}
}, {
"TemplateId": "BADGE_BATTLE_TRAINING_WON",
@ihciah
ihciah / dnsmasq.conf
Last active July 25, 2016 06:21
Dnsmasq Adblock
server=/.mobads.baidu.com/127.0.0.0
server=/.mobads-logs.baidu.com/127.0.0.0
server=/.admob.com/127.0.0.0
server=/.adwhirl.com/127.0.0.0
server=/.googeadsserving.cn/127.0.0.0
server=/.googleads.g.doubleclick.net/127.0.0.0
server=/.adsmogo.net/127.0.0.0
server=/.adsmogo.org/127.0.0.0
server=/.adview.cn/127.0.0.0
server=/.domob.cn/127.0.0.0
@ihciah
ihciah / pt.py
Created September 7, 2016 12:23
FDU PT autologin
# -*- coding: utf-8 -*-
# FDU PT autologin script
import requests
import time
import re
import hashlib
ptusername = "ihciah"
ptuserinfo = "xxxxxxxxxxxxxxxxxxxxx"
@ihciah
ihciah / wx_claw.py
Created August 11, 2016 18:05
A script to get some rubbish article titles of wechat circle
# -*- coding: UTF-8 -*-
import requests
import re
import time
import random
import urllib
class requests_c:
@staticmethod
def get(url):
@ihciah
ihciah / cidhash
Created November 16, 2016 17:18
Xunlei CID HASH tool
#!/usr/bin/python
#__author__ = ['binux', 'ihciah']
import hashlib
import os
import sys
def cid_hash_file(path):
h = hashlib.sha1()
size = os.path.getsize(path)