Super Goo Addicted!
Number of posts : 571 Age : 49 Location : Tasmania Music Genre : Rap Registration date : 2007-02-16
| Subject: How to hide a password in javascript Mon Oct 04, 2010 8:39 pm | |
| "I want to do this in javascript, at this stage of the course. The best way to do this would be to access the database via javascript, and use md5 password encrytping. But if i do this in javascript, someone can read my database access username and password, allowing them free access to the content. Obviously php woud solve this problem, but..."
What if i was to hide the password in a blank swf flash file. Them just use the commend getvariable("username"), to return the password from this swf file. I have researched techniques, to 1, not allow this swf file to return the password if its not called from my domain, and 2, not allow this swf to return the password if its moved onto another domain. Then, when i ask for the password, a function generates a sequencing code, for getting the password from itself, based on the total char value of all the letters in my domain. This needs to be done incase someone tries to decompile my swf file back into the coding. Mostly this cant be done, but via a hex editor it can be done. If they alter the checking domain 1,2 paths via a hex editor, then the function wont return the correct password. And i need to hide the function, and make it hard to pick up by alogarithims. There is complicated methods, basically, reverse talking works, skip 3 words, back 7 words, then read the actual word. Place it in a sentance, and make the sentance not make sence. Fools a lot of decrypting methods. The function needs to be treated like this :
GenSequence = function (){ trace("return value"); } a="Gen"; b="Sequence"; this[a+b]();
They say no flash file is totally secure, the preventing from import option, can easily be changed by examining the hex file, or raw data. Since flash is made so it can be read from lots of programs, it is very standard.
Thats the best i can come with, since im not up to mysql yet.
Craig
Last edited by Super Goo on Wed Oct 06, 2010 1:34 am; edited 2 times in total | |
|
Super Goo Addicted!
Number of posts : 571 Age : 49 Location : Tasmania Music Genre : Rap Registration date : 2007-02-16
| Subject: ... Mon Oct 04, 2010 9:54 pm | |
| Also,
Discovered something interesting about using flash and javascript at the same time on a page. I decided to control a flash animation swf (layer), with setvariable, start, and stop. Called from a javascript function, basically, when pause is 10 it starts, and pause is 50 it stops. It is a good idea, because it becomes dependant on how fast your pc is running javascript.
Unfortunately, if u push flash too hard, all javascript set intervals and timeouts stop. And vice verse, if u push javascript set intervals and timeouts too hard, flash stops. This left me in a position where my javascript controlled flash animation, never stopped on a few pages where i had other animated content. I realized the pause had just stopped. But then i set a escape value in the flash file, just in case javascript stalls, and it sort of works like a clock. Taking the pressure off javascript, the pauses start again, and the element fades out.
Interestng i thought.
| |
|