AES256 - Javascript - Imacros - Firefox

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
jujulips
Posts: 6
Joined: Tue May 13, 2014 1:47 pm

AES256 - Javascript - Imacros - Firefox

Post by jujulips » Thu Jun 12, 2014 9:53 am

Hi there !

I'm would need to decrypt a AES256 encrypt password for my new iMacros/javascript script.

I found this on google, and it looks promising:
http://crypto-js.googlecode.com

My problem is that I cannot call the function :

Code: Select all

src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js";
It returns following error :

Code: Select all

ReferenceError: CryptoJS is not defined, line 2 (Error code: -991)
Here's the whole code for testing

Code: Select all

src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js";
var encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase");
var decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase");
javascript:motcle=prompt(decrypted, "");
Any chance to bypass this issue ?

Thanks a lot for your help !
chivracq
Posts: 8791
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: AES256 - Javascript - Imacros - Firefox

Post by chivracq » Thu Jun 12, 2014 10:31 am

FCIM...! :mrgreen:

Any Follow up on your other Thread...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
jujulips
Posts: 6
Joined: Tue May 13, 2014 1:47 pm

Re: AES256 - Javascript - Imacros - Firefox

Post by jujulips » Thu Jun 12, 2014 12:06 pm

Heya ! Nop, did not find any solution for the registry topic ...
wanna talk about that off topic ?
skype fb ?
chivracq wrote:FCIM...! :mrgreen:

Any Follow up on your other Thread...?
jujulips
Posts: 6
Joined: Tue May 13, 2014 1:47 pm

Re: AES256 - Javascript - Imacros - Firefox

Post by jujulips » Thu Jun 12, 2014 12:08 pm

chivracq wrote:FCIM...! :mrgreen:

Any Follow up on your other Thread...?
FF29.0.1 + WIN8 + Last Imacros Version
chivracq
Posts: 8791
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: AES256 - Javascript - Imacros - Firefox

Post by chivracq » Thu Jun 12, 2014 2:51 pm

jujulips wrote:Heya ! Nop, did not find any solution for the registry topic ...
wanna talk about that off topic ?
skype fb ?
chivracq wrote:FCIM...! :mrgreen:

Any Follow up on your other Thread...?
I replied in the original Thread...
jujulips wrote:FF29.0.1 + WIN8 + Last Imacros Version
=iMacros v8.8.2 for FF. ("Latest Version" won't mean much in a few weeks/months...)

I don't really have an Answer for you as I don't really do any JavaScript, or I only use some Basic Standard Functionality with 'EVAL()' and 'URL GOTO', but I know there are several Threads on the Forum related to jQuerry and using some jQuerry Functions from iMacros, so that could give you a Lead...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
skippyto
Posts: 108
Joined: Wed Aug 20, 2008 8:14 am

Re: AES256 - Javascript - Imacros - Firefox

Post by skippyto » Fri Jun 13, 2014 7:00 am

Hi !

I don't understand what src should do in your code, are you using this code in a js file or in a html page ?

If you want to use something from aes.js you can add the following code before any call.

Code: Select all

if (window.XMLHttpRequest){
	// code for IE7+, Firefox, Chrome, Opera, Safari
	const XMLHttpRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttprequest;1");
	xmlhttp=new XMLHttpRequest();
}else{
	// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js", false);
xmlhttp.send();	
eval(xmlhttp.responseText);
Skippyto.
Post Reply