mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-21 12:15:16 +08:00
68js加密防并发谁能并发我叫谁爹
This commit is contained in:
parent
5646d086fa
commit
dd619a9745
90
猿人学练习/68js加密防并发谁能并发我叫谁爹/main.py
Normal file
90
猿人学练习/68js加密防并发谁能并发我叫谁爹/main.py
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
def get_hex_str(data):
|
||||||
|
url = f"http://127.0.0.1:3005/sign_68"
|
||||||
|
session = requests.session()
|
||||||
|
headers = {
|
||||||
|
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||||
|
}
|
||||||
|
session.headers = headers
|
||||||
|
response = session.request("POST", url, data=data)
|
||||||
|
return response.text
|
||||||
|
|
||||||
|
|
||||||
|
def challenge68(page, data):
|
||||||
|
url = "https://www.python-spider.com/api/challenge68"
|
||||||
|
if data:
|
||||||
|
import urllib
|
||||||
|
urllib.parse.quote(data['t'])
|
||||||
|
payload = f"page={page}&c={data['c']}&r={data['r']}&t={urllib.parse.quote(data['t'])}&uuid={data['uuid']}&a={data['a']}"
|
||||||
|
print(payload)
|
||||||
|
print(len(payload))
|
||||||
|
headers = {
|
||||||
|
'content-length': f'{len(payload)}',
|
||||||
|
'pragma': 'no-cache',
|
||||||
|
'cache-control': 'no-cache',
|
||||||
|
'sec-ch-ua': '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',
|
||||||
|
'accept': 'application/json, text/javascript, */*; q=0.01',
|
||||||
|
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||||
|
'x-requested-with': 'XMLHttpRequest',
|
||||||
|
'sec-ch-ua-mobile': '?0',
|
||||||
|
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
|
||||||
|
'sec-ch-ua-platform': '"Windows"',
|
||||||
|
'origin': 'https://www.python-spider.com',
|
||||||
|
'sec-fetch-site': 'same-origin',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'referer': 'https://www.python-spider.com/challenge/68',
|
||||||
|
'accept-encoding': 'gzip, deflate, br',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8'
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
payload = ''
|
||||||
|
headers = {
|
||||||
|
'content-length': '0',
|
||||||
|
'pragma': 'no-cache',
|
||||||
|
'cache-control': 'no-cache',
|
||||||
|
'sec-ch-ua': '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',
|
||||||
|
'accept': 'application/json, text/javascript, */*; q=0.01',
|
||||||
|
'x-requested-with': 'XMLHttpRequest',
|
||||||
|
'sec-ch-ua-mobile': '?0',
|
||||||
|
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
|
||||||
|
'sec-ch-ua-platform': '"Windows"',
|
||||||
|
'origin': 'https://www.python-spider.com',
|
||||||
|
'sec-fetch-site': 'same-origin',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'referer': 'https://www.python-spider.com/challenge/68',
|
||||||
|
'accept-encoding': 'gzip, deflate, br',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8'
|
||||||
|
}
|
||||||
|
session = requests.session()
|
||||||
|
session.headers = headers
|
||||||
|
response = session.request("POST", url, data=payload)
|
||||||
|
return response.json()
|
||||||
|
|
||||||
|
|
||||||
|
def run():
|
||||||
|
data_num = 0
|
||||||
|
for page in range(1, 101):
|
||||||
|
res_dict = challenge68(page, '')
|
||||||
|
print(res_dict)
|
||||||
|
a = get_hex_str(res_dict)
|
||||||
|
res_dict['a'] = a
|
||||||
|
print(res_dict)
|
||||||
|
res_dict = challenge68(page, res_dict)
|
||||||
|
print(res_dict)
|
||||||
|
exit()
|
||||||
|
|
||||||
|
# data_list_num = []
|
||||||
|
# for data in data_list:
|
||||||
|
# data_list_num.append(int(data.get('value')))
|
||||||
|
# data_num += int(data.get('value'))
|
||||||
|
# print(data_list_num, page)
|
||||||
|
# print(data_num)
|
||||||
|
# print(data_num)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
run()
|
18
猿人学练习/68js加密防并发谁能并发我叫谁爹/server.js
Normal file
18
猿人学练习/68js加密防并发谁能并发我叫谁爹/server.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
const express = require('express');
|
||||||
|
const app = express();
|
||||||
|
const code = require("./w-test");
|
||||||
|
var bodyParser = require('body-parser');
|
||||||
|
app.use(bodyParser());
|
||||||
|
|
||||||
|
|
||||||
|
app.post('/sign_68', function (req, res) {
|
||||||
|
let result = '';
|
||||||
|
let data = req.body;
|
||||||
|
result = code.hex_1_str(data);
|
||||||
|
res.send(result.toString());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
app.listen(3005, () => {
|
||||||
|
console.log("开启服务,端口 3005")
|
||||||
|
});
|
@ -1,10 +1,7 @@
|
|||||||
window = global;
|
|
||||||
window.wp = '';
|
|
||||||
|
|
||||||
|
|
||||||
var h = {
|
var h = {
|
||||||
"base64-js": 1,
|
"base64-js": 1,
|
||||||
"buffer": 2,
|
"buffer": 2,
|
||||||
|
"ieee754": 3,
|
||||||
"ieee754": 3
|
"ieee754": 3
|
||||||
};
|
};
|
||||||
var z = {
|
var z = {
|
||||||
@ -16,7 +13,6 @@ var B = {
|
|||||||
var V = {
|
var V = {
|
||||||
"whirlpool-js": 4
|
"whirlpool-js": 4
|
||||||
};
|
};
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
function G(F, W, c) {
|
function G(F, W, c) {
|
||||||
function L(D, q) {
|
function L(D, q) {
|
||||||
@ -1550,15 +1546,13 @@ var V = {
|
|||||||
N >>= -f;
|
N >>= -f;
|
||||||
f += T;
|
f += T;
|
||||||
|
|
||||||
for (; f > 0; D = D * 256 + O[Z + W], W += U, f -= 8) {
|
for (; f > 0; D = D * 256 + O[Z + W], W += U, f -= 8) {}
|
||||||
}
|
|
||||||
|
|
||||||
q = D & (1 << -f) - 1;
|
q = D & (1 << -f) - 1;
|
||||||
D >>= -f;
|
D >>= -f;
|
||||||
f += v;
|
f += v;
|
||||||
|
|
||||||
for (; f > 0; q = q * 256 + O[Z + W], W += U, f -= 8) {
|
for (; f > 0; q = q * 256 + O[Z + W], W += U, f -= 8) {}
|
||||||
}
|
|
||||||
|
|
||||||
if (D === 0) D = 1 - c;else {
|
if (D === 0) D = 1 - c;else {
|
||||||
if (D === L) return q ? NaN : (N ? -1 : 1) * Infinity;else {
|
if (D === L) return q ? NaN : (N ? -1 : 1) * Infinity;else {
|
||||||
@ -1615,14 +1609,12 @@ var V = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; M >= 8; O[K + D] = P & 255, D += o, P /= 256, M -= 8) {
|
for (; M >= 8; O[K + D] = P & 255, D += o, P /= 256, M -= 8) {}
|
||||||
}
|
|
||||||
|
|
||||||
r = r << M | P;
|
r = r << M | P;
|
||||||
L += M;
|
L += M;
|
||||||
|
|
||||||
for (; L > 0; O[K + D] = r & 255, D += o, r /= 256, L -= 8) {
|
for (; L > 0; O[K + D] = r & 255, D += o, r /= 256, L -= 8) {}
|
||||||
}
|
|
||||||
|
|
||||||
O[K + D - o] |= U * 128;
|
O[K + D - o] |= U * 128;
|
||||||
};
|
};
|
||||||
@ -1761,7 +1753,9 @@ var V = {
|
|||||||
X0[Xh][0] ^= X4[Xh][0] ^ X3[Xh][0];
|
X0[Xh][0] ^= X4[Xh][0] ^ X3[Xh][0];
|
||||||
X0[Xh][1] ^= X4[Xh][1] ^ X3[Xh][1];
|
X0[Xh][1] ^= X4[Xh][1] ^ X3[Xh][1];
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
function X8(Xh) {
|
function X8(Xh) {
|
||||||
let Xz;
|
let Xz;
|
||||||
@ -1963,21 +1957,18 @@ var V = {
|
|||||||
}).call(this, X("buffer").Buffer);
|
}).call(this, X("buffer").Buffer);
|
||||||
}, B],
|
}, B],
|
||||||
6: [function (l, s, y) {
|
6: [function (l, s, y) {
|
||||||
window.wp = l("whirlpool-js");
|
self.wp = l("whirlpool-js");
|
||||||
result = wp.encSync("11111", "hex");
|
result = wp.encSync("11111", "hex");
|
||||||
}, V]
|
}, V]
|
||||||
}, {}, [6]);
|
}, {}, [6]);
|
||||||
|
|
||||||
// onmessage = X => {
|
onmessage = X => {
|
||||||
// for (var s = parseInt(X.data.split("|")[0]); s <= parseInt(X.data.split("|")[1]); s++) {
|
for (var s = parseInt(X.data.split("|")[0]); s <= parseInt(X.data.split("|")[1]); s++) {
|
||||||
// result = self.wp.encSync(X.data.split("|")[2] + s.toString(), "hex");
|
result = self.wp.encSync(X.data.split("|")[2] + s.toString(), "hex");
|
||||||
//
|
|
||||||
// if (result.slice(0, 10) === X.data.split("|")[3]) {
|
|
||||||
// self.postMessage(s);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// };
|
|
||||||
|
|
||||||
result = window.wp.encSync('1', "hex");
|
if (result.slice(0, 10) === X.data.split("|")[3]) {
|
||||||
console.log(result);
|
self.postMessage(s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user