mirror of
https://github.com/aithedev/X-Bogus.git
synced 2025-04-05 07:21:38 +08:00
778 B
778 B
X-Bogus
TikTok X-Bogus Signature Generator.
⚙️
Example Usages
Python:
import execjs
import urllib.parse
# Replace the empty strings with valid values
url = ""
user_agent = ""
query = urllib.parse.urlparse(url).query
xbogus = execjs.compile(open('./X-Bogus.js').read()).call('sign', query, user_agent)
new_url = url + "&X-Bogus=" + xbogus
print(new_url)
JavaScript:
const { sign } = require("./X-Bogus.js");
// Replace the empty strings with valid values
const url = "";
const userAgent = "";
const query = url.includes("?") ? url.split("?")[1] : "";
const xbogus = sign(query, userAgent);
const newUrl = url + "&X-Bogus=" + xbogus;
console.log(newUrl);
👨💻
Contact
- Telegram: t.me/angell