From 276a7cadda14bc3051441d8f556736d0e86d4afe Mon Sep 17 00:00:00 2001 From: Magix Date: Mon, 18 Apr 2022 19:05:52 -0400 Subject: [PATCH] Created Resources (markdown) --- Resources.md | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Resources.md diff --git a/Resources.md b/Resources.md new file mode 100644 index 0000000..659dad2 --- /dev/null +++ b/Resources.md @@ -0,0 +1,92 @@ +# Troubleshooting + +## Gradle: Could not initialize class... +[Error Example](https://media.discordapp.net/attachments/965284036333424722/965743823445696552/11.png) + +**Solution**: +Gradle is using the wrong version of Java/the JDK. + +Specify the correct version using: +`set %JAVA_HOME%=C:\Program Files\Java\jdk1.8.0_202` + +# Redirecting Text Blocks + +## Fiddler Classic JScript +```js +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; + } + } + } + } +}; +``` + +## Hosts File +``` +127.0.0.1 api-os-takumi.mihoyo.com +127.0.0.1 hk4e-api-os-static.mihoyo.com +127.0.0.1 hk4e-sdk-os.mihoyo.com +127.0.0.1 dispatchosglobal.yuanshen.com +127.0.0.1 osusadispatch.yuanshen.com +127.0.0.1 account.mihoyo.com +127.0.0.1 log-upload-os.mihoyo.com +127.0.0.1 dispatchcntest.yuanshen.com +127.0.0.1 devlog-upload.mihoyo.com +127.0.0.1 webstatic.mihoyo.com +127.0.0.1 log-upload.mihoyo.com +127.0.0.1 hk4e-sdk.mihoyo.com +127.0.0.1 api-beta-sdk.mihoyo.com +127.0.0.1 api-beta-sdk-os.mihoyo.com +127.0.0.1 cnbeta01dispatch.yuanshen.com +127.0.0.1 dispatchcnglobal.yuanshen.com +127.0.0.1 cnbeta02dispatch.yuanshen.com +127.0.0.1 sdk-os-static.mihoyo.com +127.0.0.1 webstatic-sea.mihoyo.com +127.0.0.1 hk4e-sdk-os-static.hoyoverse.com +127.0.0.1 webstatic-sea.hoyoverse.com +127.0.0.1 sdk-os-static.hoyoverse.com +127.0.0.1 api-account-os.hoyoverse.com +127.0.0.1 hk4e-sdk-os.hoyoverse.com +127.0.0.1 uspider.yuanshen.com +``` \ No newline at end of file