469,903 Members | 1,573 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

window.target?

hi, I need to know if anyone could help me...

I need to target this script to the mainframe

<script>
//Encrypted Password script- By Rob Heslop
//Script featured on Dynamic Drive
//Visit http://www.dynamicdrive.com/dynamicindex9/password.htm

function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==14794073340&&passcode==15703029220032 0)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{
window.location=password+".htm"}
else{
alert("password/username combination wrong")}
}
</script>
Jul 20 '05 #1
3 4559
Diego Morales wrote:
I need to target this script to the mainframe
Oh dear. http://www.allmyfaqs.com/faq.pl?Prob...h_using_frames
//Encrypted Password script- By Rob Heslop
This is where I started laughing
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==14794073340&&passcode==15703029220032 0)
This is where I started rolling about on the floor.
window.location=password+".htm"}


http://jibbering.com/faq/#FAQ4_8

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2
@SM
Diego Morales a ecrit :

hi, I need to know if anyone could help me...

I need to target this script to the mainframe
To reach a frame :
- you have to give it a name (ie "mainframe")
- call it with parent.mainframe
or top.mainframe

and
window.location
becomes
parent.mainframe.location
if(usercode==14794073340&&passcode==15703029220032 0)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{
window.location=password+".htm"}

--
******** (enlever/remove [OTER_MOI] du/from reply url) *******
Stéphane MORIAUX : mailto:st*********************@wanadoo.fr
Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS)
http://perso.wanadoo.fr/stephane.moriaux/internet/
************************************************** ************
Jul 20 '05 #3
Diego Morales wrote:
hi, I need to know if anyone could help me...

for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==14794073340&&passcode==15703029220032 0)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{
window.location=password+".htm"}
else{
alert("password/username combination wrong")}
}
</script>


Be very, VERY careful with this. This "encryption" method is anything
but encryption. If you rely on this method for security, please,
please, please find a better solution... (such as server-side).

You see, I can look at the source code of your site, and read the
usercode and passcode values. With that, I can write a very small
program to crack the names. Heck, I can crack it by hand (using a
calculator) in about 3 minutes.

I stress.... BE VERY CAREFUL WITH THIS METHOD. IT WILL NOT KEEP
UNAUTHORIZED PEOPLE OUT.

Brian

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Marshall Dudley | last post: by
31 posts views Thread by Benno Bös | last post: by
32 posts views Thread by Eli | last post: by
2 posts views Thread by sjp | last post: by
33 posts views Thread by randau | last post: by
29 posts views Thread by wayne | last post: by
18 posts views Thread by len.hartley | last post: by
7 posts views Thread by anthony.turcotte | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.