ToKeiChun

IP Subnetting

Aug 28th, 2019
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. <?php
  2. /*
  3. BY READING THE ORIGINAL SOURCE IT DOESN'T MEAN THAT YOU CAN TAKE A STUFF AND CLAIM IT AS YOUR OWN
  4. AS IT PRODUCELLY FOR YOUR EDUCATION
  5. SO KEEP ANY CREDIT FROM THE ORIGINAL CODER.
  6. - Hun2Memory PHP XTea jacking 2019
  7. */
  8. echo "
  9. _____ _____ _____ _ _ ____ _ _ ______ _______ _______ _____ _ _ _____
  10. |_ _| __ \ / ____| | | | _ \| \ | | ____|__ __|__ __|_ _| \ | |/ ____|
  11. | | | |__) | | (___ | | | | |_) | \| | |__ | | | | | | | \| | | __
  12. | | | ___/ \___ \| | | | _ <| . ` | __| | | | | | | | . ` | | |_ |
  13. _| |_| | ____) | |__| | |_) | |\ | |____ | | | | _| |_| |\ | |__| |
  14. |_____|_| |_____/ \____/|____/|_| \_|______| |_| |_| |_____|_| \_|\_____|
  15.  
  16. Coded by : Akazh ID
  17. Facebook : https://facebook.com/akazh.gov
  18. Obfuscator Jacked by: CepzDecoded / Hun2Memory
  19. Facebook : https://facebook.com/CepzDecoded
  20. ";
  21.  
  22. echo "Host : ";
  23. $input_host = trim(fgets(STDIN));
  24.  
  25. echo "Netmask : ";
  26. $input_netmask = trim(fgets(STDIN));
  27.  
  28. echo "Netmask (for supernet) : ";
  29. $input_netmask2 = trim(fgets(STDIN));
  30.  
  31. if (empty($input_host)) {
  32. echo "Host masih kosong";
  33. die();
  34. }
  35. echo "
  36. [*] Menghitung . . .
  37.  
  38. ";
  39.  
  40. $ch = curl_init();
  41. curl_setopt($ch, CURLOPT_URL, "http://jodies.de/ipcalc?host=" .$input_host ."&mask1=" .$input_netmask ."&mask2=" .$input_netmask2 ."");
  42. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  43. $result = curl_exec($ch);
  44. $result = explode('</font><font color="#0000ff">', $result);
  45. $address = explode('</font><font color="#909090">', $result[1]);
  46. $explode1 = explode('</font><font color="#909090">', $result[1]);
  47. $explode2 = explode('</font><br><font color="#000000">', $explode1[1]);
  48. $explode3 = explode('</font><br><font color="#000000">', $result[2]);
  49.  
  50. $netmask = explode('</font><font color="#ff0000">', $explode3[0]);
  51. $wildcard = explode('</font><font color="#909090">', $result[3]);
  52. $network = explode('</font><font color="#009900">', $result[4]);
  53.  
  54. $broadcast = explode('</font><font color="#909090">', $result[5]);
  55. $hostmin = explode('</font><font color="#909090">', $result[6]);
  56. $hostmax = explode('</font><font color="#909090">', $result[7]);
  57. $hostnet = explode('</font>', $result[8]);
  58.  
  59. echo 'Address: ' .$address[0] ."\n";
  60. echo "=> " .$explode2[0] ."\n";
  61. echo "Netmask: " .$netmask[0]. "\n";
  62. echo "Wildcard: " .$wildcard[0] ."\n";
  63. echo "Network: " .$network[0] ."\n";
  64. echo "Broadcast: " .$broadcast[0] . "\n";
  65. echo "HostMin: " .$hostmin[0] . "\n";
  66. echo "HostMax: " .$hostmax[0] . "\n";
  67. echo "Host/Net: ".$hostnet[0] ."\n";
Add Comment
Please, Sign In to add comment