嘿,伙计们一直在用谷歌和stackoverflow在这个上努力......
我得到了用 php chr() 函数编码的 php 文件,这里有一些代码:
<?php require_once chr(65).chr(100).chr(109).chr(105).chr(110).chr(67).chr(111).chr(110).chr(116).chr(114).chr(111).chr(108).chr(108).chr(101).chr(114).chr(46).chr(112).chr(104).chr(112);class WP_Amazonimportproducts_ImportController extends WP_Amazonimportproducts_AdminController{protected function _isAllowed(){return Mage::getSingleton(chr(97).chr(100).chr(109).chr(105).chr(110).chr(47).chr(115).chr(101).chr(115).chr(115).chr(105).chr(111).chr(110))->{"isAllowed"}(chr(99).chr(97).chr(116).chr(97).chr(108).chr(111).chr(103).chr(47).chr(97).chr(109).chr(97).chr(122).chr(111).chr(110).chr(105).chr(109).chr(112).chr(111).chr(114).chr(116).chr(112).chr(114).chr(111).chr(100).chr(117).chr(99).chr(116).chr(115).chr(47).chr(105).chr(109).chr(112).chr(111).chr(114).chr(116));}protected function _initImport(){$this->{"_title"}($this->{"__"}(chr(67).chr(97).chr(116).chr(97).chr(108).chr(111).chr(103)))->{"_title"}($this->{"__"}(chr(87).chr(80).chr(58).chr(32).chr(65).chr(109).chr(97).chr(122).chr(111).chr(110).chr(32).chr(73).chr(109).chr(112).chr(111).chr(114).chr(116)))->{"_title"}($this->{"__"}(chr(73).chr(109).chr(112).chr(111).chr(114).chr(116).chr(32).chr(80).chr(114).chr(111).chr(100).chr(117).chr(99).chr(116).chr(115)));return $this;}protected function _initProduct(){$ =Mage::getModel(chr(99).chr(97).chr(116).chr(97).chr(108).chr(111).chr(103).chr(47).chr(112).chr(114).chr(111).chr(100).chr(117).chr(99).chr(116));$ =Mage::getSingleton(chr(97).chr(100).chr(109).chr(105).chr(110).chr(47).chr(115).chr(101).chr(115).chr(115).chr(105).chr(111).chr(110))->{"getImportSettings"}();if (isset ($ [chr(105).chr(109).chr(112).chr(111).chr(114).chr(116).chr(95).chr(112).chr(97).chr(114).chr(97).chr(109).chr(115)][chr(99).chr(97).chr(116).chr(101).chr(103).chr(111).chr(114).chr(121).chr(95).chr(105).chr(100).chr(115)])){$ ->{"setCategoryIds"}($ [chr(105).chr(109).chr(112).chr(111).chr(114).chr(116).chr(95).chr(112).chr(97).chr(114).chr(97).chr(109).chr(115)][chr(99).chr(97).chr(116).chr(101).chr(103).chr(111).chr(114).chr(121).chr(95).chr(105).chr(100).chr(115)]);
据我了解,我一直在尝试寻找解码器,您可以使用 ord() php 函数对其进行解码吗?我找到了一个将文本编码为 chr(65) 的脚本,如果可以将其反转以使其解码用 chr(111).chr(65) 编码的 php 脚本,那将是惊人的,我有几页需要解码和如果它可以跳过非 chr(65) 代码,我认为它会起作用的唯一方法是我可以粘贴整个页面并对其进行解码。你们有什么感想?我怎样才能解码它?
<html>
<head>
<title>Convert String To PHP ASCII in PHP chr() function</title>
</head>
<body>
<b>Convert String To PHP ASCII in PHP chr() function:</b><br /><br />
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<textarea name="s" rows="20" cols="100"></textarea>
<input type="submit">
</form>
<br />
<?php
$string = stripslashes($_GET['s']);
$chrstring = "";
for ($i=0; $i < strlen($string); $i++)
{
$chrstring .= "chr(" . ord(substr($string,$i,1)) . ")";
$chrstring .= ($i==strlen($string)-1)?"":".";
}
$toscreenstring = htmlentities($string);
echo "<b>Converted:</b><br />$toscreenstring<br /><b>To:</b><br />$chrstring<br /><br />-";
?>
</body>
</html>
编辑!我找到了一个具有类似功能的 php 脚本来解码这个东西,但它只适用于数字(没有 chr(number).chr(number) 并且需要让它跳过非 chr(number) 以便可以粘贴整个脚本,它将解码需要的内容。
<?php
$charset = array(
32 => ' ', 33 => '!', 34 => '"', 35 => '#', 36 => '$',
37 => '%', 38 => '&', 39 => "'", 40 => '(', 41 => ')',
42 => '*', 43 => '+', 44 => ',', 45 => '-', 46 => '.',
47 => '/', 48 => '0', 49 => '1', 50 => '2', 51 => '3',
52 => '4', 53 => '5', 54 => '6', 55 => '7', 56 => '8',
57 => '9', 58 => ':', 59 => ';', 60 => '<', 61 => '=',
62 => '>', 63 => '?', 64 => '@', 65 => 'A', 66 => 'B',
67 => 'C', 68 => 'D', 69 => 'E', 70 => 'F', 71 => 'G',
72 => 'H', 73 => 'I', 74 => 'J', 75 => 'K', 76 => 'L',
77 => 'M', 78 => 'N', 79 => 'O', 80 => 'P', 81 => 'Q',
82 => 'R', 83 => 'S', 84 => 'T', 85 => 'U', 86 => 'V',
87 => 'W', 88 => 'X', 89 => 'Y', 90 => 'Z', 91 => '[',
92 => '\\', 93 => ']', 94 => '^', 95 => '_', 96 => '`',
97 => 'a', 98 => 'b', 99 => 'c', 100 => 'd', 101 => 'e',
102 => 'f', 103 => 'g', 104 => 'h', 105 => 'i', 106 => 'j',
107 => 'k', 108 => 'l', 109 => 'm', 110 => 'n', 111 => 'o',
112 => 'p', 113 => 'q', 114 => 'r', 115 => 's', 116 => 't',
117 => 'u', 118 => 'v', 119 => 'w', 120 => 'x', 121 => 'y',
122 => 'z', 123 => '{', 124 => '|', 125 => '}'
);
function fromNumber($number)
{
$string = '';
while($number)
{
$value = substr($number, 0, 2);
$number = substr($number, 2);
if($value < 32)
{
$value .= substr($number, 0, 1);
$number = substr($number, 1);
}
$string .= $charset[ (int) $value];
}
return $string;
}
function fromString($string)
{
$number = '';
foreach(str_split($string) as $char) $number .= ord($char);
return $number;
}
$string = 'this is my test string to convert';
$number = fromString($string);
$string = fromNumber($number);
?>