Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/bin/ drwxr-xr-x |
Viewing file: Select action/file-type: #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; #!./perl # $Id: piconv,v 2.1 2004/10/06 05:07:20 dankogai Exp $ # use 5.8.0; use strict; use Encode ; use Encode::Alias; my %Scheme = map {$_ => 1} qw(from_to decode_encode perlio); use File::Basename; my $name = basename($0); use Getopt::Long qw(:config no_ignore_case); my %Opt; help() unless GetOptions(\%Opt, 'from|f=s', 'to|t=s', 'list|l', 'string|s=s', 'check|C=i', 'c', 'perlqq|p', 'debug|D', 'scheme|S=s', 'resolve|r=s', 'help', ); $Opt{help} and help(); $Opt{list} and list_encodings(); my $locale = $ENV{LC_CTYPE} || $ENV{LC_ALL} || $ENV{LANG}; defined $Opt{resolve} and resolve_encoding($Opt{resolve}); $Opt{from} || $Opt{to} || help(); my $from = $Opt{from} || $locale or help("from_encoding unspecified"); my $to = $Opt{to} || $locale or help("to_encoding unspecified"); $Opt{string} and Encode::from_to($Opt{string}, $from, $to) and print $Opt{string} and exit; my $scheme = exists $Scheme{$Opt{Scheme}} ? $Opt{Scheme} : 'from_to'; $Opt{check} ||= $Opt{c}; $Opt{perlqq} and $Opt{check} = Encode::FB_PERLQQ; if ($Opt{debug}){ my $cfrom = Encode->getEncoding($from)->name; my $cto = Encode->getEncoding($to)->name; print <<"EOT"; Scheme: $scheme From: $from => $cfrom To: $to => $cto EOT } # we do not use <> (or ARGV) for the sake of binmode() @ARGV or push @ARGV, \*STDIN; unless ($scheme eq 'perlio'){ binmode STDOUT; for my $argv (@ARGV){ my $ifh = ref $argv ? $argv : undef; $ifh or open $ifh, "<", $argv or next; binmode $ifh; if ($scheme eq 'from_to'){ # default while(<$ifh>){ Encode::from_to($_, $from, $to, $Opt{check}); print; } }elsif ($scheme eq 'decode_encode'){ # step-by-step while(<$ifh>){ my $decoded = decode($from, $_, $Opt{check}); my $encoded = encode($to, $decoded); print $encoded; } } else { # won't reach die "$name: unknown scheme: $scheme"; } } }else{ # NI-S favorite binmode STDOUT => "raw:encoding($to)"; for my $argv (@ARGV){ my $ifh = ref $argv ? $argv : undef; $ifh or open $ifh, "<", $argv or next; binmode $ifh => "raw:encoding($from)"; print while(<$ifh>); } } sub list_encodings{ print join("\n", Encode->encodings(":all")), "\n"; exit 0; } sub resolve_encoding { if (my $alias = Encode::resolve_alias($_[0])) { print $alias, "\n"; exit 0; } else { warn "$name: $_[0] is not known to Encode\n"; exit 1; } } sub help{ my $message = shift; $message and print STDERR "$name error: $message\n"; print STDERR <<"EOT"; $name [-f from_encoding] [-t to_encoding] [-s string] [files...] $name -l $name -r encoding_alias -l,--list lists all available encodings -r,--resolve encoding_alias resolve encoding to its (Encode) canonical name -f,--from from_encoding when omitted, the current locale will be used -t,--to to_encoding when omitted, the current locale will be used -s,--string string "string" will be the input instead of STDIN or files The following are mainly of interest to Encode hackers: -D,--debug show debug information -C N | -c | -p check the validity of the input -S,--scheme scheme use the scheme for conversion EOT exit; } __END__ =head1 NAME piconv -- iconv(1), reinvented in perl =head1 SYNOPSIS piconv [-f from_encoding] [-t to_encoding] [-s string] [files...] piconv -l piconv [-C N|-c|-p] piconv -S scheme ... piconv -r encoding piconv -D ... piconv -h =head1 DESCRIPTION B |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0057 ]-- |