artur99

Untitled

May 25th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 0 0
  1. <?php
  2.  
  3. if(!isset($_POST['go']) && !isset($_GET['go'])) die("ok");
  4.  
  5. $domain = "unknown.com";
  6.  
  7. if(isset($_POST['domain'])){
  8.     $domain = trim($_POST['domain']);
  9. }
  10. else if(isset($_GET['domain'])){
  11.     $domain = trim($_GET['domain']);
  12. }
  13.  
  14. $domain = substr($domain, -35);
  15.    
  16. if(!preg_match('/^[A-Za-z0-9.-_]$/' ,$domain)){
  17.     $domain = "base64:" . base64_encode($domain);
  18. }
  19.  
  20. if($domain == 'filmeonline.st){
  21.    die("ok0");
  22. }
  23.  
  24.  
  25. $ip = $_SERVER['REMOTE_ADDR'];
  26. $write_ip = true;
  27.  
  28. $handle = @fopen("clone_ips.txt", "r");
  29. if ($handle) {
  30.    while (($line = fgets($handle)) !== false) {
  31.        if(trim($line) == $ip){
  32.            $write_ip = false;
  33.            break;
  34.        }
  35.    }
  36.  
  37.    fclose($handle);
  38. } else {
  39.    $write_ip = true;
  40. }
  41.  
  42.  
  43.  
  44.  
  45.  
  46. if($write_ip) {
  47.    $fh = fopen("clone_list.txt", "a");
  48.    fwrite($fh, "$domain -> $ip\n");
  49.    fclose($fh);
  50.  
  51.    $fh = fopen("clone_ips.txt", "a");
  52.    fwrite($fh, "$ip\n");
  53.    fclose($fh);
  54.    echo "Ok";
  55. }
  56. else {
  57.    echo "Ok2";
  58. }
Add Comment
Please, Sign In to add comment