simpele-php-scrambler
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
echo '<form method="post">
<textarea cols="100" rows="25" name="txt">';
if(empty($_POST['txt'])){
echo '<?php echo \'hello world\'; ?>';
}else{
echo $_POST['txt'];
}
echo '</textarea><br>
<input type="submit" value="Scramble">
</form>';
if($_POST['txt']){
echo '<br><br><br>';
echo '<textarea cols="100" rows="25">';
$input = $_POST['txt'];
function createrand(){
$alp = array('48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '97', '98', '99', '100', '101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114', '115', '116', '117', '118', '119', '120', '121', '122');
shuffle($alp);
$encd = '';
foreach($alp as $value){
$encd .= chr($value);
}
return $encd;
}
$input1 = createrand();
$input2 = createrand();
echo '<?php
$_F=__FILE__;
$_X=\''.base64_encode('?>'.strtr($input, $input1, $input2).'<?php').'\';
eval(base64_decode(\''.base64_encode('$_X=base64_decode($_X);$_X=strtr($_X,\''.$input2.'\',\''.$input1.'\');$_R=ereg_replace(\'__FILE__\',"\'".$_F."\'",$_X);eval($_R);$_R=0;$_X=0;').'\'));
?>';
echo '</textarea>';
}
?>
echo '<form method="post">
<textarea cols="100" rows="25" name="txt">';
if(empty($_POST['txt'])){
echo '<?php echo \'hello world\'; ?>';
}else{
echo $_POST['txt'];
}
echo '</textarea><br>
<input type="submit" value="Scramble">
</form>';
if($_POST['txt']){
echo '<br><br><br>';
echo '<textarea cols="100" rows="25">';
$input = $_POST['txt'];
function createrand(){
$alp = array('48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '97', '98', '99', '100', '101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114', '115', '116', '117', '118', '119', '120', '121', '122');
shuffle($alp);
$encd = '';
foreach($alp as $value){
$encd .= chr($value);
}
return $encd;
}
$input1 = createrand();
$input2 = createrand();
echo '<?php
$_F=__FILE__;
$_X=\''.base64_encode('?>'.strtr($input, $input1, $input2).'<?php').'\';
eval(base64_decode(\''.base64_encode('$_X=base64_decode($_X);$_X=strtr($_X,\''.$input2.'\',\''.$input1.'\');$_R=ereg_replace(\'__FILE__\',"\'".$_F."\'",$_X);eval($_R);$_R=0;$_X=0;').'\'));
?>';
echo '</textarea>';
}
?>