Code to login into any account with login and passport

Hi Ruby_pals,
Say, I have login and password for an account.
Is it possible to get logged into it through a ruby code.

Kindly suggest, ways.

···

--
sachin.gadkar@gmail.com

URL : http://nichas143.tripod.com

Sachin Gadkar wrote:

Hi Ruby_pals,
Say, I have login and password for an account.
Is it possible to get logged into it through a ruby code.

One way is to use scRUBYt!:

···

==========================================================
rubyforge_data = Scrubyt::Extractor.define do
   fetch 'http://rubyforge.org/'
   click_link 'Log In'
   fill_textfield 'form_loginname', '*login_here*'
   fill_textfield 'form_pw', '*pass_here*'
   submit 0

   stuff 'My Personal Page'

end

Or you can use WWW::Mechanize (scRUBYt! is also built on Mechanize) to do the same thing. If you would like to also scrape something there, I would suggest scRUBYt!, otherwise Mechanize is the way to go.

Cheers,
Peter
_
http://www.rubyrailways.com :: Ruby and Web2.0 blog
http://scrubyt.org :: Ruby web scraping framework
http://rubykitchensink.ca/ :: The indexed archive of all things Ruby

I kindly suggest that you ask your question in a more specific way.

"An account" could mean a zillion things. A Windows account? A Unix account?
A Cisco router login? A bank account? The question is meaningless as it
stands.

If you phrased the question as: "I have a login and password for an account
on a Unix machine which I can access via telnet or ssh. Is there a Ruby
client for either of these protocols?" then it would be specific. On the
other hand, taking 30 seconds of your time to enter the keywords into Google
would immediately give you the answer you are looking for. Not doing this
just gives the impression that you can't be bothered to think for yourself.

For advice on ways to get better answers from mailing lists, try reading
http://www.catb.org/~esr/faqs/smart-questions.html#intro

Regards,

Brian.

···

On Thu, Mar 29, 2007 at 11:16:20PM +0900, Sachin Gadkar wrote:

Hi Ruby_pals,
Say, I have login and password for an account.
Is it possible to get logged into it through a ruby code.

Kindly suggest, ways.

Hey ya, sorry for not being specific. would keep that in mind for the future
queries.
Thanks for the comment.

···

On 3/30/07, Brian Candler <B.Candler@pobox.com> wrote:

On Thu, Mar 29, 2007 at 11:16:20PM +0900, Sachin Gadkar wrote:
> Hi Ruby_pals,
> Say, I have login and password for an account.
> Is it possible to get logged into it through a ruby code.
>
> Kindly suggest, ways.

I kindly suggest that you ask your question in a more specific way.

"An account" could mean a zillion things. A Windows account? A Unix
account?
A Cisco router login? A bank account? The question is meaningless as it
stands.

If you phrased the question as: "I have a login and password for an
account
on a Unix machine which I can access via telnet or ssh. Is there a Ruby
client for either of these protocols?" then it would be specific. On the
other hand, taking 30 seconds of your time to enter the keywords into
Google
would immediately give you the answer you are looking for. Not doing this
just gives the impression that you can't be bothered to think for
yourself.

For advice on ways to get better answers from mailing lists, try reading
How To Ask Questions The Smart Way

Regards,

Brian.

--
sachin.gadkar@gmail.com

URL : http://nichas143.tripod.com

And thanks a lot to Peter Szinek.
You have given the right direction for my query. You answer replies to what
exactly wanted to know.
Thanks a lot.
And finally I love ruby.
Sachin.

···

On 3/30/07, Peter Szinek <peter@rubyrailways.com> wrote:

Sachin Gadkar wrote:
> Hi Ruby_pals,
> Say, I have login and password for an account.
> Is it possible to get logged into it through a ruby code.

One way is to use scRUBYt!:

==========================================================
rubyforge_data = Scrubyt::Extractor.define do
   fetch 'http://rubyforge.org/&#39;
   click_link 'Log In'
   fill_textfield 'form_loginname', '*login_here*'
   fill_textfield 'form_pw', '*pass_here*'
   submit 0

   stuff 'My Personal Page'

end

Or you can use WWW::Mechanize (scRUBYt! is also built on Mechanize) to
do the same thing. If you would like to also scrape something there, I
would suggest scRUBYt!, otherwise Mechanize is the way to go.

Cheers,
Peter
_
http://www.rubyrailways.com :: Ruby and Web2.0 blog
http://scrubyt.org :: Ruby web scraping framework
http://rubykitchensink.ca/ :: The indexed archive of all things Ruby

--
sachin.gadkar@gmail.com

URL : http://nichas143.tripod.com