nvd commited on
Commit
2363feb
·
verified ·
1 Parent(s): 14305de

Update bot.py

Browse files
Files changed (1) hide show
  1. bot.py +3 -2
bot.py CHANGED
@@ -189,11 +189,12 @@ async def download_file(url, dest_path):
189
  def create_password_zip(apk_path, zip_path, password="bale"):
190
  """
191
  Creates a password‑protected ZIP archive containing the APK.
192
- Uses pyzipper with AES encryption, passing password directly to write().
193
  """
194
  with pyzipper.AESZipFile(zip_path, 'w', compression=pyzipper.ZIP_DEFLATED) as zf:
 
195
  arcname = os.path.basename(apk_path)
196
- zf.write(apk_path, arcname=arcname, password=password.encode())
197
  logger.info(f"🔐 Created password‑protected ZIP: {zip_path}")
198
 
199
  # ---------- Message / Callback handlers ----------
 
189
  def create_password_zip(apk_path, zip_path, password="bale"):
190
  """
191
  Creates a password‑protected ZIP archive containing the APK.
192
+ Uses pyzipper with AES encryption via setpassword().
193
  """
194
  with pyzipper.AESZipFile(zip_path, 'w', compression=pyzipper.ZIP_DEFLATED) as zf:
195
+ zf.setpassword(password.encode())
196
  arcname = os.path.basename(apk_path)
197
+ zf.write(apk_path, arcname=arcname)
198
  logger.info(f"🔐 Created password‑protected ZIP: {zip_path}")
199
 
200
  # ---------- Message / Callback handlers ----------