Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import System;
- import System.Threading;
- import System.Web;
- import System.Windows.Forms;
- import Fiddler;
- class Handlers
- {
- static function OnBeforeRequest(oSession: Session) {
- if (oSession.hostname.StartsWith("xmpp-service-") && oSession.hostname.EndsWith(".ol.epicgames.com") ||
- oSession.hostname.StartsWith("fortnite-matchmaking-public-service-") && oSession.hostname.EndsWith(".ol.epicgames.com"))
- oSession.oRequest.headers.UriScheme = "https";
- else if (oSession.hostname.StartsWith("account-public-service-") && oSession.hostname.EndsWith(".ol.epicgames.com")) {
- if (oSession.PathAndQuery.Contains("/account/api/oauth/token")) {
- oSession.oRequest.headers["Authorization"] = "basic MzQ0NmNkNzI2OTRjNGE0NDg1ZDgxYjc3YWRiYjIxNDE6OTIwOWQ0YTVlMjVhNDU3ZmI5YjA3NDg5ZDMxM2I0MWE=";
- }
- /*if (oSession.PathAndQuery.Contains("/QueryProfile?profileId=profile0")) {
- oSession.url = oSession.url.Replace("profileId=profile0","profileId=athena");
- }
- else if (oSession.PathAndQuery.StartsWith("/fortnite/api/game/v2/matchmakingservice/ticket/player/")) {
- var uriSplit = (oSession.url + "?").split("?");
- var queryString = HttpUtility.ParseQueryString(uriSplit[1]);
- var bucketSplit = queryString.Get("bucketId").split(":");
- }*/
- }
- }
- static function OnBeforeResponse(oSession: Session) {
- oSession.utilDecodeResponse();
- oSession.utilReplaceInResponse("wss+insecure://", "wss+insecure://");
- if (oSession.HostnameIs("fortnite-public-service-prod11.ol.epicgames.com")) {
- oSession.utilDecodeResponse();
- if (oSession.PathAndQuery.StartsWith("/fortnite/api/versioncheck?version=")) {
- oSession.oResponse.headers.HTTPResponseCode = 204;
- oSession.oResponse.headers.HTTPResponseStatus = "204 No Content";
- oSession.utilSetResponseBody("");
- }
- else if (oSession.PathAndQuery.Contains("/RefreshExpeditions") ||
- oSession.PathAndQuery.Contains("/IncrementNamedCounterStat") ||
- oSession.PathAndQuery.Contains("/GetMcpTimeForLogin")) {
- oSession.oResponse.headers.HTTPResponseCode = 200;
- oSession.oResponse.headers.HTTPResponseStatus = "200";
- oSession.oResponse.headers.Remove("X-Epic-Error-Code");
- oSession.oResponse.headers.Remove("X-Epic-Error-Name");
- oSession.utilSetResponseBody("{}");
- }
- }
- else if (new String(oSession.GetRequestBodyAsString()).Contains("client_credentials")) {
- oSession.oResponse.headers.HTTPResponseCode = 500;
- oSession.utilSetResponseBody("{}");
- Thread.Sleep(10000);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement