Hacking RELEASE PHP script to host your own GDrive links + Welcome msg on TINFOIL / HBG

atomik22

Member
OP
Newcomer
Joined
Dec 18, 2014
Messages
16
Trophies
0
XP
70
Country
Canada
HBG SHOP / TINFOIL users

For those who might care, I made a very simple(shitty) php webpage to host your own GDrive links(Folders OR/AND single NSP) + Personnal welcome text.

Just add the COMPLETE link shown in the webpage to the file browser of HBG/Tinfoil and you are done.

See it here --> http://www.atomikpc.com/static/

**Don't forget that this is only a demo used be everyone.
**If you like it, host it yourself or PM me, I will host your personal one for free.
**The links are resetted each 5 minutes on the demo but not if you host it.
**You can manually reset the form if you erase everything then save.
 
Last edited by atomik22,

atomik22

Member
OP
Newcomer
Joined
Dec 18, 2014
Messages
16
Trophies
0
XP
70
Country
Canada
Here's the source code

Code:
<?
    if(isset($_POST['message'])){
        $message=$_POST['message'];
    }
       
    if(isset($_POST['linksNSP']))
    {
        $splitlinksNSP=explode("\n", $_POST['linksNSP']);
        for($y=0;$y<=sizeof($splitlinksNSP)-1;$y++)
        {
            if($y!=sizeof($splitlinksNSP)-1)
            {
                $linksTotNSP=$linksTotNSP . $splitlinksNSP[$y] . "\",\"";
            }else{
               $linksTotNSP=$linksTotNSP . $splitlinksNSP[$y] ;
            }
        }
    }
   
    if(isset($_POST['links']))
    {
        $splitlinks=explode("\n", $_POST['links']);
        for($i=0;$i<=sizeof($splitlinks)-1;$i++)
        {
            if($i!=sizeof($splitlinks)-1)
            {
                $linksTot=$linksTot . $splitlinks[$i] . "\",\"";
            }else{
                $linksTot=$linksTot . $splitlinks[$i] . "\"],\"success\":\"" . $message . "\"}";
            }
        }
        $final= "{\"files\":[\"" . $linksTotNSP . "\"],\"directories\":[\"" . $linksTot;
        $final=str_replace("\n", "", $final);
        $final=str_replace("\r", "", $final);
        $final=str_replace("[\"\"]", "[]", $final);
        $final=str_replace(",\"\"", "", $final);
        $fp = fopen("index.json", "w");
        fwrite($fp, $final);
        fclose($fp);
        header("Location: " . $_SERVER['PHP_SELF']);
    }
    $fn = fopen("index.json","r");
    $result = fgets($fn);
    fclose($fn);
    $splittedR=explode(":[", $result);
    $splittedNSP=explode('"', $splittedR[1]);
    for($i=1;$i<sizeof($splittedNSP)-2;$i+=2)
    {
        $linksNSP=$linksNSP . $splittedNSP[$i] . "\n";
    }
   
    $splittedFolders=explode('"', $splittedR[2]);
   
    for($i=1;$i<sizeof($splittedFolders);$i+=2)
    {
        if ($splittedFolders[$i]=="success")
        {
            $succes=1;
            $succesText=$splittedFolders[$i+2];
        }else{
            if($succes!=1){
               $links=$links . $splittedFolders[$i] . "\n";
            } 
        }
    }
   
    if(trim($succesText)==""){
        $succesText="Put your welcome message here";
    }
     if(trim($links)=="" && trim($linksNSP)==""){
        $links="https://drive.google.com/open?id=xxxxxxxxxxxxxxxx\rhttps://drive.google.com/open?id=yyyyyyyyyyyyyyyy\rhttps://drive.google.com/open?id=zzzzzzzzzzzzzzzz";
        $linksNSP="https://drive.google.com/open?id=xxxxxxxxxxxxxxxx\rhttps://drive.google.com/open?id=yyyyyyyyyyyyyyyy\rhttps://drive.google.com/open?id=zzzzzzzzzzzzzzzz";
    }
?>
<html>
    <head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
        <title>Tinfoil</title>
    </head>
    <body>
        <form name="allo" method="post">
             <table>
                <tr><td>
            Welcome message</td><td><textarea id="message" name="message" rows="5" cols="70"><?echo $succesText?></textarea></td></tr><tr>
            <td>One GDrive <b>NSP</b> link per row, no folder<br>No maximum</td><td><textarea id="linksNSP" name="linksNSP" rows="10" cols="125"><?echo $linksNSP?></textarea></td></tr><tr>
            <td>One GDrive <b>FOLDER</b> link per row, no single nsp<br>No maximum</td><td><textarea id="links" name="links" rows="10" cols="125"><?echo $links?></textarea></td></tr><tr>
            <td><input type=Submit id="Envoyer" value="Save"></td></tr><tr></table>
        </form>
    </body>
</html>
<?
   
    echo "Copy this link in the file browser of HBG Shop/Tinfoil";
    function url(){
  return sprintf(
    "%s://%s%s",
    isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
    $_SERVER['SERVER_NAME'],
    $_SERVER['REQUEST_URI']
  );
}
echo "<br><br>" . str_replace("index.php","", url()) . "index.json";
   
   
?>
 

You may also like...

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3N1 @ K3N1:
    The mechs of mw2 really don't feel that bad
    +2
  • Shape @ Shape:
    Neither do the mechs of mech warrior 2. Much better game.
  • K3N1 @ K3N1:
    People would say different if cod Gundam was a thing
    +1
  • Shape @ Shape:
    Omg do you know how much money I would spend if that was a thing? Especially if you get to assemble the gundams somewhat like those old model toy kits. The answer is zero dollars. I would spend zero dollars. It would still be so good, though.
  • K3N1 @ K3N1:
    Liar
    +1
  • Shape @ Shape:
    $118.49
  • x65943 @ x65943:
    I bought 1-2 switch, imagine my pain
    +2
  • x65943 @ x65943:
    for full price at launch
    +2
  • Shape @ Shape:
    Full price at launch for full exploitability without modchips. Or so I hear.
    +1
  • K3N1 @ K3N1:
    You should like buy a 3rd one and ship it to my address
  • x65943 @ x65943:
    No no lads, the game called 1-2 switch
    +1
  • x65943 @ x65943:
    Where you feel the controller vibrate and guess how many virtual ice cubes are inside of it
    +2
  • K3N1 @ K3N1:
    You should still buy me a switch so I don't have to pay for it
  • The Real Jdbye @ The Real Jdbye:
    best game on the switch amirite
  • The Real Jdbye @ The Real Jdbye:
    i just saw a video yesterday that mentioned how it's a good thing 1-2-switch wasn't a pack in title because it would've made everyone lose faith in the switch immediately and they might have a point
    +1
  • Sonic Angel Knight @ Sonic Angel Knight:
    It was this one, The "video" Jdbye watched this one. :P
  • K3N1 @ K3N1:
    What no The Real video Jdbye?
  • M4x1mumReZ @ M4x1mumReZ:
    @Shape, Quake is great.
    +1
  • Sonic Angel Knight @ Sonic Angel Knight:
    QUAKER OATS! :P
    +1
  • K3N1 @ K3N1:
    Remember to eat your oats
    +1
  • Shape @ Shape:
    I prefer to nuke my oats. At quake.
    +1
    K3N1 @ K3N1: https://youtube.com/shorts/as489gU7sLo?feature=share