Best Library To Signture Tiktok apis and more
New Update 8404 Gorgon and more
SignerPy is a Python library that provides various tools for encryption, signing, URL parsing, token generation, and more, mainly designed for interacting with TikTok APIs.
Table of Contents
Installation
pip install SignerPy==0.11.4
git clone https://github.com/is-L7N/SignerPy.git
cd SignerPy
Modules
SignerPy contains the following modules:
| Module | Description |
|---|---|
sign |
Generates request headers signatures. |
get |
update params iid, device_id, cdid, etc... |
encryption |
Provides enc and dec functions for encryption/decryption. |
hosts |
Returns a list of TikTok API hosts using host(). |
xor |
Simple XOR encoding of strings. |
url_to_params |
Parses a URL query string into a dictionary using dicts(). |
xtoken |
Generates x-token values for API requests. |
trace_id |
Generates a trace ID for TikTok devices. |
sign |
Generates request signatures. |
edata |
edata Tiktok Encryption and Decryption easy |
ttencrypt |
Provides advanced encryption (Enc().encrypt()). |
md5stub |
Generates MD5 hash of a string or body. |
* |
Imports all functions for easy access. |
Usage Examples
Signture Headers
Sample Output:
{'x-ss-req-ticket': '1762387009792', 'x-khronos': '1762387009', 'x-gorgon': '0404b0d30000d4cec309eb57387ccee15dbc3694a62765ae25d4', 'x-ss-stub': 'D41D8CD98F00B204E9800998ECF8427E', 'x-ladon': 'cfyN2aMtfQ/hwsBzfpdfjK4HjO64+9+eAsAbXFoG7Fdsq5LE', 'x-argus': '8oGzD48Lx0I+DCXDwk+l2r542RIQVcGognB+CPA22nzh1Pn93HEBilqjiOSbjSPgqG0N9qYeHcveeZRXBg99oAMRTjLWjQ/YphKc/rfFnLFfAYGmPqG9WER/XDi3cTpgwihmg8f8PYCtoS6h+wdsMZd0UXf/wxbjaovR/31i1No+zBUDnInkI6FTGGOqopkbweiNmtUg2VeSmH92+RU0nM3azBwy+ROe3HNJRwcIK1yb/zlX8blEM46qE3vT6Xevz5g8lv4SLGlNgf6W08t4Ixeu'}
if You Need 8402 or 4404 or 8404 Gorgon
from SignerPy import sign
signature = sign(params=params, payload=None, version=8404) # version=4404 or version=8402
print(signature)
Sample Output:
{'x-ss-req-ticket': '1762259171000', 'x-khronos': '1762259171', 'x-gorgon': '840490e90000eb195e1a4e93f8ee4c6096ef9be9245477614426', 'content-length': '2', 'x-ss-stub': 'D2E4201A71AB14D92FD36DA8B4DC6E47', 'x-ladon': 'YVfzzrPh5G1mKlCPOwnRyTBLvSlCwcMoUJpynWn7LKq5IpjO', 'x-argus': '8oES6TTDk19XpiXVRoMY8sSm2PHDIlHeay5JCmPO6o+RltBIOc0BCDuZDMos550YipLLaqxeRkhXwqg+r6keWsdL5eeIWHPB7906llEJi+4oUlXZHjQZUpgu8hhojjt6SluTr8zDWpDsP9eoSbrEX/sE6FLWogayQpDgfivNeEzjMI1qs/CKZi0KNC4Es1+LjBii6IHrWtwgPlv9fmiL+xlS8rc5+L9hrqK38Bm49QsmmA=='}
Get Modern Params
from SignerPy import get
params.update(SignerPy.get(params=params))
Encryption & Decryption
from SignerPy.encryption import enc, dec
data = {
"aid": "1988",
"app_name": "tiktok_web",
"device_platform": "web_pc"
}
encrypted = enc(data)
print(encrypted)
decrypted = dec(encrypted)
print(decrypted)
Sample Output:
{
"aid": "1988",
"app_name": "tiktok_web",
"device_platform": "web_pc"
}
Hosts
from SignerPy.hosts import host
print(host())
Sample Output:
['api16-normal-no1a.tiktokv.eu', 'api16-normal-c-alisg.tiktokv.com', ...]
XOR Encoding
from SignerPy import xor
encoded = xor("email or username")
print(encoded)
Sample Output:
6068646c69256a7725707660776b646860
URL to Dictionary
from SignerPy.url_to_params import dicts
url = "https://api16-normal-c-alisg.tiktokv.com/lite/v2/public/item/list/?source=0&sec_user_id=XXXXX"
params = dicts(url=url)
print(params)
Sample Output:
{
"source": "0",
"sec_user_id": "XXXXX",
"count": "9",
"app_name": "musically_go"
}
XToken
from SignerPy import xtoken
x_token = xtoken(params="", sessionid="")
print(x_token)
Sample Output:
7a3465ad525ddf8ba13bc005d45c99a0f480a503b4c3b2a3f5aa184cdb332102--...
Trace ID
from SignerPy import trace_id
trace = trace_id(device_id="1234567890")
print(trace)
Sample Output:
00-4eee0edf08499602d2277ea43fe8-4eee0edf08499602-01
MD5 Hash
from SignerPy import md5stub
hash_value = md5stub(body="username=L7N")
print(hash_value)
Sample Output:
866F9F9C270106B1AF8063FFD0A80A22
edata decrypt
from SignerPy.edata import decrypt
print(decrypt(edata="ARMZiZCPPJD5AodPZbiXUFiNZYY/zPssCFJJmuLj6yeVRqG3NZ+ryYE0xAr/OVIbQemdMonPYUUzSyWcFHS5bwxmB9s="))
Sample Output:
''' {"need_captcha":false"} '''
edata encrypt
from SignerPy.edata import encrypt
print(encrypt(edata=b'{"need_captcha":false"}'))
Sample Output:
''' ATgiwD0XRkbaBpYdr1oTAs2PvSg6d5ExfzfmZanrGWShoooGLLhPIa1nImegxqCo0OOjpG6Uz2Vzndu6uxRPRfd72VA= '''
TTEncrypt
from SignerPy import ttencrypt
encrypted = ttencrypt.Enc().encrypt(data="username=L7N")
print(encrypted)
Sample Output:
b'tc\x05\x10\x00\x00\x1c^\xe4\xa6...'
✍️ Author
Metadata
Release files for SignerPy 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| signerpy-0.12.0.tar.gz | 46.1 kB | Without provenance | Details for signerpy-0.12.0.tar.gz |
Release files / signerpy-0.12.0.tar.gz
| Download URL | signerpy-0.12.0.tar.gz |
|---|---|
| Size | 46.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9c1b71f98710727ed903d825ab84ca532f06fdbfb71002c6b044ad93412bc91
|
|
BLAKE2b-256 checksum How to use checksums |
cadd56b584f08307864b47728752582e8c05a34c9cdfe50e78deedf6df1cbdd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for SignerPy 0.12.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.