mIRC Homepage
Posted By: Lpfix5 SOCKET help - 12/05/07 07:12 PM
Is it possible and how can you send a socket to web address http://www.example.com/viewforum.php?=XXXX and see if the forum does exist or not?

The text in question would be

"The forum you selected does not exist."

and loop from 1 to maximum socket opening at once weather it be 1 to 10000 or timer in between.

so again im trying to open a forum and see if it exist and hoping it to display a return like this

XXXX returned true
XXXX returned false
XXXX returned false

Where XXX is the forum address from 1 to 20000 but of course i dont need 20000 to be looped i just need to know how can I relay the info back to me if its true or not and loop my sockets without congesting the DNS.

Any feedback would help theres tons of forums out there im just wondering because accidentaly I went into one forum iv isit frequently i manually typed it out and i put in one wrong digit and found a hidden forum

Id like a MIRC script to check if possible instead of manually going from 1 to 20000
Posted By: Lpfix5 Re: SOCKET help - 12/05/07 07:40 PM
Originally Posted By: Lpfix5
Is it possible and how can you send a socket to web address http://www.example.com/viewforum.php?=XXXX and see if the forum does exist or not?

The text in question would be

"The forum you selected does not exist."

and loop from 1 to maximum socket opening at once weather it be 1 to 10000 or timer in between.

so again im trying to open a forum and see if it exist and hoping it to display a return like this

XXXX returned true
XXXX returned false
XXXX returned false

Where XXX is the forum address from 1 to 20000 but of course i dont need 20000 to be looped i just need to know how can I relay the info back to me if its true or not and loop my sockets without congesting the DNS.

Any feedback would help theres tons of forums out there im just wondering because accidentaly I went into one forum iv isit frequently i manually typed it out and i put in one wrong digit and found a hidden forum

Id like a MIRC script to check if possible instead of manually going from 1 to 20000


When i write the sockopen script and send the data I get Server Error 400 Bad request.

Code:

ALIAS forumscan {
  if ($sock(forumscan)) { sockclose forumscan }
  sockopen forumscan www.example.com 80
}

ON *:SOCKOPEN:forumscan: {
  %forumcount = 1
  if ($sockerr) { echo -a no connection... | return }
  sockwrite -n $sockname GET /discuss/viewforum.php?f= $+ %forumcount HTTP/1.1
  sockwrite -n $sockname $crlf
}

ON *:SOCKREAD:forumscan: {
  sockread %t
  echo -a > %t
}
 


Im using example in here that link is not valid but with that exact code i use my site the only thing i changed here was www.example.com from my original site.

I keep getting erorr 400 is the HTTP/1.1 a bad call?
Posted By: The_JD Re: SOCKET help - 13/05/07 05:52 AM
Originally Posted By: Lpfix5
ON *:SOCKOPEN:forumscan: {
%forumcount = 1
if ($sockerr) { echo -a no connection... | return }
sockwrite -n $sockname GET /discuss/viewforum.php?f= $+ %forumcount HTTP/1.1
sockwrite -n $sockname $crlf
}


Seems like you may have forgotten the HOST (required) - This is because many websites share IP addresses.

Code:
ON 1:SOCKOPEN:forumscan:{
  %forumcount = 1
  if ($sockerr) { echo -a no connection... | return }
  else sockwrite -t $sockname $+(GET /discuss/viewforum.php?f= $+ %forumcount HTTP/1.0,$crlf,Host: www.example.com,$crlf,$crlf)
}
Posted By: Lpfix5 Re: SOCKET help - 13/05/07 06:42 AM
Originally Posted By: The_JD
Originally Posted By: Lpfix5
ON *:SOCKOPEN:forumscan: {
%forumcount = 1
if ($sockerr) { echo -a no connection... | return }
sockwrite -n $sockname GET /discuss/viewforum.php?f= $+ %forumcount HTTP/1.1
sockwrite -n $sockname $crlf
}


Seems like you may have forgotten the HOST (required) - This is because many websites share IP addresses.

Code:
ON 1:SOCKOPEN:forumscan:{
  %forumcount = 1
  if ($sockerr) { echo -a no connection... | return }
  else sockwrite -t $sockname $+(GET /discuss/viewforum.php?f= $+ %forumcount HTTP/1.0,$crlf,Host: www.example.com,$crlf,$crlf)
}


Actually the host was fine this is how I cheated out of making the script the long way I know theres a shorter way

Code:
 
ALIAS forumscan {
  %lsc = 0
  if ($sock(forumscan)) { sockclose forumscan }
  sockopen forumscan www.whateversite.com 80
  .timer 1 2 //forumcheck
  .timer 1 3 //forumscan
}

ON *:SOCKOPEN:forumscan: {
  %forumcount = %forumcount + 1
  if ($sockerr) { echo -a no connection... | return }
  sockwrite -tn $sockname GET $+(/discuss/viewforum.php?f=,%forumcount) HTTP/1.0
  sockwrite -tn $sockname $crlf
}

ON *:SOCKREAD:forumscan: {
  sockread %t
  inc %lsc
}

ALIAS forumcheck {
  if (%lsc < 500) { echo -a SOCKET %forumcount is 4,1FALSE }
  if (%lsc > 501) { echo -a SOCKET %forumcount is 8,1TRUE }
}

© mIRC Discussion Forums