?

Log in

No account? Create an account
Hello, I need to do a few bash/gawk scripts to have some basic… - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Nov. 2nd, 2006|07:27 am]
LiveJournal Client Discussions

lj_clients

[mikhailian]
Hello, I need to do a few bash/gawk scripts to have some basic automation for day-to-day tasks. Some of them require a login.

Is there a way to have a simple authentication, without having to mimic the behavior of the browser?
linkReply

Comments:
[User Picture]From: boggyb
2006-11-03 03:07 pm (UTC)

Re: The client protocol

Pass something like user=$username&password=$password on the login line.

Horribly insecure, but it works. There's options to MD5 the password or use a challenge/response system, but depending on the situation you may find cleartext is good enough.
(Reply) (Parent) (Thread)
[User Picture]From: mikhailian
2006-11-05 09:02 pm (UTC)

Re: The client protocol

AFAIU, this does not work for accessing the site, e.g. doing requests to www.livejournal.com/export.bml would require a different mechanism, am I right?
(Reply) (Parent) (Thread)
[User Picture]From: boggyb
2006-11-05 09:19 pm (UTC)

Re: The client protocol

If you want to pretend to be someone using a web browser then you need to use the getsession method to get a session id. Then set that as the ljmastersession cookie, and set the "u123:s456" part of it as the ljloggedin cookie. That seems to work.
(Reply) (Parent) (Thread)