This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/mset/rop3ds/download.html.template

72 lines
2.0 KiB
Plaintext
Raw Normal View History

2015-08-05 03:57:37 +02:00
<html><head><script>
d=document,r=parent,w=window,n=navigator.userAgent;
if(r==w){
l='reiNand.dat',g=decodeURI(d.URL).split('?');
if(g.length>1){
g=g[1].split('&');
if(g[0].length>0&&g[0].length<25)l=g[0];
}
d.title='Load '+l;
w.onload=function(){
if(n.indexOf('1.7538.CN')>=0)n=n.replace('.CN',confirm('系统版本4.2-4.4选择OK系统版本4.5选择取消。')?'.CN.42':'.CN.45');
var h=d.body.childNodes[0];
var v=n.split('/').pop().replace(/[^\dCKT]/g,'')+'.rop';
h.innerHTML='Downloading payload '+v+': ';
var x=new XMLHttpRequest();
x.open('GET',v,true);
x.overrideMimeType('text/plain; charset=x-user-defined');
x.onload=function(){
if(x.status==200){
var u='OK<br>Patching filename to '+l+': ';
var s=x.responseText;
var y=s.length;
var t=Array(y<768?768:y);
for(i=0;i<y;t[i]=s.charCodeAt(i)&255,i++);
y=t.length>>1;
for(i=0;i<y;t[i]=t[i*2]|t[i*2+1]<<8,i++);
t.length>>=1;
s=String.fromCharCode.apply(null,t);
y=s.indexOf('dmc:/')+5;
if(y>4){
s=s.substring(0,y)+l+'\0'+s.slice(y+l.length+1);
u+='OK';
}else{
u+='skipped';
}
if(s.length<=384)s+=Array(384-s.length+1).join('\0')+s;
s+=Array(384*15-s.length+1+1).join('\0');
q=[];
for(k=0,i=0;k<15;q[k++]=s.substring(i,i+385),i+=384);
u+='<br>Executing payload...<iframe height=0 src=#/>';
}else{
u='failed';
}
h.innerHTML+=u;
}
x.send();
}
}else{
w.onload=function(){
b=0,f=w.frameElement,p=f.parentNode,o=d.createElement('object');
o.addEventListener('beforeload',function(){
if(++b==1)p.addEventListener('DOMSubtreeModified',r.z);
else if(b==2)p.removeChild(f);
});
d.body.appendChild(o);
}
}
function z(){
if(n.indexOf('Nintendo 3DS')>=0){
m=[];
for(j=0;j<410;j++){
a=Array(j);
if(384<j&&j<388){
for(k=0,i=(j-385)*5;k<5;a[k++]=q[i++]);
}else{
for(k=0,i=j/96;k<i;a[k++]=q[1]);
}
m.push(d.createTextNode(String.fromCharCode.apply(null,Array(a))));
}
}
}</script></head><body><h1>.</h1></body></html>