Updated Resources (markdown)

Magix 2023-01-10 20:37:05 -05:00
parent 75d675ff93
commit 36d465c912

@ -22,46 +22,15 @@ import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
var list = [
"https://api-os-takumi.mihoyo.com/",
"https://hk4e-api-os-static.mihoyo.com/",
"https://hk4e-sdk-os.mihoyo.com/",
"https://dispatchosglobal.yuanshen.com/",
"https://osusadispatch.yuanshen.com/",
"https://account.mihoyo.com/",
"https://log-upload-os.mihoyo.com/",
"https://dispatchcntest.yuanshen.com/",
"https://devlog-upload.mihoyo.com/",
"https://webstatic.mihoyo.com/",
"https://log-upload.mihoyo.com/",
"https://hk4e-sdk.mihoyo.com/",
"https://api-beta-sdk.mihoyo.com/",
"https://api-beta-sdk-os.mihoyo.com/",
"https://cnbeta01dispatch.yuanshen.com/",
"https://dispatchcnglobal.yuanshen.com/",
"https://cnbeta02dispatch.yuanshen.com/",
"https://sdk-os-static.mihoyo.com/",
"https://webstatic-sea.mihoyo.com/",
"https://webstatic-sea.hoyoverse.com/",
"https://hk4e-sdk-os-static.hoyoverse.com/",
"https://sdk-os-static.hoyoverse.com/",
"https://api-account-os.hoyoverse.com/",
"https://hk4e-sdk-os.hoyoverse.com/" // Line 24
];
class Handlers
{
static function OnBeforeRequest(oS: Session) {
var active = true;
if(active) {
if(oS.uriContains("http://overseauspider.yuanshen.com:8888/log")){
oS.oRequest.FailSession(404, "Blocked", "yourmom");
}
for(var i = 0; i < 24 ;i++) {
if(oS.uriContains(list[i])) {
oS.host = "localhost"; // This can also be replaced with another IP address.
break;
}
}
if (oS.host.Equals("overseauspider.yuanshen.com:8888")) {
oS.oRequest.FailSession(404, "Not Found", "Not Found");
}
else if(oS.host.EndsWith(".yuanshen.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com")) {
oS.host = "localhost"; // This can also be replaced with another IP address.
}
}
};