Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.

View this topic in a long page with up to 500 replies per page Watch this topic Create new topic
Prev1 | 2 


68 posts

Master Geek


  Reply # 661225 24-Jul-2012 19:40 Send private message quote this post

If anyone is interested here is the code that I have written so far https://docs.google.com/folder/d/0B5ghoqfnILgZd01HdlY3ZE1MVW8/edit .

It seems to trip up at the point where a request is made to the URL within the javascript returned after submitting the login form.

3750 posts

Uber Geek

Trusted
Subscriber

  Reply # 661236 24-Jul-2012 20:01 Send private message quote this post

I don't understand how javascript would be involved when you're doing server side scripting.




Asus eee pad transformer
iPod 2G
Windows 7 PC
Lots and lots of Nikon camera gear



68 posts

Master Geek


  Reply # 661242 24-Jul-2012 20:04 Send private message quote this post

timmmay: I don't understand how javascript would be involved when you're doing server side scripting.


Yes I think I am confused. Here is an example of what is returned after submitting the login form:

<html>
<head>
    <script type="text/javascript">
        function redirect()
        {
            window.location.replace("http://www.trademe.co.nz/Members/Login.aspx?url=%2fMyTradeMe%2fDefault.aspx&secure=&login_attempts=1&quick_register=&firstname=Liam&email=my_email%40gmail.com&auto_login=&captcha=&err=0&login_success=True&dbs_id=39A6D8A3-130E-4FFC-B725-08C23883208C&region_id=2&session=%7BE3135B5C-570F-4399-B264-10118DE1FE30%7D&shareOfVoice=1&api_confirm=&bid=4,1,3&adParams=g%3dM%26bd%3d627615648000000000%26sb%3d13");
        }
    </script>
</head>
<body onload="javascript:redirect();">
</body>
</html>

3750 posts

Uber Geek

Trusted
Subscriber

  Reply # 661261 24-Jul-2012 20:20 Send private message quote this post

Javascript is usually UI stuff, unless they're doing something tricky. A login should be a simple form post, it'll return a cookie, capture that and send it in with any future requests you make so it knows you who you are.

Do you have much web development experience?




Asus eee pad transformer
iPod 2G
Windows 7 PC
Lots and lots of Nikon camera gear



68 posts

Master Geek


  Reply # 661265 24-Jul-2012 20:23 Send private message quote this post

timmmay: Javascript is usually UI stuff, unless they're doing something tricky. A login should be a simple form post, it'll return a cookie, capture that and send it in with any future requests you make so it knows you who you are.

Do you have much web development experience?


Yes I do have web dev experience. I dunno I can't see that html doing anything other than redirecting...

3750 posts

Uber Geek

Trusted
Subscriber

  Reply # 661309 24-Jul-2012 20:56 Send private message quote this post

Is that's what's returned after you submit the login form manually, or with your software?

It looks like a simple redirect to me, telling your browser to open another URL.




Asus eee pad transformer
iPod 2G
Windows 7 PC
Lots and lots of Nikon camera gear



68 posts

Master Geek


  Reply # 661324 24-Jul-2012 21:19 Send private message quote this post

timmmay: Is that's what's returned after you submit the login form manually, or with your software?

It looks like a simple redirect to me, telling your browser to open another URL.


It is returned in both cases. However when using the browser after requesting the URL in that script I am redirected to the "My Trademe" page. In the code I just get redirected back to the login page.

3750 posts

Uber Geek

Trusted
Subscriber

  Reply # 661325 24-Jul-2012 21:23 Send private message quote this post

Did you use the firefox plugin I suggested to see if a cookie's being returned at the same time? I would bet it is, but I don't want to make it too easy for you ;) If you open that URL with your code you'll need to send the cookie as well.

This all guesswork, but I think it'll lead you in the right direction.




Asus eee pad transformer
iPod 2G
Windows 7 PC
Lots and lots of Nikon camera gear

1682 posts

Uber Geek

Trusted

  Reply # 662502 26-Jul-2012 16:59 Send private message quote this post

Would a browser App to post be considered svcraping , like JavaScript greasemonky script application.

1682 posts

Uber Geek

Trusted

  Reply # 662694 26-Jul-2012 23:18 Send private message quote this post

"http://www.trademe.co.nz/Members/Login.aspx?url=%2fMyTradeMe%2fDefault.aspx&secure=&login_attempts=1&quick_register=&firstname=Liam&email=my_email%40gmail.com&auto_login=&captcha=&err=0&login_success=True&dbs_id=39A6D8A3-130E-4FFC-B725-08C23883208C?ion_id=2&session=%7BE3135B5C-570F-4399-B264-10118DE1FE30%7D&shareOfVoice=1&api_confirm=&bid=4,1,3&adParams=g%3dM%26bd%3d627615648000000000%26sb%3d13")


The JavaScript is attracted to clicking of login form, The redirection could be done through standard html client requests.
Workng on some php to display session cookies of the login process.

Prev1 | 2 
View this topic in a long page with up to 500 replies per page Watch this topic Create new topic



Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when new jobs are posted to our jobs board:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:




News »

Trending now »
Hot discussions in our forums right now:

Fecked up religious people strike again :-(
Created by Mark, last reply by nicnzl on 23-May-2013 16:41 (42 replies)
Pages... 2 3


Entire house HTPC concept
Created by InfiniteLoop, last reply by kiwijunglist on 23-May-2013 23:15 (25 replies)
Pages... 2


Cannabis is illegal yet we have really strong 'legal highs' ?
Created by qwerty7, last reply by freitasm on 23-May-2013 23:20 (74 replies)
Pages... 3 4 5


Xbox One
Created by DjShadow, last reply by jtbthatsme on 24-May-2013 01:04 (58 replies)
Pages... 2 3 4


Truenet Article - VoIP in New Zealand ----- Based on what Mr Butt ???
Created by maverick, last reply by Foiler on 23-May-2013 23:23 (18 replies)
Pages... 2


A new project coming to Geekzone
Created by freitasm, last reply by hamish225 on 23-May-2013 19:14 (278 replies)
Pages... 17 18 19


HTC One (2013) owners' discussion
Created by Dingbatt, last reply by bradstewart on 24-May-2013 00:53 (1546 replies)
Pages... 102 103 104


"igov" online passport renewals
Created by Linuxluver, last reply by profrink on 22-May-2013 22:22 (29 replies)
Pages... 2



Geekzone Jobs »
Most recent NZ jobs in technology:

Systems Analyst - mix BA, design & infrastructure
Posted 23-May-2013 22:28

Network Engineer - Urgent Requirement
Posted 23-May-2013 22:28

Senior Java developer - Contract Role
Posted 23-May-2013 22:28

Enterprise Architect
Posted 23-May-2013 22:28

Computer Programmer
Posted 23-May-2013 21:28

Software Developer - Queenstown
Posted 23-May-2013 19:28

Network Performance Engineer
Posted 23-May-2013 19:28


Geekzone Live »
Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.