mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-22 04:10:25 +08:00
pc_抖音破解
This commit is contained in:
parent
aa468acd6b
commit
b391e9ed08
@ -1,3 +1,4 @@
|
|||||||
|
var module_a = module
|
||||||
var exports = undefined
|
var exports = undefined
|
||||||
, module = undefined
|
, module = undefined
|
||||||
, Image = function Image() {}
|
, Image = function Image() {}
|
||||||
@ -1151,8 +1152,7 @@ function get_ac_signature(__ac_nonce){
|
|||||||
|
|
||||||
// console.log(get_ac_signature(1))
|
// console.log(get_ac_signature(1))
|
||||||
|
|
||||||
module.exports =
|
module_a.exports =
|
||||||
{
|
{
|
||||||
get_ac_signature
|
get_ac_signature
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
import http.client
|
import http.client
|
||||||
|
import requests
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
conn = http.client.HTTPSConnection("www.douyin.com")
|
conn = http.client.HTTPSConnection("www.douyin.com")
|
||||||
@ -34,7 +36,15 @@ def get_ac_nonce(encoded_text):
|
|||||||
return __ac_nonce
|
return __ac_nonce
|
||||||
|
|
||||||
|
|
||||||
def get_ttwid(ac_nonce, encoded_text):
|
def get_ac_signature(__ac_nonce):
|
||||||
|
url = "http://192.168.2.144:3005/_ac_signature"
|
||||||
|
payload = json.dumps({"_ac_nonce": __ac_nonce})
|
||||||
|
headers = {'Content-Type': 'application/json'}
|
||||||
|
response = requests.request("POST", url, headers=headers, data=payload)
|
||||||
|
return response.text
|
||||||
|
|
||||||
|
|
||||||
|
def get_ttwid(ac_nonce, __ac_signature, encoded_text):
|
||||||
url = f"/search/{encoded_text}?source=normal_search&type=user"
|
url = f"/search/{encoded_text}?source=normal_search&type=user"
|
||||||
headers = {
|
headers = {
|
||||||
'authority': 'www.douyin.com',
|
'authority': 'www.douyin.com',
|
||||||
@ -42,7 +52,7 @@ def get_ttwid(ac_nonce, encoded_text):
|
|||||||
'*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
'*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
||||||
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
||||||
'cache-control': 'no-cache',
|
'cache-control': 'no-cache',
|
||||||
'cookie': f'__ac_nonce={ac_nonce}; __ac_signature=_02B4Z6wo00f01Uzv-9gAAIDCfUVfXfA0ld1Mz.9AADf1d8;',
|
'cookie': f'__ac_nonce={ac_nonce}; __ac_signature={__ac_signature};',
|
||||||
'pragma': 'no-cache',
|
'pragma': 'no-cache',
|
||||||
'referer': f'https://www.douyin.com/search/{encoded_text}?source=normal_search&type=user',
|
'referer': f'https://www.douyin.com/search/{encoded_text}?source=normal_search&type=user',
|
||||||
'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
|
'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
|
||||||
@ -87,5 +97,7 @@ if __name__ == '__main__':
|
|||||||
encoded_text = quote(search_keyword)
|
encoded_text = quote(search_keyword)
|
||||||
__ac_nonce = get_ac_nonce(encoded_text)
|
__ac_nonce = get_ac_nonce(encoded_text)
|
||||||
print(__ac_nonce)
|
print(__ac_nonce)
|
||||||
ttwid = get_ttwid(__ac_nonce, encoded_text)
|
__ac_signature = get_ac_signature(__ac_nonce)
|
||||||
|
print(__ac_signature)
|
||||||
|
ttwid = get_ttwid(__ac_nonce, __ac_signature, encoded_text)
|
||||||
print(ttwid)
|
print(ttwid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user