Skip to content

Commit

Permalink
chore: judge the length of encrypted text
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandaft committed Mar 21, 2023
1 parent 08406f7 commit db23e83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esurfingpy/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.5.0"
__date__ = "2023/03/20"
__version__ = "0.5.1"
__date__ = "2023/03/21"
__url__ = "https://github.com/Pandaft/ESurfingPy-CLI/"
2 changes: 2 additions & 0 deletions esurfingpy/esurfing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def login(account: str, password: str,
"password": password,
"rand": ocr_result,
}, separators=(',', ':'))
if len(data) > 117:
return False, log.error("账号或密码长度过长")
encrypted_data = rsa.encrypt(data.encode(), public_key)
login_key = binascii.b2a_hex(encrypted_data).decode()
time_taken = round(time.time() - log_time, 2)
Expand Down

0 comments on commit db23e83

Please sign in to comment.