Hacking Suggestion 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.
Link to original source code on the page of the exemple below.

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/

I can host it for free if you need it. PM me.
 
Last edited by atomik22,

ScarletDreamz

[Debug Mode]
Member
Joined
Feb 16, 2015
Messages
3,967
Trophies
1
Location
/dev/sda1
XP
4,390
Country
United States
The "Save" function redirects to a very weird shop.

And here is the source code for anyone who wants to try it:

Code:
<?

   if(isset($_POST['message'])){
       $message=$_POST['message'];
   }
       
   if(isset($_POST['links']))
   {
       $splitlinks=explode("\n", $_POST['links']);
       for($i=0;$i<sizeof($splitlinks)-1;$i++)
       {
           if($i!=sizeof($splitlinks)-2)
           {
               $linksTot=$linksTot . $splitlinks[$i] . "\",\"";
           }else{
              $linksTot=$linksTot . $splitlinks[$i] . "\"],\"success\":\"" . $message . "\"}";
           }
       }
       $final= "{\"files\":[],\"directories\":[\"" . $linksTot;
       $final=str_replace("\n", "", $final);
       $final=str_replace("\r", "", $final);
       $fp = fopen("index.json", "w");
       fwrite($fp, $final);
       fclose($fp);
       header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . $location);
   }


   $fn = fopen("index.json","r");
   $result = fgets($fn);
   fclose($fn);
   $splittedR=explode('"', $result);
   for($i=5;$i<sizeof($splittedR);$i+=2)
   {
       if ($splittedR[$i]=="success")
       {
           $succes=1;
           $succesText=$splittedR[$i+2];
       }else{
           if($succes!=1){
              $links=$links . $splittedR[$i] . "\n";
           }
       }
   }
   
?>
<html>
   <head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
       <title>Tinfoil</title>
   </head>
   <body>
       <form name="allo" method="post">
           Welcome message<textarea id="message" name="message" rows="5" cols="70"><?echo $succesText?></textarea><br><br>
           Links (One GDrive link per line)<textarea id="links" name="links" rows="10" cols="200"><?echo $links?></textarea><br><br>
           <input type=Submit id="Envoyer" value="Save">
       </form>
   </body>
</html>
<?
   
   echo "Copy this link in the file browser of HBG Shop";
   function url(){
  return sprintf(
   "%s://%s%s",
   isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
   $_SERVER['SERVER_NAME'],
   $_SERVER['REQUEST_URI']
  );
}

echo "<br><br>" . url() . "index.json";
   
?>
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    radicaleinward @ radicaleinward: I'm thinking of making a thread of a very hard-to-find movie short, that I'm uploading to the...