-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support downloading Viber stickers #144
Comments
v2.8.5 adds support for Viber sticker download and compressing files to Viber-compliant 490x490 png files, but not exporting. I have attempted to reverse engineer Viber Android app. To export Viber stickers, we need to get This is best attempt for exporting Viber sticker, which obviously won't work: import requests
import time
viber_version = "22.4.3.0"
user_agent = f"Mozilla/5.0 (Linux; Android 11; Android SDK built for x86 Build/RSR1.210210.001.A1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 Viber/{viber_version}"
# Zip file containing 490x490 png images to upload (00.png, 01.png, ...)
with open("upload.zip", "rb") as f:
result = requests.post(
"https://market.api.viber.com/2/users/custom-sticker-packs/create",
files={
"file": ("upload.zip", f)
},
data={
"member_id": "REDACTED", # Same for each user
"m_token": "REDACTED", # Changed when app is restarted
"m_ts": str(int(time.time() * 1000)),
"title": "my-custom-pack",
"description": "My custom viber sticker pack",
"shareable": "1",
"udid": "REDACTED", # Same for each user
"phone_country": "US",
"mcc": "000", # Mobile Country Codes, see https://mcc-mnc.com/
"mnc": "000", # Mobile Network Codes, see https://mcc-mnc.com/
"vv": viber_version,
"sid": "1",
"lang": "en",
"privacy_flags": "7",
},
headers={
"User-Agent": user_agent
}
)
print(result.text) # status should be 1 if success If anyone want to reverse the Android app, I recommend using PCAPdroid on rooted Android emulator with mitm addon, with MagiskTrustUserCerts. Jadx decompilation might also be useful. We can also analyze Windows version of Viber, but I am not familiar with it. What makes matter worse, Viber Windows start to store database with encrypted SQLCipher (Russian forum, use Google translate: https://4pda.to/forum/index.php?showtopic=714685&view=findpost&p=125818765), which means things like Anyway, I don't think this is high prority and I probably won't continue investigating, as:
If someone has solution, please comment / submit PR, thank you. |
Thank you for the thorough explanation. I meant to download to png format files not exporting. so that should work fine in the v2.8.5 version right? I need them to png files so I can import them to Signal app. Kind regards, |
You are correct, you can download Viber stickers in v2.8.5+, but not able to upload. Please try. |
I am closing this, issue of adding support for exporting Viber stickers is moved to #146 |
Hello Mr laggy killer.Does this app now support viber stickers exportation and if not ,what's the reason,is it because it's end to end encrypted
Best regards,
The text was updated successfully, but these errors were encountered: