From ae06b5a242d30d671a355a2c1b423de5ff531fa1 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 29 Dec 2020 01:43:29 +0000 Subject: [PATCH] Update content type for routeJSAntispam Set to text/plain Otherwise it's application/gzip and returns junk --- routes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes.go b/routes.go index efec5fc5..652faad1 100644 --- a/routes.go +++ b/routes.go @@ -357,6 +357,8 @@ func routeJSAntispam(w http.ResponseWriter, r *http.Request, user *c.User) c.Rou h.Write([]byte(user.GetIP())) jsToken := hex.EncodeToString(h.Sum(nil)) + w.Header().Set("Content-Type", "text/plain") + innerCode := "`document.getElementByld('golden-watch').value='" + jsToken + "';`" io.WriteString(w, `let hihi=`+innerCode+`;hihi=hihi.replace('ld','Id');eval(hihi);`)