# uncompyle6 version 3.5.0
# Python bytecode 3.8 (3413)
# Decompiled from: Python 3.7.2 (default, Dec 29 2018, 06:19:36)
# [GCC 7.3.0]
# Embedded file name: verifypwd.py
# Size of source mod 2**32: 272 bytes
import pymssql, hashlib
sqldic = {'192.168.7.7':'ftp7',
'192.168.10.7':'ftp10.7', '192.168.10.6':'ftp10.6', '192.168.7.4':'ftp4', '192.168.7.5':'ftp7.5', '192.168.17.6':'ftp17.6', '192.168.7.18':'ftp7-18', '192.168.7.22':'ftp7-22', '192.168.17.4':'ftp17-4', '192.168.17.7':'ftp17.7', '192.168.10.3':'ftp10.3', '192.168.11.3':'ftp19-3'}
T = True
while True:
if T == True:
srv = input('FTP服务器IP地址:')
if srv in sqldic.keys():
LoginID = input('账号:')
password = input('密码:')
db = sqldic[srv]
db_conn = pymssql.connect(host='192.168.2.39', user='aaa', password='bbb', database=db)
cursor = db_conn.cursor()
try:
cursor.execute("select Password from SUUsers where LoginID = '%s'" % LoginID)
pwd = cursor.fetchall()
if pwd:
char = pwd[0][0][:2]
md = char + password
m = hashlib.md5()
m.update(md.encode('utf-8'))
mdpwd = m.hexdigest()
if char + mdpwd.upper() == pwd[0][0]:
print('密码正确')
else:
print('密码错误')
else:
print('账户错误')
finally:
cursor.close()
else:
print('请确认服务器地址!')
F = input('回车继续(输入quit退出)...')
T = F.lower() == 'quit' and False
continue
# NOTE: have internal decompilation grammar errors.
# Use -t option to show full context.
# not in loop:
# continue
# L. 39 326 CONTINUE 50 'to 50'