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
#!/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
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 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
>>> from http import cookies | |
>>> cookies._getdate() | |
'Tue, 22 Dec 2015 06:47:08 GMT' |
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
Option Explicit | |
'建筑资料栋号递增批量打印PDF输出 | |
Sub replace() | |
Const F1 As String = "工程名称" '要修改单元格左边相邻单元格包含的内容 | |
Dim k As Integer | |
Dim sh As Worksheet | |
Dim myStr As String | |
Dim myStr2 As String | |
Dim myStr3 As String |
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 os | |
import requests | |
import base64 | |
import hmac | |
import datetime | |
from os.path import join, exists, relpath |
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 Crypto.Cipher import DES3 | |
import binascii | |
# 3DES加密32位ASCII字符串得到32位ASCII字符串 | |
# 密匙长度16bytes | |
# 3DES密文长度于明文长度相符,所以要加密得到32位明文中间有16进制转换('1F'→→→'\x1f') | |
# 加密前2个ASCII字符转换成1bytes(限制了只能是0-F) | |
def des3(key, msg): | |
cipher = DES3.new(binascii.unhexlify(key), DES3.MODE_ECB) | |
ret = cipher.encrypt(binascii.unhexlify(msg)) |
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: '7/12/16' | |
import socket | |
import requests | |
def getitem(pos, seq): |
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 __future__ import print_function | |
import random | |
import time | |
import sys | |
if not sys.stdout.isatty() or sys.version_info[0] == 2: | |
sys.exit(2) | |