From 36d465c91201cd84c1f73e7b8a9fc8ecf396bc4b Mon Sep 17 00:00:00 2001 From: Magix <27646710+KingRainbow44@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:37:05 -0500 Subject: [PATCH] Updated Resources (markdown) --- Resources.md | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/Resources.md b/Resources.md index 4d0b25e..cd8013d 100644 --- a/Resources.md +++ b/Resources.md @@ -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. } } };