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
#!/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 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 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
#!/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 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
import requests | |
import inspect | |
from collections import defaultdict | |
def _tree(): return defaultdict(_tree) | |
tree = _tree() |
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) | |
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: '20/7/2016' | |
import inspect | |
import os | |
import re | |
import tempfile | |
import textwrap | |
import pkgutil |