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
}
}