This file contains hidden or 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: '16/3/4' | |
| # !/usr/bin/env python | |
| import ftplib | |
| import hmac | |
| import subprocess, json, base64, binascii, time, hashlib, re, copy, textwrap |
This file contains hidden or 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 os | |
| import requests | |
| import base64 | |
| import hmac | |
| import datetime | |
| from os.path import join, exists, relpath |
This file contains hidden or 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: '16/2/23' | |
| import sys | |
| if sys.version_info[0] < 3: | |
| sys.exit(1) | |
| from github import Github |
This file contains hidden or 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/local/bin/python2 | |
| # -*- coding: utf-8 -*- | |
| # Author: Ficapy | |
| # Create: '16/1/1' | |
| import datetime | |
| import os | |
| import sys | |
| import atexit | |
| import requests |
This file contains hidden or 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 http import cookies | |
| >>> cookies._getdate() | |
| 'Tue, 22 Dec 2015 06:47:08 GMT' |
This file contains hidden or 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' |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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') |