Advertisement
shutdown57

Jlinkz - redirect tools ( sc direct detect proxy )

Feb 4th, 2018
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.47 KB | None | 0 0
  1. <?php
  2. /**
  3. * JLINKZ - REDIRECT TOOLS
  4. * API BY BUKANCODER
  5. * CODED BY SHUTDOWN57
  6. * @author API : BukanCoder.
  7. * @author Jlinkz : shutdown57 ( https://facebook.com/alinko.jp )
  8. * @copyright (c) 2018 https://facebook.com/groups/jc.javcode
  9. **/
  10.  
  11. error_reporting(0);
  12. ob_start();
  13.  
  14. /*Started Code here.
  15. -
  16. Creating JavCode Class.*/
  17.  
  18. Class JavCode{
  19.     /*your key to open panel and jlinkz settings
  20.     -
  21.     example : http://example.com/Jlinkz.php?key=YourKeyHere
  22.     -
  23.     Default use http://example.com/Jlinkz.php?key=Jlinkz
  24.     */
  25.     public $yourkey = "Jlinkz";
  26.    
  27.     /*To check IP Client when visiting that script/file
  28.     -
  29.     default use 'dinamic' for checking dinamically Client IP.
  30.     -
  31.     If you want to trying Another IP u can change that.
  32.     */
  33.     public $from_ip = 'dinamic';
  34.     // public $from_ip = '127.0.0.1';
  35.     /*Construct is a first function called in class*/
  36.     public function __construct()
  37.     {
  38.             if($this->from_ip = 'dinamic')
  39.             {
  40.                 $this->from_ip = $_SERVER['REMOTE_ADDR'];
  41.             }else{
  42.                 $this->from_ip = $this->from_ip;
  43.             }
  44.         /*Checking if not empty parameter get "key" and if parameter get "key" same with $yourkey*/
  45.         if(!empty($_GET['key']) && $_GET['key'] == $this->yourkey){
  46.             /*Html code started here for frontend*/
  47.         ?><!DOCTYPE html>
  48.         <html>
  49.         <head>
  50.             <title>[::] Jlinkz - Redirect Tools [::]</title>
  51.             <meta name="author" content="shutdown57">
  52.             <meta name="description" content="Jlinkz - Redirect toolz//">
  53.         </head>
  54.         <!-- Style css code started here .-->
  55.         <style type="text/css">html,body{background: #333;color: #eee;font-family:monospace;}textarea{color: #eee;background: #333;border: 1px dashed #eee;width:400px;height:200px;}textarea:hover{border: 1px dashed #df5}textarea:focus{border: 1px solid lime}.container{max-width: 600px;margin: 0 auto;text-align: center;border: 1px dashed #ddd;box-shadow: 0px 0px 10px #f00;}.container:hover{box-shadow: 0px 0px 10px #df5;}.container:focus,.container:active{box-shadow: 0px 0px 10px lime;}label{font-weight: bold;text-align: center;}.inputbut{color: #eee;background: transparent;padding: 6px;border: 1px dashed #eee;cursor: pointer;}.inputbut:hover{color:#fff;border: 1px solid #fff}a{color: gold;text-decoration: none;}fieldset{border-left:0;border-right:0;border-top:1px solid #df5;border-bottom:1px solid #df5}select{border: 0;background: #333;color: #eee;}</style>
  56.         <body>
  57.             <br><br>
  58.             <div class="container">
  59.         <h2 style="text-align: center;text-shadow: 1px 1px 2px #888;border-bottom: 1px dashed #efe">Jlinkz - Redirect Tools</h2>
  60.         <p>DIRECTORY : <?php
  61.         /*Checking if writable directory CWD ( where that script are there ) .
  62.          -
  63.          Because the rules and links must create new file in that directory.
  64.         */
  65.             echo(is_writable(getcwd())) ? "<font color=lime>WRITABLE</font>" : "<font color=red>NOT WRITABLE</font>"; ?></p><br/>
  66.         <form method="post">
  67.             <label>List Link ::</label><br/>
  68.             <textarea name="link" required></textarea><br/><br/>
  69.             <fieldset><legend>Rulez of Jlinkz</legend>
  70.             <label>Link options ::</label><br/>
  71.             <input type="radio" name="opt" value="1">Random link | <input type="radio" name="opt" value="2">Open all link <br/><br/>
  72.             <label>Jika terdeteksi IP Proxy ::</label><br/>
  73.             <input type="radio" name="pro" value="1">Block 404 | <input type="radio" name="pro" value="2">Redirect to google.com <br/><br/>
  74.         <!--        <label>Jika tedeteksi Country [<select><option >ID</option><option >US</option></select>]</label><br/>
  75.             <input type="radio" name="con" value="1">Block 404 | <input type="radio" name="con" value="2">Redirect to google.com | <input type="radio" name="con" value="2">Allow <br/><br/> -->
  76.         </fieldset><br/>
  77.             <input type="submit" name="submit" value="Apply rules." class="inputbut"><br/>
  78.             <p>Request new rules ? <a href="https://facebook.com/alinko.jp" target="_blank">Click here.</a><br/></p>
  79.         </form>
  80.             </div>
  81.         <?php
  82.         if(isset($_POST['submit']))
  83.         {
  84.             $opt = $this->Jfilter($_POST['opt']);
  85.             $pro = $this->Jfilter($_POST['pro']);
  86.             $link = $this->Jfilter($_POST['link']);
  87.  
  88. $create_rulez =
  89.             "
  90. // Powered by : JavCode | API Proxy by : Bukan Coder.
  91.  
  92. @opt_link = \"".$opt."\"; // Options list of link, 1 = random link | 2 = open all link
  93. @detect_proxy = \"".$pro."\";  // if detected proxy IP , 1 = block 404 | 2 = redirect to google.com
  94.  
  95.             ";
  96.             flush();
  97.             ob_flush();
  98.             if($this->Jsave('Jrulez.txt',$create_rulez))
  99.             {
  100.                 echo "<font color=lime>[+]</font> RULEZ CREATED SUCCESSFULLY ... <br>";
  101.             }else{
  102.                 echo "<font color=red>[-]</font> COULDN'T CREATING RULEZ ... <br> ";
  103.             }
  104.             if($this->Jsave('Jlinkz.txt',$link))
  105.             {
  106.                 echo "<font color=lime>[+]</font> LIST LINKS SAVED SUCCESSFULLY ... <br>";
  107.             }else{
  108.                 echo "<font color=red>[-]</font> LIST LINKS COULDN'T SAVE :( ... <br>";
  109.             }
  110.             echo "<a href='?key=".$this->yourkey."'>Go back.</a> ";
  111.         }
  112.         ?><script type="text/javascript">function openmwmwk(link)
  113. {return window.open(link,'_blank','fullscreen=no,width=700,height=500,left=0,top=600,');}</script><footer style="bottom: 0;position:fixed;border: 1px solid #df5;width: 100%;text-align: center;padding: 3px">[<a href="">HOME</a>][<a href="#" onclick="openmwmwk('Jlinkz.txt');">Jlinkz</a>][<a href="#" onclick="openmwmwk('<?=$_SERVER[PHP_SELF];?>');">TEST</a>]------[ copyright &copy; 2018 <a href="#" onclick="openmwmwk('https://facebook.com/groups/jc.javcode');">JavCode</a> | API By : <a href="#" onclick="openmwmwk('http://xpro.io');">BukanCoder.</a>]------[<a href="">RESET</a>][<a href="#" onclick="openmwmwk('Jrulez.txt');">Jrulez</a>][<a href="<?=$_SERVER['PHP_SELF'];?>">Self</a>]</footer>
  114.         </body>
  115.         </html><?php
  116.         }else{
  117. $f = @file_get_contents('Jrulez.txt');
  118. $f = @str_replace("@","\$",$f);
  119. @eval($f);
  120.  
  121.             $link = @file_get_contents('Jlinkz.txt');
  122.             $getData = $this->Jcurl($this->from_ip);
  123.             print_r($getData);
  124.             $getData = json_decode($getData);
  125.             if($getData->proxy === true || $getData->proxy != null && $detect_proxy == "1")
  126.             {
  127.                 header('HTTP/1.0 404 Not Found');
  128.                 exit;
  129.             }elseif($getData->proxy === true || $getData->proxy != null && $detect_proxy == "2")
  130.             {
  131.                 /*header('location:https://google.com');*/
  132.                 $this->Jredirect('php','https://google.com');
  133.             }elseif($getData->proxy === null || $getData->proxy === false)
  134.             {
  135.                 if($opt_link == "1")
  136.                 {
  137.                     $exlink = explode("\r\n",$link);
  138.                     $rlinkz = $exlink[rand(0,count($exlink)-1)];
  139.                     $this->Jredirect('php',$rlinkz);
  140.                 }elseif($opt_link == "2")
  141.                 {
  142.                     $exlink = explode("\r\n",$link);
  143.                     foreach($exlink as $pli)
  144.                     {
  145.                         $this->Jredirect('js',$pli);
  146.                     }
  147.                 }else{
  148.                     die('<b>Error</b> : options link not correct !');
  149.                 }
  150.             }else{
  151.                 die('<b>Error</b> : Can\'t get data from the API.');
  152.             }
  153.         }
  154.     }
  155.     public function Jredirect($pepek,$linkna)
  156.     {
  157.         if($pepek == 'js')
  158.         {
  159.             echo "<script type='text/javascript'>window.open('".$linkna."');</script>";
  160.         }elseif($pepek == 'php')
  161.         {
  162.             header('location:'.$linkna);
  163.         }
  164.     }
  165.     public function Jsave($fname,$content)
  166.     {
  167.         $fp = fopen($fname,'w');
  168.         return fwrite($fp,$content);
  169.         fclose($fp);
  170.     }
  171.     public function Jcurl($ip)
  172.     {
  173.         $c = curl_init();
  174.         $opt = [CURLOPT_URL => "https://api.xpro.io/?ip=".$ip, // getting IP Info from the API. by : BukanCoder.
  175.                 CURLOPT_RETURNTRANSFER => true,
  176.                 CURLOPT_REFERER=>"https://xpro.io",
  177.                 CURLOPT_USERAGENT=>$_SERVER['HTTP_USER_AGENT']];
  178.         curl_setopt_array($c,$opt);
  179.         return curl_exec($c);
  180.         curl_close($c);
  181.     }
  182.     public function Jfilter($str)
  183.     {
  184.         return strip_tags($str);
  185.     }
  186. }
  187.  
  188. new JavCode;
  189.  
  190.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement