Javascript injection

Discussion in 'JavaScript' started by xhcsurge, Dec 22, 2009.

  1. #1
    hello,

    i have a problem and i have no idea how to solve it.

    In Chrome, the login page on my schools educational online platform doesn't remember the login info. So i made a bookmark with this javascript injection, that fills in the info, and focusses on the 'aanmelden' button (='login' in dutch), so that i only have to press enter to continue.

    This is the website:

    http://toledo.katho.be
    Code (markup):
    Here's the javascript injection:

    javascript: document.getElementById('username').value='23889493984';document.getElementById('password').value='442384985';return false;document.getElementById('login').focus();
    Code (markup):
    This works fine but i'd like to make it happen faster. I wish i could let the script be activated instantly when the page loads, so i only have to press enter, or if possible, let the script click the login button itself.

    I'd be very thankfully if one of you guys could help me out :)

    thanks
     
    xhcsurge, Dec 22, 2009 IP
  2. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #2
    why dont u use the login form in html and use body onload document submit function :p
     
    chandan123, Dec 22, 2009 IP
  3. xhcsurge

    xhcsurge Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    There's no way i can do that. I have no control over the site. It's not my site, i can only use it. The only piece of code i can use is a javascript injection..
     
    xhcsurge, Dec 22, 2009 IP
  4. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #4
    save this to one html and use that html that solve that autologin
     
    chandan123, Dec 22, 2009 IP
  5. xhcsurge

    xhcsurge Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    omg that did it!!! :eek:

    thank you so much!

    there's only 1 problem left: When im allready logged in, it tells me the session has expired ('sessie vervallen' in dutch), and i have to How could i solve that?
     
    xhcsurge, Dec 23, 2009 IP
  6. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #6
    just re open that html file :D ;)

    problem is u can't track/close sessions using javascript or from your side that will be from that server
     
    Last edited: Dec 23, 2009
    chandan123, Dec 23, 2009 IP
  7. xhcsurge

    xhcsurge Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i dont understand :(

    i think its better to just check if im logged in, and if not, open the html file, instead of logging out and in again and again
     
    xhcsurge, Dec 23, 2009 IP
  8. xhcsurge

    xhcsurge Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    so heres whats has to be done:

    - if i'm allready logged in, i just have to visit http://toledo.katho.be

    - if i'm not logged in yet, the html file has to be opened.


    But where do i put the code that checks for this?
     
    xhcsurge, Dec 23, 2009 IP