Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to automate Cisco Clean Access logins' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to automate Cisco Clean Access logins
Authored by: logich on May 11, '06 09:58:06AM
You may want to look at the security command to access usernames and passwords stored in the keychain. There's a little article about it here: http://www.dribin.org/dave/blog/archives/2006/01/16/keychain_cli/

[ Reply to This | # ]
how to make it safer
Authored by: mzs on May 11, '06 11:45:36AM

Wow I never knew about security, good find!

Now one problem with the current script is that the username and password apear in the output of /bin/ps. You should use a ~/.netrc file instead. That would work if the https server used for granting access used authentication instead of an HTML form.

But curl can take the "-d@-" option. Then the data to POST comes from stdin. You could create a function in your shell script that spits-out the username and password and all the other requesite junk into the POST from ~/.netrc or using /usr/bin/security out of a keychain.

In any case, nice script so far.



[ Reply to This | # ]