mirror of
https://github.com/letian1650/N3RD.git
synced 2025-01-25 04:05:17 +08:00
30 lines
607 B
JavaScript
30 lines
607 B
JavaScript
|
js:
|
||
|
let purl = input.split('|')[0];
|
||
|
let referer = input.split('|')[1];
|
||
|
let zm = input.split('|')[2];
|
||
|
print('purl:'+purl);
|
||
|
print('referer:'+referer);
|
||
|
print('zm:'+zm);
|
||
|
let myua = 'okhttp/3.15';
|
||
|
if(/ddrkey/.test(purl)){
|
||
|
let ret=request(purl,{
|
||
|
Referer: referer,
|
||
|
withHeaders:true,
|
||
|
'User-Agent':myua
|
||
|
});
|
||
|
log(ret);
|
||
|
input = purl;
|
||
|
}else {
|
||
|
let html = request(purl, {
|
||
|
headers: {
|
||
|
Referer: referer,
|
||
|
'User-Agent':myua
|
||
|
}
|
||
|
});
|
||
|
print(html);
|
||
|
try {
|
||
|
input = JSON.parse(html).url||{};
|
||
|
}catch (e) {
|
||
|
input = purl
|
||
|
}
|
||
|
}
|