mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-12 03:27:07 +08:00
补环境
This commit is contained in:
parent
7acd7f47ba
commit
f16b1b4662
17
志远js逆向学习/zy-补环境框架-头条/server.js
Normal file
17
志远js逆向学习/zy-补环境框架-头条/server.js
Normal file
@ -0,0 +1,17 @@
|
||||
const express = require("express");
|
||||
const app = express(); // express实例化
|
||||
// 监听端口,设置回调
|
||||
app.listen(3000,()=>{
|
||||
console.log("server start");
|
||||
});
|
||||
|
||||
const {gettt} = require('./tt');// 导入自己的js文件
|
||||
|
||||
const bodyParser = require("body-parser");// 插件 解析post请求过来的数据
|
||||
//app.use 使用中间件(插件)
|
||||
app.use(bodyParser.urlencoded({extend:false}));
|
||||
//设置一个post接口
|
||||
app.post('/tt',(req,res)=>{
|
||||
let {ps} = req.body;
|
||||
res.send({err:0,msg:gettt(ps)});
|
||||
});
|
30
志远js逆向学习/zy-补环境框架-头条/toutiao.py
Normal file
30
志远js逆向学习/zy-补环境框架-头条/toutiao.py
Normal file
@ -0,0 +1,30 @@
|
||||
import requests,time
|
||||
|
||||
def jrtt():
|
||||
s = requests.session()
|
||||
s.get('https://www.toutiao.com/')
|
||||
data = {'ps':'0'}
|
||||
local_server = s.post('http://127.0.0.1:3000/tt',data=data).json()
|
||||
headers = {
|
||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36',
|
||||
'referer': 'https://www.toutiao.com/',
|
||||
|
||||
}
|
||||
res = s.get(local_server['msg'],headers=headers).json()
|
||||
print(res)
|
||||
|
||||
while True:
|
||||
|
||||
data = {'ps': res['next']['max_behot_time']}
|
||||
local_server = s.post('http://127.0.0.1:3000/tt', data=data).json()
|
||||
res = s.get(local_server['msg'],headers=headers)
|
||||
if res.status_code == 200:
|
||||
res = res.json()
|
||||
|
||||
print(res)
|
||||
time.sleep(3)
|
||||
else:
|
||||
print(res.status_code)
|
||||
time.sleep(3)
|
||||
if __name__ == '__main__':
|
||||
jrtt()
|
@ -1,47 +0,0 @@
|
||||
window = this;
|
||||
|
||||
// 定义名字
|
||||
Object.defineProperties(window, {
|
||||
[Symbol.toStringTag]:{
|
||||
value: "window",
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function vmProxy(o){
|
||||
return new Proxy(window, {
|
||||
set(obj, prop, value) {
|
||||
// obj 那个对象, prop哪个属性,value设置的值
|
||||
console.log(obj, prop, value);
|
||||
return Reflect.set(...arguments);
|
||||
},
|
||||
get: function (target, property, receiver) {
|
||||
// obj 那个对象, prop哪个属性,value设置的值
|
||||
console.log(target, property, receiver);
|
||||
return target[property];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 创建对象的方法
|
||||
// object.create({});
|
||||
// class window{};
|
||||
// function window(){};new window;
|
||||
|
||||
window = vmProxy(window);
|
||||
|
||||
// navigator = {};
|
||||
// navigator = vmProxy(navigator);
|
||||
//
|
||||
// document = {};
|
||||
// document = vmProxy(document);
|
||||
|
||||
location = {};
|
||||
location.reload = function reload(){
|
||||
|
||||
};
|
||||
|
||||
location = vmProxy(location);
|
||||
console.log(location.reload+'');
|
||||
|
@ -1,15 +0,0 @@
|
||||
navigator = {
|
||||
userAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
|
||||
};
|
||||
|
||||
Object.getOwnPropertyDescriptor_ = Object.getOwnPropertyDescriptor;
|
||||
|
||||
Object.getOwnPropertyDescriptor = function (o,p) {
|
||||
if(navigator.toString() == "[object Navigator]"){
|
||||
return undefined;
|
||||
}
|
||||
Object.getOwnPropertyDescriptor_.apply(this, arguments)
|
||||
};
|
||||
|
||||
const descriptor1 = Object.getOwnPropertyDescriptor(navigator, 'userAgent');
|
||||
console.log(descriptor1);
|
@ -1,18 +0,0 @@
|
||||
window = this;
|
||||
|
||||
// 后代理的检测不到先代理
|
||||
window = new Proxy(window, {
|
||||
set(obj, prop, value) {
|
||||
// obj 那个对象, prop哪个属性,value设置的值
|
||||
console.log(obj, prop, value);
|
||||
return Reflect.set(...arguments);
|
||||
},
|
||||
get: function (target, property, receiver) {
|
||||
// obj 那个对象, prop哪个属性,value设置的值
|
||||
console.log(target, property, receiver);
|
||||
return target[property];
|
||||
}
|
||||
});
|
||||
|
||||
window.ayf = 123;
|
||||
window.aaa = window.ayf;
|
@ -61,7 +61,13 @@ var navigator = {
|
||||
permissions: {},
|
||||
platform: "Linux x86_64",
|
||||
plugins: {
|
||||
0: {type: 'application/pdf', suffixes: 'pdf', description: 'Portable Document Format'},
|
||||
0: {
|
||||
0: MimeType,
|
||||
name: "Native Client",
|
||||
length: 2,
|
||||
filename: "internal-nacl-plugin",
|
||||
description: ""
|
||||
},
|
||||
1: {type: 'text/pdf', suffixes: 'pdf', description: 'Portable Document Format'},
|
||||
2: {type: 'text/pdf', suffixes: 'pdf', description: 'Portable Document Format'},
|
||||
'application/pdf': {type: 'application/pdf', suffixes: 'pdf', description: 'Portable Document Format'},
|
||||
@ -1218,7 +1224,9 @@ window.byted_acrawler.init({
|
||||
dfp: 0
|
||||
});
|
||||
|
||||
|
||||
function get_ac_signature(__ac_nonce){
|
||||
window.document.cookie = '__ac_signature=_02B4Z6wo00f0112EppgAAIDAbC4CHUA8KwddpKIAALO9uDlmpWv.TFwlGqNfqIkZz-DwTSKYreqjWw60AS65ETM-KXUAb9JWwuJaZffCQ.4JziCrPpPtw-.oyryhxskIaWwEZkpW5v-edqzw8a; SEARCH_RESULT_LIST_TYPE=%22single%22; passport_csrf_token=fb66cc8b8a1045da45f7fad0a7a18cd5; passport_csrf_token_default=fb66cc8b8a1045da45f7fad0a7a18cd5; home_can_add_dy_2_desktop=%221%22; bd_ticket_guard_client_data=eyJiZC10aWNrZXQtZ3VhcmQtdmVyc2lvbiI6MiwiYmQtdGlja2V0LWd1YXJkLWl0ZXJhdGlvbi12ZXJzaW9uIjoxLCJiZC10aWNrZXQtZ3VhcmQtY2xpZW50LWNzciI6Ii0tLS0tQkVHSU4gQ0VSVElGSUNBVEUgUkVRVUVTVC0tLS0tXHJcbk1JSUJEakNCdFFJQkFEQW5NUXN3Q1FZRFZRUUdFd0pEVGpFWU1CWUdBMVVFQXd3UFltUmZkR2xqYTJWMFgyZDFcclxuWVhKa01Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRWJWTU5lWUJNRloxOTFtTWVaUzY0UVVSU1xyXG5SbGhDT0N4RnN5VStPbEdOS3ZvMzZzb0EwZ3UvaGVQd0lHaHF1d0FqY0h3U0RPbkg2NzU0cWQyK2E4d0daS0FzXHJcbk1Db0dDU3FHU0liM0RRRUpEakVkTUJzd0dRWURWUjBSQkJJd0VJSU9kM2QzTG1SdmRYbHBiaTVqYjIwd0NnWUlcclxuS29aSXpqMEVBd0lEU0FBd1JRSWhBSXZaVlBxc3RTV0tONkszRU5zVDdaQVgwMWpOL1Bpa2ZlZ1EyOGJBTDhUN1xyXG5BaUFBMk9HbWFWTy9oOVhiSTdzbFluSnVBRnJ4ZGtGZmwzdlNwY3JmUmJka3N3PT1cclxuLS0tLS1FTkQgQ0VSVElGSUNBVEUgUkVRVUVTVC0tLS0tXHJcbiJ9; pwa2=%220%7C0%7C1%7C0%22; tt_scid=h3KjsbcPagrztL9zb3JR6bpJtT6dS7j9-PnqAPWVdsQ7yRvORbFjLLzzdm5K4bKf9ed7; s_v_web_id=verify_ll3jlxw8_gYaHeYiX_M5UI_4oA0_ALpe_gLNjnmLrF4j0; FORCE_LOGIN=%7B%22videoConsumedRemainSeconds%22%3A180%2C%22isForcePopClose%22%3A1%7D; msToken=_V_XNphZkGc8uaJBx_wy9XlsZUOELYb5Eh0gUNAI01O7m4Nmt2nTNZV08-lcXYXsaBBR1qG931dhBxcRO7brmSW6FORCaIbeblD7oIBT6ton1jSDyZj04WdU'
|
||||
var __ac_signature = window.byted_acrawler.sign("", __ac_nonce)
|
||||
return __ac_signature
|
||||
}
|
File diff suppressed because one or more lines are too long
7
抖音js逆向学习/pc_抖音破解/node/vm_run.js
Normal file
7
抖音js逆向学习/pc_抖音破解/node/vm_run.js
Normal file
@ -0,0 +1,7 @@
|
||||
var fs = require('fs');
|
||||
const {VM} = require('vm2');
|
||||
const vm = new VM();
|
||||
var data = fs.readFileSync('./_ac_signature_vm.js', 'utf8')
|
||||
debugger
|
||||
vm.run(data)
|
||||
debugger
|
@ -3,7 +3,7 @@ import execjs
|
||||
|
||||
|
||||
def get_ac_sign(ac_nonce):
|
||||
with open('../node/_ac_signature.js', 'r', encoding='utf-8') as f:
|
||||
with open('../node/_ac_signature_lx.js', 'r', encoding='utf-8') as f:
|
||||
b = f.read()
|
||||
c = execjs.compile(b)
|
||||
d = c.call('get_ac_signature', ac_nonce)
|
||||
|
Loading…
x
Reference in New Issue
Block a user