Advertisement
shutdown57

Script Autosubnetting

Dec 20th, 2016
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.48 KB | None | 0 0
  1. <?php
  2. /*
  3. !~ [ NETWORK CODE ]             !~
  4. !~ Online Auto Subnetting Tools !~
  5. !~ c0ded by : shutdown57        !~
  6. !~ http://alinkoproject.com     !~
  7. !~ linuXcode.org                !~
  8. */
  9. function a_cover(){
  10. $red="\033[1;31m";
  11. $white="\033[0m";
  12. $green="\033[1;32m";
  13. $yellow="\033[1;33m";
  14. $blue="\033[1;34m";
  15.  @system('clear');
  16. print(" $red           _        ___      _
  17. _ __   ___| |_ ___ / _ \  __| |
  18. | '_ \ / _ \ __/ __| | | |/ _` |
  19. | | | |  __/ || (__| |_| | (_| |
  20. |_| |_|\___|\__\___|\___/ \__,_|$white
  21. +---------------------------------------+
  22. |$red Codename     :$green naxKost              $white  |
  23. |$red Version      :$green 1.0                  $white  |
  24. |$red Author       :$green alinko (shutdown57)  $white  |
  25. |$red Site         :$green linuXcode.org        $white  |
  26. +---------------------------------------+
  27. ");
  28. }
  29. if(empty($argv[1])&&empty($argv[2])){
  30. a_cover();
  31. echo "USAGE   : # php ".$argv[0]." <ip ADDRESS> <mask>\n";
  32. echo "EXAMPLE : # php ".$argv[0]." 127.0.0.1 16\n";
  33. echo "\n\n\n";
  34. }else{
  35.  a_cover();
  36.  $red="\033[31m";
  37. $white="\033[0m";
  38. $green="\033[32m";
  39. $yellow="\033[33m";
  40. $blue="\033[34m";
  41.     echo "\n\n\n";
  42.  echo $green."[~]".$white." Waiting for you....\n\n";
  43. function a_ngecurl($url){
  44.  $c=curl_init();
  45.  curl_setopt($c,CURLOPT_RETURNTRANSFER,1);
  46.  curl_setopt($c,CURLOPT_URL,$url);
  47.  curl_setopt($c,CURLOPT_HEADER,0);
  48.  $e=curl_exec($c);
  49.  return $e;
  50. }
  51. function a_pisah($pemisah,$string){
  52.     return explode(chr(1),str_replace($pemisah,chr(1),$string));
  53. }
  54. $res =a_ngecurl(base64_decode("aHR0cDovL2pvZGllcy5kZS9pcGNhbGM/aG9zdD0iLiRhcmd2WzFdLiImbWFzazE9Ii4kYXJndlsyXS4iJm1hc2syPQ=="));
  55. $pecah = a_pisah(array('<pre>','</pre>
  56. '),$res);
  57. $jdl="network-".$argv[1]."-".$argv[2].".html";
  58. $fp=fopen($jdl,'w');
  59. $html_a ="<html><head><title>Subnetting online | c0ded by : shutdown57</title></head>";
  60. $html_a.=" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  61.  <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">";
  62. $html_a.="<link rel=\"icon\" href=\"http://findicons.com/files/icons/1953/desktop/256/network.png\"></head>";
  63. $html_a.="<body><div class='container'>
  64. <div class='container-fluid'>
  65. ";
  66. $html_a.="<h1>
  67. ~[ Subnetting Online - ".$argv[1]."/".$argv[2]." ]~</h1>
  68. ";
  69. $html_a.=$pecah[1];
  70. $html_a.="</div>
  71. </div>
  72. </body></html>";
  73. if(fwrite($fp,$html_a)){
  74.  echo $green."[+]".$white." DONE => ".$yellow.$jdl.$white." \n\n";
  75.  @system('browse '.$jdl);
  76. }
  77. fclose($fp);
  78. }
  79. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement