os check webservers

By www- on Apr 22, 2005

script to check the operation system and serverversion from webservers
/load -rs scriptdir/os.mrc to load it , first snippet ,hope u will enjoy it.
There will be scripters that can do this better but like i said im a newbie in mirc scripting. have fun. commands: /oscheck hosthere (without www or http)
free to use but but dont change it and leave the credits

;created by www-
;free to use but dont change the code
;and leave the credits

alias oscheck { 
  var %server $1 
  var %port 80 
  sockopen oscheck %server %port 
} 

on *:sockopen:oscheck: { 
  if ($sockerr) { 
    echo 5 -a error $sockname
  } 
  else { 
    sockwrite -n $sockname GET / HTTP/1.0
    sockwrite -n $sockname User-Agent: Mozilla
    sockwrite -n $sockname Host: %server $+ $crlf $+ $crlf 
    haltdef
  } 
}
on *:sockread:oscheck: { 
  set %t 1
  if ($sockerr) {
    echo 5 -a error $sockname
    halt
  } 
  else {
    while (%t < 10) {
      var %tmp 
      sockread %tmp 
      if (*erver* iswm %tmp) || (*ate* iswm %tmp) {
        echo -a %tmp
      }
      inc %t
    }
    sockclose $sockname
  }
}

Comments

Sign in to comment.
www-   -  Apr 23, 2005

respect

 Respond  
kankerhoer   -  Apr 22, 2005

nice scrippy (:

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.