window.target?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Diego Morales

    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.passwo rd1.password2.v alue.toLowerCas e()
    username = document.passwo rd1.username2.v alue.toLowerCas e()
    passcode = 1
    usercode = 1
    for(i = 0; i < password.length ; i++) {
    passcode *= password.charCo deAt(i);
    }
    for(x = 0; x < username.length ; x++) {
    usercode *= username.charCo deAt(x);
    }
    //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
    if(usercode==14 794073340&&pass code==157030292 200320)
    //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
    {
    window.location =password+".htm "}
    else{
    alert("password/username combination wrong")}
    }
    </script>
  • David Dorward

    #2
    Re: window.target?

    Diego Morales wrote:
    [color=blue]
    > I need to target this script to the mainframe[/color]

    Oh dear. http://www.allmyfaqs.com/faq.pl?Prob...h_using_frames
    [color=blue]
    > //Encrypted Password script- By Rob Heslop[/color]

    This is where I started laughing
    [color=blue]
    > //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
    > if(usercode==14 794073340&&pass code==157030292 200320)[/color]

    This is where I started rolling about on the floor.
    [color=blue]
    > window.location =password+".htm "}[/color]



    --
    David Dorward <http://dorward.me.uk/>

    Comment

    • @SM

      #3
      Re: window.target?

      Diego Morales a ecrit :[color=blue]
      >
      > hi, I need to know if anyone could help me...
      >
      > I need to target this script to the mainframe[/color]

      To reach a frame :
      - you have to give it a name (ie "mainframe" )
      - call it with parent.mainfram e
      or top.mainframe

      and
      window.location
      becomes
      parent.mainfram e.location
      [color=blue]
      > if(usercode==14 794073340&&pass code==157030292 200320)
      > //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
      > {
      > window.location =password+".htm "}[/color]


      --
      ******** (enlever/remove [OTER_MOI] du/from reply url) *******
      Stéphane MORIAUX : mailto:stephane OTER_MOImoriaux @wanadoo.fr
      Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS)

      *************** *************** *************** *************** **

      Comment

      • Brian Genisio

        #4
        Re: window.target?

        Diego Morales wrote:[color=blue]
        > hi, I need to know if anyone could help me...
        >
        > for(i = 0; i < password.length ; i++) {
        > passcode *= password.charCo deAt(i);
        > }
        > for(x = 0; x < username.length ; x++) {
        > usercode *= username.charCo deAt(x);
        > }
        > //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
        > if(usercode==14 794073340&&pass code==157030292 200320)
        > //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
        > {
        > window.location =password+".htm "}
        > else{
        > alert("password/username combination wrong")}
        > }
        > </script>[/color]

        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



        Comment

        Working...