本帖最后由 囧笨笨兔 于 2014-5-8 19:47 编辑
class BankAction extends CommonAction
{
public $bank_key = "c2d0e1l1z0o1n1e";
public function __construct( )
{
$FN_-2147483647( );
$this->table = "bank";
$this->model = $this->CreateModel( $this->table );
$this->checkCompact( );
}
private function makekey( $keys, $index = FALSE )
{
if ( !$index )
{
$keyslen = strlen( $keys );
$randindex = rand( 1, $keyslen - 1 );
return array(
"index" => $randindex,
"key" => $keys[$randindex]
);
}
return $keys[$index];
}
private function encode( $text, $keystr )
{
$tmpstr = "";
$i = 0;
for ( ; $i < strlen( $text ); ++$i )
{
$keys = $this->makekey( $keystr );
$key = $keys['key'];
$index = $keys['index'];
$char = $text[$i];
$tmpord = ord( $char ) ^ ord( $key );
$tmpstr .= $tmpord.".".$index."|";
}
return base64_encode( $tmpstr );
}
private function decode( $text, $keystr )
{
$tmpstrs = explode( "|", base64_decode( $text ) );
$ret = "";
$i = 0;
for ( ; $i < count( $tmpstrs ); ++$i )
{
if ( $tmpstrs[$i] != "" )
{
$tmpkeys = explode( ".", $tmpstrs[$i] );
list( $str, $index ) = $tmpkeys;
$key = $this->makekey( $keystr, $index );
$ret .= chr( $str ^ ord( $key ) );
}
}
$ret = str_replace( "()", "()", $ret );
return $ret;
}
这段就是源代码了!是怎么解密的呢?
密文
好的 这是一一个
MTMxLjE0fDE3My4xfDE2MS41fDIxMi43fDE2NS45fDI1Mi44fDE1OS44fDI0OS4xNHwyMTIuMTJ8MjIyLjEzfDIxMC4xMnwyMzcuMTR8MTM2LjZ8MjE1LjEwfDIzOC4xMnwyMTcuMTF8MjM3LjE0fDE1OC4xfDIxNC4xMXwxMzguM3wxMzAuNXwxMzYuMTB8MTUzLjV8MTkxLjExfDIxNC4xfDEzOS43fDIxMi4xMnwxMzkuMnwyMTYuMnwyMzcuMnwyMTIuMTN8MTkyLjEwfDIyMC4xNHwyMTQuMTF8MjUwLjEyfDEzMS41fDE1OC44fDEzOS4xM3wxOTQuNHwxMzcuNnwxNjIuNXwxNz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