Skip to main content

No project description provided

Project description

Best Library To Signture Tiktok apis and more

New Update 8404 Gorgon and more

Python

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.8
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

from SignerPy import sign

signature = sign(params=params, payload=None)
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

  • Telegram
  • GitHub

author


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

signerpy-0.11.0.tar.gz (45.1 kB view details)

Uploaded Source

File details

Details for the file signerpy-0.11.0.tar.gz.

File metadata

  • Download URL: signerpy-0.11.0.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for signerpy-0.11.0.tar.gz
Algorithm Hash digest
SHA256 235724f96f862d33e7ac4bb42ccf26de7af8d41aa3fa39d2aa3e556309207f50
MD5 5ade17eb7b77c47471e12d056ac9f869
BLAKE2b-256 5ece79f63c6d885e39ac592d373aaf16065abcc27c1ef26e9a70a239fc40e209

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page