!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)

/usr/local/webmail2/plugins/html_mail/htmlarea/contrib/   drwxr-xr-x
Free 318.33 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     lc_parse_strings.php (7.47 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
die("this script is disabled for security");

/**
  * LC-Parse-Strings-Script
  *
  * This script parses all xinhas source-files and creates base lang-files
  * in the lang-folders (one for base and one every plugin)
  *
  * How To use it: - remove the die() in line 2 (security)
  *                - make sure all lang-folders are writeable for your webserver
  *                - open the contrib/lc_parse_strings.php in your browser
  *                - lang/base.js will be written
  *                - open base.js, translate all strings into your language and save it
  *                  as yourlangauge.js
  *                - send the translated file to the xinha-team
 **/



error_reporting(E_ALL);

$ret = array();
$files getFiles("../""js$");
foreach(
$files as $file)
{
    
$fp fopen($file"r");
    
$data "";
    while(!
feof($fp)) {
        
$data .= fread($fp1024);
    }

    
preg_match_all('#_lc\("([^"]+)"\)|_lc\(\'([^\']+)\'\)#'$data$m);
    foreach(
$m[1] as $i) {
        if(
trim($i)=="") continue;
        
$ret[] = $i;
    }
    foreach(
$m[2] as $i) {
        if(
trim($i)=="") continue;
        
$ret[] = $i;
    }

    if(
eregi('htmlarea\\.js$'$file)) {
        
//toolbar-buttons
        //bold:          [ "Bold"
        
preg_match_all('#[a-z]+: *\[ * "([^"]+)"#'$data$m);
        foreach(
$m[1] as $i) {
            if(
trim($i)=="") continue;
            
$ret[] = $i;
        }

        
//HTMLArea._lc({key: 'button_bold', string
        
preg_match_all('#HTMLArea\\._lc\\({key: \'([^\']*)\'#'$data$m);
        foreach(
$m[1] as $i) {
            if(
trim($i)=="") continue;
            
$ret[] = $i;
        }

        
//config.fontname, fontsize and formatblock
        
$data substr($datastrpos($data"this.fontname = {"), strpos($data"this.customSelects = {};")-strpos($data"this.fontname = {"));
        
preg_match_all('#"([^"]+)"[ \t]*:[ \t]*["\'][^"\']*["\'],?#'$data$m);
        foreach(
$m[1] as $i) {
            if(
trim($i)=="") continue;
            
$ret[] = $i;
        }
    }
}

$files getFiles("../popups/""html$");
foreach(
$files as $file)
{
    if(
preg_match("#custom2.html$#"$file)) continue;
    if(
preg_match('#old_#'$file)) continue;
    
$ret array_merge($retparseHtmlFile($file));
}
$ret array_unique($ret);
$langData['HTMLArea'] = $ret;



$plugins getFiles("../plugins/");
foreach(
$plugins as $pluginDir)
{
    
$plugin substr($pluginDir12);
    if(
$plugin=="ibrowser") continue;
    
$ret = array();

    
$files getFiles("$pluginDir/""js$");
    
$files array_merge($filesgetFiles("$pluginDir/popups/""html$"));
    
$files array_merge($filesgetFiles("$pluginDir/""php$"));
    foreach(
$files as $file)
    {
        
$fp fopen($file"r");
        
$data "";
        if(
$fp) {
            echo 
"$file open...<br>";
            while(!
feof($fp)) {
              
$data .= fread($fp1024);
            }
            
preg_match_all('#_lc\("([^"]+)"|_lc\(\'([^\']+)\'#'$data$m);
            foreach(
$m[1] as $i) {
                if(
trim(strip_tags($i))=="") continue;
                
$ret[] = $i;
            }
            foreach(
$m[2] as $i) {
                if(
trim(strip_tags($i))=="") continue;
                
$ret[] = $i;
            }
        }
    }

    if(
$plugin=="TableOperations")
    {
        
preg_match_all('#options = \\[([^\\]]+)\\];#'$data$m);
        foreach(
$m[1] as $i) {
            
preg_match_all('#"([^"]+)"#'$i$m1);
            foreach(
$m1[1] as $i) {
                
$ret[] = $i;
            }
        }
        
        
//["cell-delete",        "td", "Delete cell"],
        
preg_match_all('#\\["[^"]+",[ \t]*"[^"]+",[ \t]*"([^"]+)"\\]#'$data$m);
        foreach(
$m[1] as $i) {
            
$ret[] = $i;
        }
    }


    
$files getFiles("$pluginDir/""html$");
    
$files array_merge($filesgetFiles("$pluginDir/""php$"));
    foreach(
$files as $file)
    {
        
$ret array_merge($retparseHtmlFile($file$plugin));
    }
    
    
$files getFiles("$pluginDir/popups/""html$");
    foreach(
$files as $file)
    {
        
$ret array_merge($retparseHtmlFile($file$plugin));
    }
    
$ret array_unique($ret);

    
$langData[$plugin] = $ret;
}

foreach(
$langData as $plugin=>$strings)
{
    if(
sizeof($strings)==0) continue;
    

    
$data "// I18N constants\n";
    
$data .= "//\n";
    
$data .= "//LANG: \"base\", ENCODING: UTF-8\n";
    
$data .= "//Author: Translator-Name, <email@example.com>\n";
    
$data .= "// FOR TRANSLATORS:\n";
    
$data .= "//\n";
    
$data .= "//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE\n";
    
$data .= "//      (at least a valid email address)\n";
    
$data .= "//\n";
    
$data .= "//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;\n";
    
$data .= "//      (if this is not possible, please include a comment\n";
    
$data .= "//       that states what encoding is necessary.)\n";
    
$data .= "\n";
    
$data .= "{\n";
    
sort($strings);
    foreach(
$strings as $string) {
        
$string str_replace(array('\\''"'), array('\\\\''\\"'), $string);
        
$data .= "  \"".$string."\": \"\",\n";
    }
    
$data substr($data0, -2);
    
$data .= "\n";
    
$data .= "}\n";

    if(
$plugin=="HTMLArea")
        
$file "../lang/base.js";
    else
        
$file "../plugins/$plugin/lang/base.js";
    
    
$fp fopen($file"w");
    if(!
$fp) continue;
    
fwrite($fp$data);
    
fclose($fp);
    echo 
"$file written...<br>";
}




function 
parseHtmlFile($file$plugin="")
{
    
$ret = array();
    
    
$fp fopen($file"r");
    if(!
$fp) {
        die(
"invalid fp");
    }
    
$data "";
    while(!
feof($fp)) {
        
$data .= fread($fp1024);
    }
    
    if(
$plugin=="FormOperations" || $plugin=="SuperClean" || $plugin=="Linker") {
        
//<l10n>-tags for inline-dialog or panel-dialog based dialogs
        
$elems = array("l10n");
    } else {
        
$elems = array("title""input""select""legend""span""option""td""button""div""label");
    }
    foreach(
$elems as $elem) {
        
preg_match_all("#<{$elem}[^>]*>([^<^\"]+)</$elem>#i"$data$m);
        foreach(
$m[1] as $i) {
            if(
trim(strip_tags($i))=="") continue;
            if(
$i=="/") continue;
            if(
$plugin=="ImageManager" && preg_match('#^--+$#'$i)) continue; //skip those ------
            
if($plugin=="CharacterMap" && preg_match('#&[a-z0-9]+;#i'trim($i)) || $i=="@") continue;
            if(
$plugin=="SpellChecker" && preg_match('#^\'\\.\\$[a-z]+\\.\'$#'$i)) continue;
            
$ret[] = trim($i);
        }
    }
    
    if(
$plugin=="FormOperations" || $plugin=="SuperClean" || $plugin=="Linker")
    {
        
//_( for inline-dialog or panel-dialog based dialogs
        
preg_match_all('#"_\(([^"]+)\)"#i'$data$m);
        foreach(
$m[1] as $i) {
            if(
trim($i)=="") continue;
            
$ret[] = $i;
        }
    }
    else
    {
        
preg_match_all('#title="([^"]+)"#i'$data$m);
        foreach(
$m[1] as $i) {
            if(
trim(strip_tags($i))=="") continue;
            if(
strip_tags($i)==" - ") continue; //skip those - (ImageManager)
            
$ret[] = $i;
        }
    }
    return(
$ret);
}


function 
getFiles($rootdirpath$eregi_match='') {
 
$array = array();
 if (
$dir = @opendir($rootdirpath)) {
   
$array = array();
   while ((
$file readdir($dir)) !== false) {
     if(
$file=="." || $file==".." || $file==".svn") continue;
      if(
$eregi_match=="")
        
$array[] = $rootdirpath."/".$file;
      else if(
eregi($eregi_match,$file))
        
$array[] = $rootdirpath."/".$file;
      
   }
   
closedir($dir);
 }
 return 
$array;
}





?>

:: 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.0058 ]--