neige d'aoust

knowledge, art, and other stuff

User Tools

Site Tools


proto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
proto [2025/10/12 03:35] – created Yukiproto [2025/10/12 04:24] (current) Yuki
Line 16: Line 16:
 <script> <script>
 function rot(){ function rot(){
-navigator.registerProtocolHandler("web+rot", "https://膤.com/proto?rot=%s");+  navigator.registerProtocolHandler("web+rot", "https://膤.com/proto?url=%s");
 } }
 function base(){ function base(){
-navigator.registerProtocolHandler("web+base", "https://膤.com/proto?base=%s");+  navigator.registerProtocolHandler("web+base", "https://膤.com/proto?url=%s"); 
 +
 +function caesar(str, shift, decrypt = false) { 
 +  const s = decrypt ? (26 - shift) % 26 : shift; 
 +  const n = s > 0 ? s : 26 + (s % 26); 
 +  return [...str] 
 +    .map((l, i) => { 
 +      const c = str.charCodeAt(i); 
 +      if (c >= 65 && c <= 90) 
 +        return String.fromCharCode(((c - 65 + n) % 26) + 65); 
 +      if (c >= 97 && c <= 122) 
 +        return String.fromCharCode(((c - 97 + n) % 26) + 97); 
 +      return l; 
 +    }) 
 +    .join(''); 
 +}; 
 +var params=new URLSearchParams(location.search); 
 +if(x=params.get("url")) 
 +
 +  var url = x.split(":"); 
 +  var proto = url.shift(); 
 +  var params = url.shift(); 
 +  var target = url.join(":"); 
 +   
 +  switch(proto){ 
 +    case "web+rot": 
 +      location.href = caesar(decodeURI(target),parseInt(params),true); 
 +    break; 
 +    case "web+base": 
 +    if(params == "64"
 +    { 
 +      location.href = atob(decodeURI(target)); 
 +    } 
 +    break; 
 +  }
 } }
 </script> </script>
 </html> </html>
proto.1760254545.txt.gz · Last modified: by Yuki