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 /
Term-ANSIColor /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
aliases-func.t
2.72
KB
-r--r--r--
2014-12-27 11:49
basic.t
14.8
KB
-r--r--r--
2014-12-27 11:49
basic256.t
4.99
KB
-r--r--r--
2014-12-27 11:49
eval.t
1.23
KB
-r--r--r--
2014-12-27 11:49
stringify.t
1.55
KB
-r--r--r--
2014-12-27 11:49
taint.t
1.29
KB
-r--r--r--
2014-12-27 11:49
Save
Rename
#!/usr/bin/perl -T # # Check that Term::ANSIColor untaints generated constants. # # It's possible that the name of the constant function that we're calling # could be tained (such as by loading the name of the constant function from # an environment variable). Term::ANSIColor does the work to untaint it; be # sure that the taint flag is properly cleared. # # Copyright 2012 Russ Allbery <rra@stanford.edu> # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. use strict; use warnings; use Test::More tests => 4; # Load the module. BEGIN { delete $ENV{ANSI_COLORS_ALIASES}; delete $ENV{ANSI_COLORS_DISABLED}; use_ok('Term::ANSIColor', qw(:pushpop)); } # Generate a tainted constant name. PATH is always tainted, and tainting is # sticky, so we can prepend the name to whatever PATH holds and then chop it # off again. my $constant = substr 'BOLD' . $ENV{PATH}, 0, length 'BOLD'; # Using that as a constant should now work without any tainting problems. ## no critic (TestingAndDebugging::ProhibitNoStrict) { no strict 'refs'; is(&{$constant}(), "\e[1m", 'Constant subs are not tainted'); is(BOLD(), "\e[1m", '...and we can call the sub again'); ok(defined(&Term::ANSIColor::BOLD), '...and it is now defined'); }