mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
Update magic.js
This commit is contained in:
parent
b23f77e0e4
commit
82b8cf2601
30
magic.js
30
magic.js
@ -209,7 +209,7 @@ class Env {
|
|||||||
this.cookie = cookie;
|
this.cookie = cookie;
|
||||||
this.username = decodeURIComponent(
|
this.username = decodeURIComponent(
|
||||||
cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
|
cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
|
||||||
$.defaults.headers['Cookie'] = this.cookie;
|
$.defaults.headers['Cookie'] = this.cookie;17840
|
||||||
this.index = i + 1;
|
this.index = i + 1;
|
||||||
try {
|
try {
|
||||||
await this.logic()
|
await this.logic()
|
||||||
@ -850,27 +850,15 @@ class Env {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async sign(fn, body = {}) {
|
async sign(fn, body = {}) {
|
||||||
if ('isvObfuscator'===fn){
|
let b = {"fn": fn, "body": body};
|
||||||
let b = {"functionId": fn, "body": JSON.stringify(body)};
|
let h = {"token": apiToken}
|
||||||
let h= {"Content-Type": "application/json","Cookie":"HELLO WORLD"}
|
try {
|
||||||
try {
|
let {data} = await this.request(apiSignUrl, h, b);
|
||||||
let {data} = await this.request('https://api.lfyouse.org/jdsign', h, b);
|
return {fn: data.fn, sign: data.body};
|
||||||
console.log(data)
|
} catch (e) {
|
||||||
return {fn: fn, sign: data};
|
console.log("sign接口异常")
|
||||||
} catch (e) {
|
|
||||||
console.log("isvObfuscator sign接口异常")
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
let b = {"fn": fn, "body": body};
|
|
||||||
let h = {"token": apiToken}
|
|
||||||
try {
|
|
||||||
let {data} = await this.request(apiSignUrl, h, b);
|
|
||||||
return {fn: data.fn, sign: data.body};
|
|
||||||
} catch (e) {
|
|
||||||
console.log("sign接口异常")
|
|
||||||
}
|
|
||||||
return {fn: "", sign: ""};
|
|
||||||
}
|
}
|
||||||
|
return {fn: "", sign: ""};
|
||||||
}
|
}
|
||||||
|
|
||||||
async _algo() {
|
async _algo() {
|
||||||
|
Loading…
Reference in New Issue
Block a user