EG Information

Main Index
EG Manual
Disclaimer
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff

Training Missions

Read Me First New
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Programming
Patching
Steganography
Deface This Wall
/dev/null
/dev/urandom

Knowledge Bank

Discussion Forums
Enigma Chat New
RSS Feeds RSS
Articles / Tutorials
Videos
Online EG MP3 Player Radio
Enigma Zine
Downloads
Tools New

Code Resources

Submit Code
Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

Hakipedia: An open collaborative for all your information security needs.

The Urinal

Click Here To Vote For EG!

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site.

enigma group

enigma group

enigma group

enigma group

Enigma Group's Code Bank


[PHP] Live-Site v1.0

By: blink_212  -  Date Submitted: 2009-12-20 15:31:37

  1. <?php
  2.  
  3. /**
  4.  * Same-Server v1.0
  5.  *
  6.  * Script for testing a large list
  7.  * of website sites retrieved from
  8.  * a reverse IP domain check. This
  9.  * is useful for when you want access
  10.  * to a specific server and discover
  11.  * the server is hosting alot of other
  12.  * sites on the server.
  13.  *
  14.  * Here is a short list of reverse
  15.  * IP domain checkers :-
  16.  *
  17.  * yougetsignal.com
  18.  * myipneighbors.com
  19.  * ip-domain.com.cn
  20.  * domaintools.com
  21.  *
  22.  * Simply do the check, and copy-paste
  23.  * all of the results into a text file
  24.  * and put the name of the file in the
  25.  * same dir. Dont for get to name the
  26.  * text file accordingly in the
  27.  * settings.
  28.  *
  29.  * The results are saved in
  30.  * '127.0.0.1-live.html'. Where the IP
  31.  * address is the IP of the target
  32.  * specified. The file is overwritten,
  33.  * each time.
  34.  *
  35.  * Coded by blink_212
  36.  *
  37.  * ~ Enjoy!
  38.  */
  39.  
  40. $list = "list.txt"; // List of websites from reverse IP domain check.
  41. $target = "72.167.183.31"; // Server you want to test against. Best to use IP address.
  42.  
  43.  
  44. $save = fopen("$target-live.html","w");
  45. fwrite($save, "<html><head><title>$target Active-Domain Results ~ Coded by zeN</title></head><body>");
  46. fclose($save);
  47.  
  48. $urls = file($list);
  49. $count = count($urls);
  50. echo "n[+] Checking [$count] domains on [$target]...n";
  51. foreach($urls as $site){
  52.  
  53. $site = substr_replace($site,"",-2);
  54.  
  55. if($site != ""){
  56. if( (GetIP($site) == $target) ){
  57. if(CheckHost($site)){
  58. echo "[+] [$site] is active!n";
  59. @$i++;
  60. SaveSite($site);
  61. } else {
  62. echo "[-] [$site] is down!n";
  63. }
  64.  
  65. } else {
  66. echo "[-] [$site] isn't on the server!n";
  67. }
  68. }
  69. }
  70.  
  71. echo "n[+] Finished! [$i / $count] hosts active!nn";
  72.  
  73. $save = fopen("$target-live.html","a");
  74. fwrite($save, "</body></html>");
  75. fclose($save);
  76.  
  77.  
  78. function GetIP($host){
  79. $ip = gethostbyname($host);
  80. return $ip;
  81. }
  82.  
  83. function CheckHost($host)
  84. {
  85. $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
  86. $sCon = socket_connect($sock, $host, 80);
  87.  
  88. if(!$sCon){
  89. $ret = false;
  90. } else {
  91. $ret = true;
  92. }
  93. @socket_close($sCon);
  94. return $ret;
  95. }
  96.  
  97. function SaveSite($host)
  98. {
  99. global $target;
  100. $log = ' <a href="http://'.$host.'">'.$host.'</a><br />'."n";
  101. $save = fopen("$target-live.html","a");
  102. fwrite($save, $log);
  103. fclose($save);
  104. }
  105.  
  106. ?>
Return to php category list

Who's Online

487 Guests, 99 Users
ckryptix, Diznablo, Nicid1, Ios, viper0i0, rabbidmind, Nasrudin, CollapsingWalls, mehtaparag, bitstrike, jnony, C, Nusquam-Redono-Sapientia, bazcrown, saifulfaizan, The End, Ultraminor, psychomarine, st3alth, themastersinner, pgmrlink, login, lionaneesh, ishkur88, mahraja, Mac, chekifr, gandalf88, Vap0r, t0ast, tantrum6226, BnE, Distorted, Psiber_Syn, Ausome1, invas10n, oldgoat, freedaysbecumei, BinaryShinigami, Rex_Mundi, Red_beard, Strobeflux, s0m3nak3dguy, Descent, teehee, machupicchu, Genetix, Anandarl, NotMyOwn, thegamerdude, Godzila, popo12341234, RedEvolution, velocity_b, myne17, teto111, aVoid, Central-Gsm, 1101, JackalReborn, InjectioN, h4lted, c0re, DisPater, markt4death, splatta, Jackowacko, saint556, Pyron2312, Azerion, howsens, white.hat.gone.bad, vazzilly, pwunkz, Inverted, QuarterCask, Infernoe11, deskata, cr4ck3rj4ck, Blizer, jasonmax, j0sh, gwenwavor, N4g4c3N, spizeyboy, Network X, Uino59, Jae Cee, ianFDK, saykov, medhaavee, zofy, demonkiller410, Stumble, SaMTHG, kishore, Raze, helasraizam, Venom1019