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

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/home/jerryg/public_html/gallery2/lib/tools/po/   drwxr-xr-x
Free 318.37 GB of 458.09 GB (69.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     update-all-translations.pl (3.54 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
#
# Update all translations and create a report.
#
use strict;
use Cwd;
use Data::Dumper;
use Getopt::Long;
use Symbol;

my %OPTS;
$OPTS{'VERBOSE'} = 0;
$OPTS{'MAKE_BINARY'} = 0;
$OPTS{'PATTERN'} = '';
$OPTS{'DRY_RUN'} = 0;
$OPTS{'REMOVE_OBSOLETE'} = 0;
chomp(my $MAKE = `(which gmake || which make) 2>/dev/null`);
die "Missing make" unless $MAKE;

GetOptions('make-binary!' => \$OPTS{'MAKE_BINARY'},
       'pattern=s' => \$OPTS{'PATTERN'},
       'dry-run!' => \$OPTS{'DRY_RUN'},
       'verbose|v!' => \$OPTS{'VERBOSE'},
       'compendium!' => \$OPTS{'COMPENDIUM'},
       'remove-obsolete!' => \$OPTS{'REMOVE_OBSOLETE'},
       'po=s' => \$OPTS{'PO'},
       'permissions!' => \$OPTS{'PERMISSIONS'},
       'svn-add!' => \$OPTS{'SVN_ADD'});

my @failures = ();
my @warnings = ();
my $basedir = cwd();
$basedir =~ s{(/.*)/(lib|themes|modules|install|upgrade)/.*?$}{$1};

# Find po dirs in modules/* themes/* install upgrade
my @PO_DIRS = glob "$basedir/modules/*/po $basedir/themes/*/po $basedir/[iu][np][sg]*/po";
@PO_DIRS = grep(/$OPTS{PATTERN}/, @PO_DIRS) if $OPTS{'PATTERN'};
@PO_DIRS = grep($_ !~ m{modules/core/po$}, @PO_DIRS) if $OPTS{'COMPENDIUM'};

if ($OPTS{'PERMISSIONS'}) {
  my $poParam = $OPTS{'PO'} ? "$OPTS{PO}.po" : '*.po';
  foreach my $poDir (@PO_DIRS) {
    chmod(0755, $poDir);
    chdir $poDir;
    &my_system("chmod 644 $poParam 2> /dev/null");
  }
  print STDERR "Updated permissions for $poParam in " . scalar(@PO_DIRS) . " directories.\n";
  exit;
}

if ($OPTS{'SVN_ADD'}) {
  my $poParam = $OPTS{'PO'} ? "$OPTS{PO}.po" : '*.po';
  foreach my $poDir (@PO_DIRS) {
    my %svn = ();
    chdir $poDir;
    open(SVN, 'svn status --non-interactive |') or die;
    while (<SVN>) {
      m|^\?      (.*\.po)$| and $svn{$1} = 1;
    }
    close SVN;
    @_ = glob $poParam;
    chdir '..';
    foreach my $poFile (@_) {
      if (exists $svn{$poFile} and $poFile ne 'messages.po') {
    $_ = 'locale/' . substr($poFile, 0, -3);
    my_system("svn add po/$poFile" . (-d $_ ? " $_" : ''));
    -d $_ and
      my_system("svn propset svn:mime-type application/octet-stream $_/LC_MESSAGES/*.mo");
      }
    }
  }
  exit;
}

if ($OPTS{'MAKE_BINARY'}) {
  # Make all .mo files binary in SVN.
  chdir $basedir;
  my @MO_FILES =
    glob "modules/*/locale/*/*/*.mo themes/*/locale/*/*/*.mo [iu][np][sg]*/locale/*/*/*.mo";
  my_system("svn propset svn:mime-type application/octet-stream " . join(' ', @MO_FILES));
  exit;
}

my $TARGET = $OPTS{'REMOVE_OBSOLETE'} ? 'all-remove-obsolete' : 'all';
$TARGET = 'compendium' if $OPTS{'COMPENDIUM'};
foreach my $poDir (@PO_DIRS) {
  (my $printableDir = $poDir) =~ s|$basedir.||;
  print STDERR "$printableDir: ";
  unless ($OPTS{'DRY_RUN'}) {
    if (-f "$poDir/GNUmakefile") {
      chdir $poDir;
      my $poParam = '';
      if (!$OPTS{'PO'} || (-f "$OPTS{PO}.po" && ($poParam = 'PO=' . $OPTS{'PO'}))) {
    my_system("$MAKE $TARGET clean QUIET=1 NOCREATE=1 $poParam 2>&1")
      and print "FAIL!\n"
        and push(@failures, $poDir);
      } else {
    print "Missing $OPTS{PO}.po!\n";
    push(@warnings, $poDir);
      }
    } else {
      print "Missing GNUmakefile!\n";
      push(@warnings, $poDir);
    }
  }
}

sub my_system {
  my $cmd = shift;
  if ($OPTS{'VERBOSE'}) {
    print STDERR "System: $cmd\n";
  }
  system($cmd);
}

if (@warnings) {
  print "\n\n";
  print scalar(@warnings) . " warnings\n";
  foreach (@warnings) {
    print "\t$_\n";
  }
}
if (@failures) {
  print "\n\n";
  print scalar(@failures) . " failures\n";
  foreach (@failures) {
    print "\t$_\n";
  }
  exit 1;
}

sub out {
  my ($file, $indent, $msg) = @_;
  print $file " " x ($indent * 4) . $msg . "\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 #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0171 ]--