Commit 19236b73829344a55e940badaefdfbec34bd1ecb

Authored by liujiqiang
1 parent cc2cca77

传输路径优化

commons/readConf.py
@@ -25,7 +25,7 @@ class readConfig(object): @@ -25,7 +25,7 @@ class readConfig(object):
25 # # 本地调试路径 25 # # 本地调试路径
26 # self.file_path = os.path.abspath(os.path.join(os.getcwd(), "../..")) + self.relative_path+self.file_name 26 # self.file_path = os.path.abspath(os.path.join(os.getcwd(), "../..")) + self.relative_path+self.file_name
27 # 本地main方法执行路径 27 # 本地main方法执行路径
28 - self.file_path = os.path.abspath(os.path.join(os.getcwd(), "../")) + self.relative_path + self.file_name 28 + self.file_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../")) + self.relative_path + self.file_name
29 elif self.evn_name == 'posix': 29 elif self.evn_name == 'posix':
30 self.relative_path = r'/config/marketConfig/' 30 self.relative_path = r'/config/marketConfig/'
31 self.file_path = os.path.abspath(os.path.join(os.getcwd())) + self.relative_path + self.file_name 31 self.file_path = os.path.abspath(os.path.join(os.getcwd())) + self.relative_path + self.file_name
commons/scripts/pwdCry.py 0 → 100644
  1 +# -*- coding: utf-8 -*-
  2 +
  3 +# @Time : 2021/7/20 10:36
  4 +# @Author : Ljq
  5 +# @File : pwdCry.py
  6 +# @Software: PyCharm
  7 +
  8 +"""
  9 +
  10 +"""
  11 +
  12 +import base64
  13 +from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5
  14 +from Crypto.PublicKey import RSA
  15 +
  16 +def pwdCry(string):
  17 + public_key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgN7kda5L4ztOUquoHjubQIEyqBpjpaYeq+DBKXA3JNOZsMjGwLGVqfCwQg3HHAGTaWnxsp5gjmh0tSziJFgQf2u45TqA2UObOvklRhbWr56QoTNsjm72wZoSOlUzW3xHi/6PocHdy/7bMOiDf6fmYhFBZdRleX6tCAp7w6DsdbQIDAQAB'
  18 + key = '-----BEGIN PUBLIC KEY-----\n' + public_key + '\n-----END PUBLIC KEY-----'
  19 + rsakey = RSA.importKey(key)
  20 + print(rsakey)
  21 + cipher = Cipher_pksc1_v1_5.new(rsakey)
  22 + encrypt_text = cipher.encrypt(string.encode("utf-8"))
  23 + cipher_text = base64.b64encode(encrypt_text)
  24 + return cipher_text.decode()
0 \ No newline at end of file 25 \ No newline at end of file
report/__init__.py 0 → 100644
  1 +# -*- coding: utf-8 -*-
  2 +
  3 +# @Time : 2021/7/20 11:15
  4 +# @Author : Ljq
  5 +# @File : __init__.py.py
  6 +# @Software: PyCharm
  7 +
  8 +"""
  9 +
  10 +"""
report/test.log
  1 +[2021-07-20 11:16:24] [INFO] : 发送邮件
  2 +[2021-07-20 11:16:27] [INFO] : 邮件发送完毕