Skip to content

Instantly share code, notes, and snippets.

View qunwang6's full-sized avatar
🏠
Working from home

qunwang6

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
@qunwang6
qunwang6 / unwxapkg.py
Created January 1, 2018 13:46 — forked from thedreamwork/unwxapkg.py
unpack wxapkg
#!/usr/bin/python
# usage python unwxapkg.py filename
import sys,os
import struct
class WxapkgFile:
nameLen = 0
name = ""
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@qunwang6
qunwang6 / httpserver_qr.py
Created December 7, 2017 09:10 — forked from sydney0zq/httpserver_qr.py
simplehttpserver_with_qr_terminal
#!/usr/bin/env python3
import os
import html
import urllib
import sys
import http
import cgi
import socket
import socketserver
@qunwang6
qunwang6 / dns2https.php
Created October 11, 2016 08:54 — forked from diyism/dns2https.php
dns2https.php
<?php
/*
tcp dns client for google dns over https (https://dns.google.com)
ubuntu上使用:
在/etc/rc.local里加/usr/bin/php /home/<your_name>/dns2https.php
执行:
sysv-rc-conf unbound off
sysv-rc-conf dnscrypt-proxy off
@qunwang6
qunwang6 / pan.baidu.com.py
Created September 10, 2016 05:11 — forked from PeterDing/pan.baidu.com.py
百度云、百度网盘,递归下载自己的文件或分享的文件 -- keywords: pan.baidu.com, login, recursively, download -- # 移到仓库 https://github.com/PeterDing/iScript
#!/usr/bin/env python2
# vim: set fileencoding=utf8
import os
import sys
import requests
import urllib
import json
import re
import time
@qunwang6
qunwang6 / hatena-get-bookmark-count.sh
Created August 10, 2016 08:23 — forked from gh640/hatena-get-bookmark-count.sh
特定のサイトやページのはてブ数を取得するターミナル関数
# サイト全体のはてブ数を取得する
# get the sum total of hatena bookmark count for a site
#
# usage:
# hatena_get_count_for_site http://example.com
#
function hatena_get_count_for_site {
# @see http://developer.hatena.ne.jp/ja/documents/bookmark/apis/getcount
if [ "$#" -ne 1 ]; then
@qunwang6
qunwang6 / mac_dict_app.py
Created August 10, 2016 07:00 — forked from gh640/mac_dict_app.py
Python: Mac の辞書アプリをターミナルから利用するためのスクリプト
#!/usr/bin/python2.7
# coding: utf-8
"""Mac に備え付けの辞書アプリをコマンドラインで利用する
Usage:
/usr/bin/python2.7 __file__ < [検索したい単語を格納したファイル.txt]
See:
- Accessing Dictionaries
@qunwang6
qunwang6 / update_gfwlist.sh
Created June 7, 2016 15:39 — forked from VincentSit/update_gfwlist.sh
Automatically update the PAC for ShadowsocksX. Only tested on OS X.
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
@qunwang6
qunwang6 / wwdc2014_sessions
Created January 21, 2016 09:53 — forked from 6david9/wwdc2014_sessions
wwdc2014 sessions download links
import os.path
import requests
from lxml import etree
file_path = 'https://developer.apple.com/videos/wwdc/2014/'
sd_path = os.path.expanduser("~/Desktop/wwdc2014_sd.txt")
hd_path = os.path.expanduser("~/Desktop/wwdc2014_hd.txt")
pdf_path = os.path.expanduser("~/Desktop/wwdc2014_pdf.txt")