This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total = 2292627 | |
import sys | |
import codecs | |
from encodings.aliases import aliases | |
import mmap | |
all_encoding = aliases.values() | |
all_encoding = list(set(all_encoding)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from concurrent.futures import ThreadPoolExecutor, as_completed | |
from user_agent import generate_user_agent | |
import requests | |
from pyquery import PyQuery as pq | |
def singal_parse(id): | |
url = 'http://www.miaoss.net/reg.php?id={}'.format(id) | |
ret = requests.get(url, params={'User-Agent': generate_user_agent()}, timeout=30) | |
ret.encoding = 'utf-8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Author: Ficapy | |
import requests | |
import base64 | |
import hmac | |
import os | |
import sys | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Author: Ficapy | |
from __future__ import division, print_function | |
import sys | |
import re | |
import urllib | |
import sqlite3 | |
import tempfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Author: Ficapy | |
# Create: '15/10/27' | |
from pyquery import PyQuery as pq | |
from operator import attrgetter | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
from operator import methodcaller | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from Crypto.Cipher import PKCS1_v1_5 | |
from Crypto.PublicKey import RSA | |
from Crypto.Hash import SHA | |
from Crypto import Random | |
from Crypto.Cipher import AES | |
aes_obj_enc = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OSX: | |
http://osxdaily.com/2013/05/31/create-large-file-mac-os-x/ | |
mkfile -n size[b|k|m|g] filename | |
Others: | |
http://www.skorks.com/2010/03/how-to-quickly-generate-a-large-file-on-the-command-line-with-linux/ | |
dd if=/dev/zero of=somefile bs=1 seek=1G count=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum -y update | |
sudo yum groupinstall -y 'development tools' | |
sudo yum install -y zlib-devel bzip2-devel openssl-devel xz-libs wget | |
wget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz | |
xz -d Python-2.7.8.tar.xz | |
tar -xvf Python-2.7.8.tar | |
cd Python-2.7.8 | |
# Run the configure: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools | |
mkdir /nghttp2 | |
git clone https://github.com/tatsuhiro-t/nghttp2.git | |
cd nghttp2 | |
autoreconf -i | |
automake | |
autoconf | |
./configure | |
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import random | |
import requests | |
from hashlib import sha1 | |
key = 'a2ffa5c9be0748*********' # 登陆页面查看源码获得 | |
deviceId = '98:5a:eb:*****' | |
pwd = '*************' | |
url = 'http://192.168.31.1/cgi-bin/luci/api/xqsystem/login' | |
reboot_url = 'http://192.168.31.1/cgi-bin/luci/;stok={}/api/xqsystem/reboot?client=web' |