Login   Register  
PHP Classes
elePHPant
Icontem

File: table_shift_2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Zubov Ilya  >  Solace script maze  >  table_shift_2.php  >  Download  
File: table_shift_2.php
Role: Application script
Content type: text/plain
Description: Protection procedure
Class: Solace script maze
PHP source code protection based only on PHP code
Author: By
Last change:
Date: 2004-07-06 00:46
Size: 1,104 bytes
 

Contents

Class file image Download
// #php version 4.1.0
// #Encoder
    $s = $this->php_implode($php_array);
    $p = rand(1, strlen($s));
    $s1 = substr($s, 0, $p);
    $s2 = substr($s, $p);
    $t1 = $this->table;

    do {
        $p1 = rand(1, 255);
        $t2 = substr($t1, $p1).substr($t1, 0, $p1);
        $es = strtr($s1, $t1, $t2);
    } while (!$this->safe_stream($es));
    $enc['enc_data1'] = $es;
    $enc['p1'] = $p1;

    do {
        $p2 = rand(1, 255);
        $t2 = substr($t1, $p2).substr($t1, 0, $p2);
        $es = strtr($s2, $t1, $t2);
    } while (!$this->safe_stream($es));
    $enc['enc_data2'] = $es;
    $enc['p2'] = $p2;


// #Decoder
<?php {MORPH_VARS}
    
ob_start();
?>{ENC_DATA1}<?php
    $s1 
ob_get_contents();
    
ob_clean();
?>{ENC_DATA2}<?php

function decod(&$s$k) {
    declare(
ticks=0);
    
$t1 $GLOBALS['V001'];
    
$t2 substr($t1$k).substr($t10$k);
    return 
strtr($s$t2$t1);
}

function 
run($s) {
    return eval(
$s);
}

    
$s2 ob_get_contents();
    
ob_end_clean();
    return 
run(decod($s1, {P1}).decod($s2, {P2}));
?>