Fedora Linux Support Community & Resources Center
  #1  
Old 4th November 2005, 04:02 AM
SickFreak's Avatar
SickFreak Offline
Registered User
 
Join Date: Jul 2004
Posts: 22
Automatic daily login script *Programming Challenge*

Hello,
At school I am required to 'muster' electronically each day on the attendance website for the University. Being that I am by nature a distracted person, I often forget to accomplish this task.

Can someone please help me craft a script that will automatically log me in to the server, possibly being run as a cron job or something that I can set and forget? The logistics of the task are as follows:

1. Muster must be completed Monday through Friday.
2. Muster must be completed between 5am and 4pm.
3. Mustering consists of entering a username/password combination to a secure server.

I have a computer on campus that I can access remotely via a shell account and that is operational 24/7.

Any suggestions provided are most appreciated. I am a burgeoning programmer and I am not skilled in the art of writing network interfacing programs.

SickFreq
Reply With Quote
  #2  
Old 4th November 2005, 04:49 AM
simonn Offline
Registered User
 
Join Date: May 2005
Location: Sydney, Australia
Age: 39
Posts: 217
man wget

Set up a cron job.
__________________
"Your attitude reminds me of a hairdresser who wonders why anybody took Einstein seriously with a haircut like that."
Reply With Quote
  #3  
Old 5th November 2005, 03:27 AM
SickFreak's Avatar
SickFreak Offline
Registered User
 
Join Date: Jul 2004
Posts: 22
path to ssl certificate

okay, rtfm, very insightful. Now, for those home gamers out there who are looking for the details of what is going on here, the steps I have tried are as follows:

# wget intrants.school.edu --http-user=my_username -http-passwd=my_password --no-check-certificate

and

# wget intranet.school.edu --http-user=my_username -http-passwd=my_password -secure-protocol=auto

I do know that the school is using a form of SSLvX and I have tried all of those options. I think I need to specify a path to the certificate I have stored on my system but I cannot find where that is. I know that firefox keeps a record of it but can anyone tell me what the path to that certificate is so I can specify it as a part of my login script?

Specifically, I think I need to use the:

--ca-directory=directory

option to access the account, but I don't know what directory to specify. Where are the ssl certs stored and will PEM format work?

Sick
Reply With Quote
  #4  
Old 5th November 2005, 05:41 AM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
IF you look at your Prefs menu, under Sessions, you can set login items. Just make a script, and have it run at login.
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #5  
Old 23rd November 2005, 10:45 PM
SickFreak's Avatar
SickFreak Offline
Registered User
 
Join Date: Jul 2004
Posts: 22
I have solved this issue, and I am now automatically running a login script to my school.

Here are the steps involved:

1. Edit your /etc/lynx.cfg file. Make the following changes:
ACCEPT_ALL_COOKIES:TRUE
FORCE_SSL_PROMPTES
2. Create a text file with the following contents:

(echo '$username'; echo '$secretpassword'; echo '\33[B') | lynx -term xterm -accept_all_cookies https://school.login.html >> /path/tofile/login_result.txt

Breaking this little script down, what this does is pass in two values to the login as they are requested. The echo '\33[B' is equivalent to a spacebar press I inserted just to test the functionality of the echo. Using lynx, the -term xterm is used to specify the type of terminal used to execute the script. The tag -accept_all_cookies is used to do just that. Then comes the website you desire to login to, and finally a redirected output to a txt file to test the script. If the script runs successfully, you will have a file created with the results of the page you reach after you login.

To top this off, run a cron job that executes at the time you desire to login. I recommend running it often at first to test its functionality, and then just setting it to the time you desire to access the page.

I hope this helps someone subvert the horrors of having to automatically log yourself in to let your employer know you are alive.

SickFreak
Reply With Quote
Reply

Tags
automatic, challenge, daily, login, programming, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
writting a script with a IF statement (Programming) akounga Programming & Packaging 4 15th June 2009 10:48 AM
Script programming akounga Programming & Packaging 0 14th June 2009 10:08 PM
Fedora Core 10: Login Window to enable automatic login bghayad Using Fedora 1 8th June 2009 04:27 PM
automatic script chief Using Fedora 1 7th April 2005 06:54 AM


Current GMT-time: 21:06 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat