sticker-convert 2.9.0__tar.gz → 2.9.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {sticker_convert-2.9.0/src/sticker_convert.egg-info → sticker_convert-2.9.1}/PKG-INFO +3 -3
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/requirements.txt +2 -2
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/windows/viber_get_auth_window.py +8 -2
- sticker_convert-2.9.1/src/sticker_convert/resources/memdump_windows.ps1 +8 -0
- sticker_convert-2.9.1/src/sticker_convert/utils/auth/get_viber_auth.py +441 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/version.py +1 -1
- {sticker_convert-2.9.0 → sticker_convert-2.9.1/src/sticker_convert.egg-info}/PKG-INFO +3 -3
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert.egg-info/SOURCES.txt +2 -1
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert.egg-info/requires.txt +2 -2
- sticker_convert-2.9.0/src/sticker_convert/utils/auth/get_viber_auth.py +0 -315
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/LICENSE +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/MANIFEST.in +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/README.md +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/pyproject.toml +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/setup.cfg +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/__init__.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/__main__.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/cli.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/converter.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/definitions.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/downloaders/__init__.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/downloaders/download_base.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/downloaders/download_kakao.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/downloaders/download_line.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/downloaders/download_signal.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/downloaders/download_telegram.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/downloaders/download_viber.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/__init__.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/gui_utils.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/job.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/job_option.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/appicon.icns +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/appicon.ico +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/appicon.png +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/compression.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/emoji.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/help.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/input.json +0 -0
- /sticker_convert-2.9.0/src/sticker_convert/resources/memdump.sh → /sticker_convert-2.9.1/src/sticker_convert/resources/memdump_linux.sh +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/resources/output.json +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/uploaders/__init__.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/uploaders/upload_base.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/uploaders/upload_signal.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/uploaders/upload_viber.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/auth/get_signal_auth.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/callback.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/files/cache_store.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/files/json_manager.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/files/json_resources_loader.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/files/run_bin.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/media/codec_info.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/media/format_verify.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert/utils/url_detect.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert.egg-info/entry_points.txt +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/src/sticker_convert.egg-info/top_level.txt +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/tests/test_compression.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/tests/test_download.py +0 -0
- {sticker_convert-2.9.0 → sticker_convert-2.9.1}/tests/test_export.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.9.
|
3
|
+
Version: 2.9.1
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -376,11 +376,11 @@ Requires-Dist: mergedeep~=1.3.4
|
|
376
376
|
Requires-Dist: numpy>=1.22.4
|
377
377
|
Requires-Dist: Pillow~=10.3.0
|
378
378
|
Requires-Dist: pyoxipng~=9.0.0
|
379
|
-
Requires-Dist: python-telegram-bot~=21.
|
379
|
+
Requires-Dist: python-telegram-bot~=21.3
|
380
380
|
Requires-Dist: psutil~=5.9.8
|
381
381
|
Requires-Dist: PyMemoryEditor~=1.5.22
|
382
382
|
Requires-Dist: requests~=2.32.3
|
383
|
-
Requires-Dist: rlottie_python~=1.3.
|
383
|
+
Requires-Dist: rlottie_python~=1.3.6
|
384
384
|
Requires-Dist: signalstickers-client-fork-laggykiller~=3.3.0.post2
|
385
385
|
Requires-Dist: sqlcipher3-wheels~=0.5.2.post1
|
386
386
|
Requires-Dist: tqdm~=4.66.4
|
@@ -10,11 +10,11 @@ mergedeep~=1.3.4
|
|
10
10
|
numpy>=1.22.4
|
11
11
|
Pillow~=10.3.0
|
12
12
|
pyoxipng~=9.0.0
|
13
|
-
python-telegram-bot~=21.
|
13
|
+
python-telegram-bot~=21.3
|
14
14
|
psutil~=5.9.8
|
15
15
|
PyMemoryEditor~=1.5.22
|
16
16
|
requests~=2.32.3
|
17
|
-
rlottie_python~=1.3.
|
17
|
+
rlottie_python~=1.3.6
|
18
18
|
signalstickers-client-fork-laggykiller~=3.3.0.post2
|
19
19
|
sqlcipher3-wheels~=0.5.2.post1
|
20
20
|
tqdm~=4.66.4
|
@@ -51,11 +51,17 @@ class ViberGetAuthWindow(BaseWindow):
|
|
51
51
|
justify="left",
|
52
52
|
anchor="w",
|
53
53
|
)
|
54
|
+
else:
|
55
|
+
self.explanation_lbl2 = Label(
|
56
|
+
self.frame_info,
|
57
|
+
text="You may be asked for admin password.",
|
58
|
+
justify="left",
|
59
|
+
anchor="w",
|
60
|
+
)
|
54
61
|
|
55
62
|
self.explanation_lbl0.grid(column=0, row=0, sticky="w", padx=3, pady=3)
|
56
63
|
self.explanation_lbl1.grid(column=0, row=1, sticky="w", padx=3, pady=3)
|
57
|
-
|
58
|
-
self.explanation_lbl2.grid(column=0, row=2, sticky="w", padx=3, pady=3)
|
64
|
+
self.explanation_lbl2.grid(column=0, row=2, sticky="w", padx=3, pady=3)
|
59
65
|
|
60
66
|
# Start button frame
|
61
67
|
self.launch_btn = Button(
|
@@ -0,0 +1,8 @@
|
|
1
|
+
param($processId)
|
2
|
+
$dumpFilePath = "$Env:TEMP\memdump.bin.$processId"
|
3
|
+
|
4
|
+
Powershell -c rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump $processId $dumpFilePath full
|
5
|
+
|
6
|
+
icacls $dumpFilePath /remove "Everyone"
|
7
|
+
icacls $dumpFilePath /grant "Everyone:(r)"
|
8
|
+
icacls $dumpFilePath /grant "Everyone:(w)"
|
@@ -0,0 +1,441 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
import importlib.util
|
3
|
+
import os
|
4
|
+
import platform
|
5
|
+
import shutil
|
6
|
+
import signal
|
7
|
+
import subprocess
|
8
|
+
import time
|
9
|
+
from getpass import getpass
|
10
|
+
from pathlib import Path
|
11
|
+
from typing import Callable, List, Optional, Tuple, cast
|
12
|
+
|
13
|
+
from sticker_convert.definitions import ROOT_DIR
|
14
|
+
|
15
|
+
MSG_NO_BIN = """Viber Desktop not detected.
|
16
|
+
Download and install Viber Desktop,
|
17
|
+
then login to Viber Desktop and try again."""
|
18
|
+
MSG_NO_AUTH = """Viber Desktop installed,
|
19
|
+
but viber_auth not found.
|
20
|
+
Please login to Viber Desktop and try again."""
|
21
|
+
MSG_SIP_ENABLED = """You need to disable SIP:
|
22
|
+
1. Restart computer in Recovery mode
|
23
|
+
2. Launch Terminal from the Utilities menu
|
24
|
+
3. Run the command `csrutil disable`
|
25
|
+
4. Restart your computer"""
|
26
|
+
MSG_NO_PGREP = "pgrep command or psutil python package is necessary"
|
27
|
+
MSG_LAUNCH_FAIL = "Failed to launch Viber"
|
28
|
+
MSG_PERMISSION_ERROR = "Failed to read Viber process memory"
|
29
|
+
|
30
|
+
|
31
|
+
def check_admin_windows() -> bool:
|
32
|
+
username = os.getenv("username")
|
33
|
+
if username is None:
|
34
|
+
return False
|
35
|
+
|
36
|
+
s = subprocess.run(
|
37
|
+
["net", "user", username],
|
38
|
+
capture_output=True,
|
39
|
+
text=True,
|
40
|
+
).stdout
|
41
|
+
|
42
|
+
return True if "*Administrators" in s else False
|
43
|
+
|
44
|
+
|
45
|
+
def check_admin_linux() -> bool:
|
46
|
+
s = subprocess.run(
|
47
|
+
["sudo", "-l"],
|
48
|
+
capture_output=True,
|
49
|
+
text=True,
|
50
|
+
).stdout
|
51
|
+
|
52
|
+
return True if "may run the following commands" in s else False
|
53
|
+
|
54
|
+
|
55
|
+
def killall(name: str) -> bool:
|
56
|
+
result = False
|
57
|
+
|
58
|
+
while True:
|
59
|
+
pid = find_pid_by_name(name)
|
60
|
+
if pid is not None:
|
61
|
+
os.kill(pid, signal.SIGTERM)
|
62
|
+
result = True
|
63
|
+
else:
|
64
|
+
break
|
65
|
+
|
66
|
+
return result
|
67
|
+
|
68
|
+
|
69
|
+
def find_pid_by_name(name: str) -> Optional[int]:
|
70
|
+
if platform.system() == "Windows":
|
71
|
+
s = subprocess.run(
|
72
|
+
["powershell", "-c", "Get-Process", f"*{name}*"],
|
73
|
+
capture_output=True,
|
74
|
+
text=True,
|
75
|
+
).stdout
|
76
|
+
|
77
|
+
for line in s.split("\n"):
|
78
|
+
if name in line.lower():
|
79
|
+
info = name.split()
|
80
|
+
pid = info[5]
|
81
|
+
if pid.isnumeric():
|
82
|
+
return int(pid)
|
83
|
+
|
84
|
+
return None
|
85
|
+
else:
|
86
|
+
if platform.system() == "Darwin":
|
87
|
+
pattern = "Viber"
|
88
|
+
else:
|
89
|
+
pattern = ".*[Vv]iber.*"
|
90
|
+
pid = (
|
91
|
+
subprocess.run(["pgrep", pattern], capture_output=True, text=True)
|
92
|
+
.stdout.split("\n")[0]
|
93
|
+
.strip()
|
94
|
+
)
|
95
|
+
if pid == "" or pid.isnumeric() is False:
|
96
|
+
return None
|
97
|
+
else:
|
98
|
+
return int(pid)
|
99
|
+
|
100
|
+
|
101
|
+
if importlib.util.find_spec("psutil"):
|
102
|
+
import psutil
|
103
|
+
|
104
|
+
def killall(name: str) -> bool:
|
105
|
+
result = False
|
106
|
+
|
107
|
+
for proc in psutil.process_iter(): # type: ignore
|
108
|
+
if name in proc.name().lower():
|
109
|
+
proc.kill()
|
110
|
+
result = True
|
111
|
+
|
112
|
+
return result
|
113
|
+
|
114
|
+
def find_pid_by_name(name: str) -> Optional[int]:
|
115
|
+
for proc in psutil.process_iter(): # type: ignore
|
116
|
+
if name in proc.name().lower():
|
117
|
+
return proc.pid
|
118
|
+
|
119
|
+
return None
|
120
|
+
|
121
|
+
|
122
|
+
class GetViberAuth:
|
123
|
+
def __init__(self, cb_ask_str: Callable[..., str] = input):
|
124
|
+
self.cb_ask_str = cb_ask_str
|
125
|
+
|
126
|
+
def relaunch_viber(self, viber_bin_path: str) -> Optional[int]:
|
127
|
+
killed = killall("viber")
|
128
|
+
if killed:
|
129
|
+
time.sleep(5)
|
130
|
+
|
131
|
+
if platform.system() == "Darwin":
|
132
|
+
cmd = ["open", "-n", viber_bin_path]
|
133
|
+
else:
|
134
|
+
cmd = [viber_bin_path]
|
135
|
+
subprocess.Popen(cmd)
|
136
|
+
time.sleep(10)
|
137
|
+
|
138
|
+
return find_pid_by_name("viber")
|
139
|
+
|
140
|
+
def get_mem_windows(self, viber_pid: int) -> Tuple[Optional[bytes], str]:
|
141
|
+
from pathlib import WindowsPath
|
142
|
+
|
143
|
+
memdump_ps_path = str(WindowsPath(ROOT_DIR / "resources/memdump_windows.ps1"))
|
144
|
+
arglist = (
|
145
|
+
f'-NoProfile -ExecutionPolicy Bypass -File "{memdump_ps_path}" {viber_pid}'
|
146
|
+
)
|
147
|
+
dump_fpath = os.path.expandvars(f"%temp%/memdump.bin.{viber_pid}")
|
148
|
+
|
149
|
+
cmd = [
|
150
|
+
"powershell",
|
151
|
+
"-NoProfile",
|
152
|
+
"-ExecutionPolicy",
|
153
|
+
"Bypass",
|
154
|
+
"-Command",
|
155
|
+
f"Start-Process -Verb RunAs powershell -ArgumentList '{arglist}'",
|
156
|
+
]
|
157
|
+
|
158
|
+
subprocess.run(cmd, capture_output=True, text=True)
|
159
|
+
|
160
|
+
while True:
|
161
|
+
try:
|
162
|
+
with open(dump_fpath, "rb") as f:
|
163
|
+
s = f.read()
|
164
|
+
if len(s) != 0:
|
165
|
+
break
|
166
|
+
time.sleep(1)
|
167
|
+
except (FileNotFoundError, PermissionError):
|
168
|
+
pass
|
169
|
+
|
170
|
+
while True:
|
171
|
+
try:
|
172
|
+
os.remove(dump_fpath)
|
173
|
+
break
|
174
|
+
except PermissionError:
|
175
|
+
pass
|
176
|
+
|
177
|
+
return s, ""
|
178
|
+
|
179
|
+
def get_mem_linux(self, viber_pid: int) -> Tuple[Optional[bytes], str]:
|
180
|
+
memdump_sh_path = (ROOT_DIR / "resources/memdump_linux.sh").as_posix()
|
181
|
+
|
182
|
+
s = subprocess.run(
|
183
|
+
[
|
184
|
+
memdump_sh_path,
|
185
|
+
str(viber_pid),
|
186
|
+
],
|
187
|
+
capture_output=True,
|
188
|
+
).stdout
|
189
|
+
|
190
|
+
if len(s) > 1000:
|
191
|
+
pass
|
192
|
+
elif shutil.which("pkexec") and os.getenv("DISPLAY"):
|
193
|
+
s = subprocess.run(
|
194
|
+
[
|
195
|
+
"pkexec",
|
196
|
+
memdump_sh_path,
|
197
|
+
str(viber_pid),
|
198
|
+
],
|
199
|
+
capture_output=True,
|
200
|
+
).stdout
|
201
|
+
else:
|
202
|
+
prompt = "Enter sudo password: "
|
203
|
+
if self.cb_ask_str != input:
|
204
|
+
sudo_password = self.cb_ask_str(
|
205
|
+
prompt, initialvalue="", cli_show_initialvalue=False
|
206
|
+
)
|
207
|
+
else:
|
208
|
+
sudo_password = getpass(prompt)
|
209
|
+
sudo_password_pipe = subprocess.Popen(
|
210
|
+
("echo", sudo_password), stdout=subprocess.PIPE
|
211
|
+
)
|
212
|
+
s = subprocess.run(
|
213
|
+
[
|
214
|
+
"sudo",
|
215
|
+
"-S",
|
216
|
+
memdump_sh_path,
|
217
|
+
str(viber_pid),
|
218
|
+
],
|
219
|
+
capture_output=True,
|
220
|
+
stdin=sudo_password_pipe.stdout,
|
221
|
+
).stdout
|
222
|
+
|
223
|
+
return s, ""
|
224
|
+
|
225
|
+
def get_mem_darwin(self, viber_pid: int) -> Tuple[Optional[bytes], str]:
|
226
|
+
subprocess.run(
|
227
|
+
[
|
228
|
+
"lldb",
|
229
|
+
"--attach-pid",
|
230
|
+
str(viber_pid),
|
231
|
+
"-o",
|
232
|
+
"process save-core /tmp/viber.dmp",
|
233
|
+
"-o",
|
234
|
+
"quit",
|
235
|
+
],
|
236
|
+
stdout=subprocess.DEVNULL,
|
237
|
+
stderr=subprocess.DEVNULL,
|
238
|
+
)
|
239
|
+
|
240
|
+
with open("/tmp/viber.dmp", "rb") as f:
|
241
|
+
s = f.read()
|
242
|
+
|
243
|
+
os.remove("/tmp/viber.dmp")
|
244
|
+
|
245
|
+
return s, ""
|
246
|
+
|
247
|
+
def get_auth_by_pme(
|
248
|
+
self, viber_bin_path: str, relaunch: bool = True
|
249
|
+
) -> Tuple[Optional[str], str]:
|
250
|
+
from PyMemoryEditor import OpenProcess # type: ignore
|
251
|
+
|
252
|
+
member_id = None
|
253
|
+
m_token = None
|
254
|
+
m_ts = None
|
255
|
+
|
256
|
+
if relaunch:
|
257
|
+
viber_pid = self.relaunch_viber(viber_bin_path)
|
258
|
+
else:
|
259
|
+
viber_pid = find_pid_by_name("viber")
|
260
|
+
if viber_pid is None:
|
261
|
+
return None, MSG_LAUNCH_FAIL
|
262
|
+
|
263
|
+
try:
|
264
|
+
with OpenProcess(pid=int(viber_pid)) as process:
|
265
|
+
for address in process.search_by_value(str, 18, "X-Viber-Auth-Mid: "): # type: ignore
|
266
|
+
member_id_addr = cast(int, address) + 18
|
267
|
+
member_id_bytes = process.read_process_memory(
|
268
|
+
member_id_addr, bytes, 20
|
269
|
+
)
|
270
|
+
member_id_term = member_id_bytes.find(b"\x0d\x0a")
|
271
|
+
if member_id_term == -1:
|
272
|
+
continue
|
273
|
+
member_id = member_id_bytes[:member_id_term].decode(
|
274
|
+
encoding="ascii"
|
275
|
+
)
|
276
|
+
break
|
277
|
+
if member_id is None:
|
278
|
+
return None, MSG_NO_AUTH
|
279
|
+
|
280
|
+
for address in process.search_by_value(str, 20, "X-Viber-Auth-Token: "): # type: ignore
|
281
|
+
m_token_addr = cast(int, address) + 20
|
282
|
+
m_token = process.read_process_memory(m_token_addr, str, 64)
|
283
|
+
break
|
284
|
+
if m_token is None:
|
285
|
+
return None, MSG_NO_AUTH
|
286
|
+
|
287
|
+
for address in process.search_by_value( # type: ignore
|
288
|
+
str, 24, "X-Viber-Auth-Timestamp: "
|
289
|
+
):
|
290
|
+
m_ts_addr = cast(int, address) + 24
|
291
|
+
m_ts = process.read_process_memory(m_ts_addr, str, 13)
|
292
|
+
break
|
293
|
+
if m_ts is None:
|
294
|
+
return None, MSG_NO_AUTH
|
295
|
+
except PermissionError:
|
296
|
+
return None, MSG_PERMISSION_ERROR
|
297
|
+
|
298
|
+
viber_auth = f"member_id:{member_id};m_token:{m_token};m_ts:{m_ts}"
|
299
|
+
msg = "Got viber_auth successfully:\n"
|
300
|
+
msg += f"{viber_auth=}\n"
|
301
|
+
|
302
|
+
return viber_auth, msg
|
303
|
+
|
304
|
+
def get_auth_by_dump(
|
305
|
+
self, viber_bin_path: str, relaunch: bool = True
|
306
|
+
) -> Tuple[Optional[str], str]:
|
307
|
+
member_id = None
|
308
|
+
m_token = None
|
309
|
+
m_ts = None
|
310
|
+
|
311
|
+
if platform.system() == "Darwin":
|
312
|
+
csrutil_status = subprocess.run(
|
313
|
+
["csrutil", "status"], capture_output=True, text=True
|
314
|
+
).stdout
|
315
|
+
|
316
|
+
if "enabled" in csrutil_status:
|
317
|
+
return None, MSG_SIP_ENABLED
|
318
|
+
elif (
|
319
|
+
platform.system() != "Windows"
|
320
|
+
and shutil.which("pgrep") is None
|
321
|
+
and importlib.find_loader("psutil") is None
|
322
|
+
):
|
323
|
+
return None, MSG_NO_PGREP
|
324
|
+
|
325
|
+
if relaunch:
|
326
|
+
viber_pid = self.relaunch_viber(viber_bin_path)
|
327
|
+
else:
|
328
|
+
viber_pid = find_pid_by_name("viber")
|
329
|
+
if viber_pid is None:
|
330
|
+
return None, MSG_LAUNCH_FAIL
|
331
|
+
|
332
|
+
if platform.system() == "Windows":
|
333
|
+
s, msg = self.get_mem_windows(viber_pid)
|
334
|
+
elif platform.system() == "Darwin":
|
335
|
+
s, msg = self.get_mem_darwin(viber_pid)
|
336
|
+
else:
|
337
|
+
s, msg = self.get_mem_linux(viber_pid)
|
338
|
+
|
339
|
+
if s is None:
|
340
|
+
return None, msg
|
341
|
+
|
342
|
+
member_id_addr = s.find(b"X-Viber-Auth-Mid: ")
|
343
|
+
m_token_addr = s.find(b"X-Viber-Auth-Token: ")
|
344
|
+
m_ts_addr = s.find(b"X-Viber-Auth-Timestamp: ")
|
345
|
+
|
346
|
+
if member_id_addr == -1 or m_token_addr == -1 or m_ts_addr == -1:
|
347
|
+
return None, MSG_NO_AUTH
|
348
|
+
|
349
|
+
member_id_addr += 18
|
350
|
+
m_token_addr += 20
|
351
|
+
m_ts_addr += 24
|
352
|
+
|
353
|
+
member_id_bytes = s[member_id_addr : member_id_addr + 20]
|
354
|
+
member_id_term = member_id_bytes.find(b"\x0d\x0a")
|
355
|
+
if member_id_term == -1:
|
356
|
+
return None, MSG_NO_AUTH
|
357
|
+
member_id = member_id_bytes[:member_id_term].decode(encoding="ascii")
|
358
|
+
|
359
|
+
m_token = s[m_token_addr : m_token_addr + 64].decode(encoding="ascii")
|
360
|
+
m_ts = s[m_ts_addr : m_ts_addr + 13].decode(encoding="ascii")
|
361
|
+
|
362
|
+
viber_auth = f"member_id:{member_id};m_token:{m_token};m_ts:{m_ts}"
|
363
|
+
msg = "Got viber_auth successfully:\n"
|
364
|
+
msg += f"{viber_auth=}\n"
|
365
|
+
|
366
|
+
return viber_auth, msg
|
367
|
+
|
368
|
+
def get_viber_desktop(self) -> Optional[str]:
|
369
|
+
if platform.system() == "Windows":
|
370
|
+
viber_bin_path = os.path.expandvars("%localappdata%/Viber/Viber.exe")
|
371
|
+
elif platform.system() == "Darwin":
|
372
|
+
viber_bin_path = "/Applications/Viber.app"
|
373
|
+
else:
|
374
|
+
if os.path.isfile("/opt/viber/Viber"):
|
375
|
+
viber_bin_path = "/opt/viber/Viber"
|
376
|
+
else:
|
377
|
+
viber_which = shutil.which("Viber")
|
378
|
+
if viber_which is None:
|
379
|
+
viber_which = shutil.which("viber")
|
380
|
+
if viber_which is None:
|
381
|
+
viber_which = shutil.which("viber.AppImage")
|
382
|
+
if viber_which is None:
|
383
|
+
viber_bin_path = "viber"
|
384
|
+
else:
|
385
|
+
viber_bin_path = viber_which
|
386
|
+
|
387
|
+
if Path(viber_bin_path).is_file() or Path(viber_bin_path).is_dir():
|
388
|
+
return viber_bin_path
|
389
|
+
|
390
|
+
return None
|
391
|
+
|
392
|
+
def get_cred(
|
393
|
+
self,
|
394
|
+
viber_bin_path: Optional[str] = None,
|
395
|
+
) -> Tuple[Optional[str], str]:
|
396
|
+
if not viber_bin_path:
|
397
|
+
viber_bin_path = self.get_viber_desktop()
|
398
|
+
|
399
|
+
if not viber_bin_path:
|
400
|
+
return None, MSG_NO_BIN
|
401
|
+
|
402
|
+
# get_auth_by_dump()
|
403
|
+
# + Fast
|
404
|
+
# - Requires admin
|
405
|
+
|
406
|
+
# get_auth_by_pme()
|
407
|
+
# + No admin (If have permission to read process)
|
408
|
+
# - Slow
|
409
|
+
# - Cannot run on macOS
|
410
|
+
|
411
|
+
# If admin, prefer get_auth_by_dump() over get_auth_by_pme(), vice versa
|
412
|
+
methods: List[Callable[[str, bool], Tuple[Optional[str], str]]] = []
|
413
|
+
relaunch = True
|
414
|
+
viber_auth = None
|
415
|
+
msg = ""
|
416
|
+
|
417
|
+
pme_present = importlib.util.find_spec("PyMemoryEditor") is not None
|
418
|
+
if platform.system() == "Darwin":
|
419
|
+
methods.append(self.get_auth_by_dump)
|
420
|
+
elif platform.system() == "Windows":
|
421
|
+
methods.append(self.get_auth_by_dump)
|
422
|
+
if pme_present:
|
423
|
+
methods.append(self.get_auth_by_pme)
|
424
|
+
if check_admin_windows() is False:
|
425
|
+
methods.reverse()
|
426
|
+
else:
|
427
|
+
if not os.path.isfile("/.dockerenv"):
|
428
|
+
methods.append(self.get_auth_by_dump)
|
429
|
+
if pme_present:
|
430
|
+
methods.append(self.get_auth_by_pme)
|
431
|
+
if check_admin_linux() is False:
|
432
|
+
methods.reverse()
|
433
|
+
|
434
|
+
for method in methods:
|
435
|
+
viber_auth, msg = method(viber_bin_path, relaunch)
|
436
|
+
relaunch = False
|
437
|
+
if viber_auth is not None:
|
438
|
+
break
|
439
|
+
|
440
|
+
killall("viber")
|
441
|
+
return viber_auth, msg
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.9.
|
3
|
+
Version: 2.9.1
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -376,11 +376,11 @@ Requires-Dist: mergedeep~=1.3.4
|
|
376
376
|
Requires-Dist: numpy>=1.22.4
|
377
377
|
Requires-Dist: Pillow~=10.3.0
|
378
378
|
Requires-Dist: pyoxipng~=9.0.0
|
379
|
-
Requires-Dist: python-telegram-bot~=21.
|
379
|
+
Requires-Dist: python-telegram-bot~=21.3
|
380
380
|
Requires-Dist: psutil~=5.9.8
|
381
381
|
Requires-Dist: PyMemoryEditor~=1.5.22
|
382
382
|
Requires-Dist: requests~=2.32.3
|
383
|
-
Requires-Dist: rlottie_python~=1.3.
|
383
|
+
Requires-Dist: rlottie_python~=1.3.6
|
384
384
|
Requires-Dist: signalstickers-client-fork-laggykiller~=3.3.0.post2
|
385
385
|
Requires-Dist: sqlcipher3-wheels~=0.5.2.post1
|
386
386
|
Requires-Dist: tqdm~=4.66.4
|
@@ -83,7 +83,8 @@ src/sticker_convert/resources/compression.json
|
|
83
83
|
src/sticker_convert/resources/emoji.json
|
84
84
|
src/sticker_convert/resources/help.json
|
85
85
|
src/sticker_convert/resources/input.json
|
86
|
-
src/sticker_convert/resources/
|
86
|
+
src/sticker_convert/resources/memdump_linux.sh
|
87
|
+
src/sticker_convert/resources/memdump_windows.ps1
|
87
88
|
src/sticker_convert/resources/output.json
|
88
89
|
src/sticker_convert/uploaders/__init__.py
|
89
90
|
src/sticker_convert/uploaders/compress_wastickers.py
|
@@ -10,11 +10,11 @@ mergedeep~=1.3.4
|
|
10
10
|
numpy>=1.22.4
|
11
11
|
Pillow~=10.3.0
|
12
12
|
pyoxipng~=9.0.0
|
13
|
-
python-telegram-bot~=21.
|
13
|
+
python-telegram-bot~=21.3
|
14
14
|
psutil~=5.9.8
|
15
15
|
PyMemoryEditor~=1.5.22
|
16
16
|
requests~=2.32.3
|
17
|
-
rlottie_python~=1.3.
|
17
|
+
rlottie_python~=1.3.6
|
18
18
|
signalstickers-client-fork-laggykiller~=3.3.0.post2
|
19
19
|
sqlcipher3-wheels~=0.5.2.post1
|
20
20
|
tqdm~=4.66.4
|