curl / wget login script help - only requires password .

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
aus-city
Forum Regular
Forum Regular
Posts: 685
Joined: Thu Oct 26, 2006 11:56 pm

curl / wget login script help - only requires password .

Unread post by aus-city »

I am trying to get curl to log into a solar controller web page. Whats unusual, there is no username, just password.

The login url is http://ip.address/login.html

Here are the values of the page....

<h2>Welcome to the Xantrex Gateway configuration pages.</h2>

<p>Enter your password to sign in.</p>

<div id="content">
<div class="accordion">
<form class="formclass" action="/cgi-bin/auth.cgi" method="post">
<dl>
<dd><input name="password" type="password" id="password" /></dd>
<dd><input type="submit" value="Sign in" /></dd>
</dl>

I dont care if its wget or curl. Once your authenticated I have got all the URLs to dump the data. It works in a web browser and as long as you stay in that window / tab change the URLs to get6 the data. It seems to me that curl does not know how to submit...

Once your logged in, your kicked to http://ip.address/index.html

Trying to go to index.html without being logged in kicks to to login.html


Thanks!
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: curl / wget login script help - only requires password .

Unread post by prupert »

Lemonbit Internet Dedicated Server Management
aus-city
Forum Regular
Forum Regular
Posts: 685
Joined: Thu Oct 26, 2006 11:56 pm

Re: curl / wget login script help - only requires password .

Unread post by aus-city »

Thanks!

Turns out the device uses javascript so I can't use curl or wget ;(
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: curl / wget login script help - only requires password .

Unread post by prupert »

Lemonbit Internet Dedicated Server Management
Highland
Forum Regular
Forum Regular
Posts: 674
Joined: Mon Apr 10, 2006 12:55 pm

Re: curl / wget login script help - only requires password .

Unread post by Highland »

I guess i just don't understand. CURL can do a POST pretty easily. I mean that JS has to do something, like call another page. What does the JS function do? Does it call AJAX?
"Its not a mac. I run linux... I'm actually cool." - scott
aus-city
Forum Regular
Forum Regular
Posts: 685
Joined: Thu Oct 26, 2006 11:56 pm

Re: curl / wget login script help - only requires password .

Unread post by aus-city »

It's got buttons in JavaScript that need to be clicked then submitted ;(
Highland
Forum Regular
Forum Regular
Posts: 674
Joined: Mon Apr 10, 2006 12:55 pm

Re: curl / wget login script help - only requires password .

Unread post by Highland »

Yeah, but that JS has to do something like an AJAX request. My thought is you figure out that AJAX request and then you can CURL to it.
"Its not a mac. I run linux... I'm actually cool." - scott
Post Reply