コード例 #1
0
#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
#                                 -_     ~\      ~~---l__i__i__i--~~_/
#                                 _-~-__   ~)  \--______________--~~
#                               //.-~~~-~_--~- |-------~~~~~~~~
#                                      //.-~~~--\
#               神兽保佑
#                  永无BUG!

import sys
from src.config import config
from src.utils import aes,mysqlhelper


T = True
while T == True:
    aes_instance = aes.Aestion()
    mysqlhelper_instance = mysqlhelper.Mysqlhelper()
    pd = input('请输入(0:加密 1:解密 2:插入)')
    if pd == '1':
        try:
            data = input('请输入需要解密的字符串:')
            print('解密成功!明文为:' + aes_instance.decode_data(data))
        except:
            print('解密失败!')
            sys.exit()
    elif pd == '2':
        account_name = input('站点名称:')
        account_user = aes_instance.encode_data(input('用户名称:'))
        account_pwd = aes_instance.encode_data(input('用户密码:'))
        resume = input('备注:')
コード例 #2
0
#                                 _-~-__   ~)  \--______________--~~
#                               //.-~~~-~_--~- |-------~~~~~~~~
#                                      //.-~~~--\
#               神兽保佑
#                  永无BUG!

import requests
import json
import sys
import datetime
import time
import re
from src.config import config
from src.utils import aes

encryption_instance = aes.Aestion()

xh_token = encryption_instance.decode_data(config.xh_token)


class xhpt():
    def __init__(self, user, pwd):
        self.xh_user = user
        self.xh_password = pwd
        self.b = datetime.datetime.strptime(
            datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
            "%Y-%m-%d %H:%M:%S")
        self.s = requests.session()
        self.rece_body = ''
        self.t = ''
コード例 #3
0
 def __init__(self):
     aes_instance = aes.Aestion()
     self.mysqlhelper_instance = mysqlhelper.Mysqlhelper()
     self.km_mysql = mysqlhelper.Mysqlhelper(db='km')