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
80
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
80
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";
   
   
?>
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    Is that why your guts been messed up also?
  • BigOnYa @ BigOnYa:
    I'm still laughing bout when Veho ask other day how many people live in Michigan, and you said 1 white dude.
  • K3Nv2 @ K3Nv2:
    I don't remember what I did yesterday
  • BigOnYa @ BigOnYa:
    And that's why you backed up
  • K3Nv2 @ K3Nv2:
    I regret giving birth to you
    +1
  • BigOnYa @ BigOnYa:
    BeSt turd you ever shit out
  • BigOnYa @ BigOnYa:
    Is that Metro any good?
  • K3Nv2 @ K3Nv2:
    I gave up after two chemo dogs jumped me
    +1
  • wolffangalchemist @ wolffangalchemist:
    My favorite part about filing taxes is that I always either owe a disportionate amount of money or get literally pennies back.
  • wolffangalchemist @ wolffangalchemist:
    And I make under 30k a year.
  • K3Nv2 @ K3Nv2:
    Just sit in jail
  • wolffangalchemist @ wolffangalchemist:
    If it was a option just to go to jail for month as opposed to filing taxes I might be tempted, jail ain't that bad atleast in the us.
  • wolffangalchemist @ wolffangalchemist:
    You just go in for a month and come out with no fines or having to pay them anyway, I would be down.
  • Maximumbeans @ Maximumbeans:
    Good morning degenerates
  • LeoTCK @ LeoTCK:
    hi, good morning
  • LeoTCK @ LeoTCK:
    @wolffangalchemist here, jail or even simple detention is instead a way to get debts on you by the state
    outright
  • LeoTCK @ LeoTCK:
    because its not "free", its only free if you stay there but then they want you to pay up once you get released, for all the "shitty service" and abuse they gave you
  • LeoTCK @ LeoTCK:
    I'm not fucking kidding
  • LeoTCK @ LeoTCK:
    that's how its set up over here
  • LeoTCK @ LeoTCK:
    and you'll never be able to get out of those debts unless..you commit a crime...thus making an endless cycle
  • LeoTCK @ LeoTCK:
    they are "smart" you see
  • LeoTCK @ LeoTCK:
    they're just bastards if you ask me lol
  • LeoTCK @ LeoTCK:
    some homeless people commit crimes or a lot of misdemenors to get into detention so they have some place to stay even, but of course it will never solve their finances, quite the opposite
  • LeoTCK @ LeoTCK:
    so yea....its really messed up if you ask me
    LeoTCK @ LeoTCK: so yea....its really messed up if you ask me