!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/share/texmf/scripts/context/perl/   drwxr-xr-x
Free 3.45 GB of 27.03 GB (12.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     mptopdf.pl (3.5 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
        if 0;

# MikTeX users can set environment variable TEXSYSTEM to "miktex".

#D \module
#D   [       file=mptopdf.pl,
#D        version=2000.05.29,
#D          title=converting MP to PDF,
#D       subtitle=\MPTOPDF,
#D         author=Hans Hagen,
#D           date=\currentdate,
#D            url=www.pragma-ade.nl,
#D      copyright={PRAGMA ADE / Hans Hagen \& Ton Otten}]
#C
#C This module is part of the \CONTEXT\ macro||package and is
#C therefore copyrighted by \PRAGMA. See licen-en.pdf for
#C details.

# use File::Copy ; # not in every perl

use Config ;
use Getopt::Long ;
use strict ;

$Getopt::Long::passthrough = 1 ; # no error message
$Getopt::Long::autoabbrev  = 1 ; # partial switch accepted

my $Help = my $Latex = my $RawMP = 0 ;
my $PassOn = '' ;

&GetOptions
  ( "help"   => \$Help  ,
    "rawmp"  => \$RawMP,
    "passon" => \$PassOn,
    "latex"  => \$Latex ) ;

my $program = "MPtoPDF 1.3" ;
my $pattern = $ARGV[0] ;
my $done    = 0 ;
my $report  = '' ;
my $texlatexswitch = " --tex=latex --format=latex " ;
my $mplatexswitch = " --tex=latex " ;

my $dosish      = ($Config{'osname'} =~ /^(ms)?dos|^os\/2|^(ms|cyg)win/i) ;
my $miktex      = ($ENV{"TEXSYSTEM"} =~ /miktex/io);
my $escapeshell = ( ($ENV{'SHELL'}) && ($ENV{'SHELL'} =~ m/sh/i ));

my @files ;
my $command = my $mpbin = ''  ;

sub CopyFile # agressive copy, works for open files like in gs
  { my ($From,$To) = @_ ;
    return unless open(INP,"<$From") ; binmode INP ;
    return unless open(OUT,">$To") ; binmode OUT ;
    while (<INP>) { print OUT $_ }
    close (INP) ;
    close (OUT) }

if (($pattern eq '')||($Help))
  { print "\n$program : provide MP output file (or pattern)\n" ;
    exit }
elsif ($pattern =~ /\.mp$/io)
  { shift @ARGV ; my $rest = join(" ", @ARGV) ;
    if (open(INP,$pattern))
      { while (<INP>)
          { if (/(documentstyle|documentclass|begin\{document\})/io)
              { $Latex = 1 ; last } }
        close (INP) }
    if ($RawMP)
      { if ($Latex)
          { $rest .= " $mplatexswitch" }
        $mpbin = 'mpost' }
    else
      { if ($Latex)
          { $rest .= " $texlatexswitch" }
        $mpbin = 'texexec --mptex $PassOn' }
    my $error =  system ("$mpbin $rest $pattern") ;
    if ($error)
      { print "\n$program : error while processing mp file\n" ; exit }
    else
     { $pattern =~ s/\.mp$//io ;
        @files = glob "$pattern.*" } }
elsif (-e $pattern)
  { @files = ($pattern) }
elsif ($pattern =~ /.\../o)
  { @files = glob "$pattern" }
else
  { $pattern .= '.*' ;
    @files = glob "$pattern" }

foreach my $file (@files)
  { $_ = $file ;
    if (s/\.(\d+|mps)$// && -e $file)
      { if ($miktex)
          { if ($dosish)
              { $command = "pdfetex   &mptopdf" }
            else
              { $command = "pdfetex \\&mptopdf" } }
        else
          { if ($dosish)
              { $command = "pdfetex -progname=context &mptopdf" }
            else
              { $command = "pdfetex -progname=context \\&mptopdf" } }
        if ($dosish)
          { system ("$command   \\relax $file") }
        else
          { system ("$command \\\\relax $file") }
        rename ("$_.pdf", "$_-$1.pdf") ;
        if (-e "$_.pdf") { CopyFile ("$_.pdf", "$_-$1.pdf") }
        if ($done) { $report .= " +" }
        $report .= " $_-$1.pdf" ;
        ++$done } }

if ($report eq '')
  { $report = '*' }

if ($done)
  { print "\n$program : $pattern is converted to$report\n" }
else
  { print "\n$program : no filename matches $pattern\n" }

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0037 ]--