Forum: Ruby Code to login into any account with login and passport.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7fa59f01218f241aeeeffd999346ed2e?d=identicon&s=25 Sachin Gadkar (Guest)
on 2007-03-29 16:17
(Received via mailing list)
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
F50f5d582d76f98686da34917531fe56?d=identicon&s=25 Peter Szinek (Guest)
on 2007-03-29 21:04
(Received via mailing list)
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
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (Guest)
on 2007-03-29 21:06
(Received via mailing list)
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
http://www.catb.org/~esr/faqs/smart-questions.html#intro

Regards,

Brian.
7fa59f01218f241aeeeffd999346ed2e?d=identicon&s=25 Sachin Gadkar (Guest)
on 2007-03-30 09:27
(Received via mailing list)
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:
> "An account" could mean a zillion things. A Windows account? A Unix
> would immediately give you the answer you are looking for. Not doing this
>
--
sachin.gadkar@gmail.com

URL : http://nichas143.tripod.com
7fa59f01218f241aeeeffd999346ed2e?d=identicon&s=25 Sachin Gadkar (Guest)
on 2007-03-30 09:29
(Received via mailing list)
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:
>    fetch          'http://rubyforge.org/'
> Or you can use WWW::Mechanize (scRUBYt! is also built on Mechanize) to
>
--
sachin.gadkar@gmail.com

URL : http://nichas143.tripod.com
This topic is locked and can not be replied to.