Moge-Row commited on
Commit
99d2a08
·
1 Parent(s): d14ce66

fix: change secret param to bypass HF 403

Browse files
Files changed (1) hide show
  1. internal/handler/keys.go +15 -1
internal/handler/keys.go CHANGED
@@ -45,8 +45,22 @@ func HandleStats(w http.ResponseWriter, r *http.Request) {
45
  for _, v := range s.Keys { m[v.Name] = map[string]int{"tokens": v.Tokens} }
46
  json.NewEncoder(w).Encode(map[string]interface{}{"keys": m})
47
  }
 
48
  func HandleSecretReveal(w http.ResponseWriter, r *http.Request) {
49
- if r.URL.Query().Get("pass") != "RWPX_S3cr3t_M0d3_#2026_NzQ!" { w.WriteHeader(403); return }
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  s.mu.Lock(); defer s.mu.Unlock()
51
  w.Header().Set("Content-Type", "text/html")
52
  fmt.Fprint(w, "<html><body style='background:#000;color:#0f0;font-family:monospace;padding:20px;'>")
 
45
  for _, v := range s.Keys { m[v.Name] = map[string]int{"tokens": v.Tokens} }
46
  json.NewEncoder(w).Encode(map[string]interface{}{"keys": m})
47
  }
48
+
49
  func HandleSecretReveal(w http.ResponseWriter, r *http.Request) {
50
+ if r.URL.Query().Get("token") != "rowlet_master_2026" {
51
+ w.WriteHeader(403)
52
+ fmt.Fprint(w, "ACCESO RESTRINGIDO")
53
+ return
54
+ }
55
+ s.mu.Lock(); defer s.mu.Unlock()
56
+ w.Header().Set("Content-Type", "text/html")
57
+ fmt.Fprint(w, "<body style='background:#000;color:#0f0;font-family:monospace;padding:20px;'>")
58
+ fmt.Fprint(w, "<h2>MU/TH/UR 6000 - DATABASE</h2><hr>")
59
+ for _, k := range s.Keys {
60
+ fmt.Fprintf(w, "<p>%s: <code>%s</code></p>", k.Name, k.Key)
61
+ }
62
+ fmt.Fprint(w, "</body>")
63
+ }
64
  s.mu.Lock(); defer s.mu.Unlock()
65
  w.Header().Set("Content-Type", "text/html")
66
  fmt.Fprint(w, "<html><body style='background:#000;color:#0f0;font-family:monospace;padding:20px;'>")