mIRC Home    About    Download    Register    News    Help

Print Thread
SOCKET help #176648 12/05/07 07:12 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: SOCKET help [Re: Lpfix5] #176653 12/05/07 07:40 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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?


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: SOCKET help [Re: Lpfix5] #176685 13/05/07 05:52 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
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)
}

Last edited by The_JD; 13/05/07 05:55 AM.

[02:16] * Titanic has quit IRC (Excess Flood)
Re: SOCKET help [Re: The_JD] #176692 13/05/07 06:42 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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 }
}



Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }