Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to login into this page but I cannot for the life of me get it to work. I have to login to this site when i connect to my school's wifi in order to start a session.

So far ive tried to use bash and cUrl to achieve this but have only achieved to give myself a headache. will cUrl work or am I on the wrong track? Any help is greatly appreciated!

Thanks,

N

Here's what i tried:

curl --cookie-jar cjar --output /dev/null http://campus.fsu.edu/webapps/login/

curl --cookie cjar --cookie-jar cjar \
    --data 'username=foo' \
    --data 'password=bar' \
    --data 'service=http://campus.fsu.edu/webapps/login/' \
    --data 'loginurl=http://campus.fsu.edu/webapps/login/bb_bb60/logincas.jsp' \
    --location \
    --output ~/loginresult.html \
        http://campus.fsu.edu/webapps/login/
share|improve this question
    
Could you post the code you tried to use to login to that webpage? Also I think bash isn't the way you wanna do this I'm not even sure if there's a way to do this in bash. Sounds like a job for Perl or JavaScript maybe? I'm just starting to learn the basics of programming myself though. –  Daniel Sep 4 '12 at 0:34

2 Answers 2

up vote 4 down vote accepted

Easiest way to bash login:

wget --save-cookies cookies.txt --keep-session-cookies --post-data="username=foo&password=bar" "http://some.site/login.php"

Although some websites may have some restrictions to login like this.

share|improve this answer

You can try this even in Yahoo prompt bash ... you will get a login accepted

curl --user name:password http://mail.yahoo.com -v 

curl is the way to do it in bash.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.