nvd commited on
Update bot.py
Browse files
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
|
| 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
|
| 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 ----------
|