Aes
// ==UserScript==
// @name Aes
// @namespace http://tampermonkey.net/
// @version 0.1
// @description hookaes算法测试
// @author 星
// @match https://*/*
// @match http://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
if( window.CryptoJS != undefined){
var CryptoJS = window.CryptoJS;
if(CryptoJS.AES != undefined ){
window.CryptoJS.AES.encrypt = function(){
console.log('Aes算法')
let password = CryptoJS.enc.Utf8.stringify(arguments[0]);
let key = CryptoJS.enc.Utf8.stringify(arguments[1]);
let iv = CryptoJS.enc.Utf8.stringify(arguments[2]['iv']);
console.log('Aes算法参数如下:');
console.log('password:'+password);
console.log('key:'+key);
console.log('iv:'+iv);
var encrypted = CryptoJS.AES.encrypt(password, key, {
iv: iv,
mode: CryptoJS.mode.CBC
});
console.log(encrypted)
}
}
}else{
console.log('error');
}
})();