Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 605589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:09:43+00:00 2026-05-13T17:09:43+00:00

in my ruby script I need to pass user name and password as a

  • 0

in my ruby script I need to pass user name and

  • password as a plain text in a form in order to log in. Both user name and password are currently stored in my script.

  • I have no control over the server I log in from the script. The script is localy working fine and in the future I want to move to onto my

  • webhosting provider and run it from there (I have ssh access)

  • using cron. Is there any way/method how to

  • protect the password in case somebody gets access to this script by any chance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:09:44+00:00Added an answer on May 13, 2026 at 5:09 pm

    The more I think about this, the more I think you must trust your hosting service. I would make sure the hosting service has “skin in the game”: That is, that they host enough “high profile” accounts that being found untrustworthy would be very costly to them (in lost accounts and sales).

    And whether or not you think the hosting service is trustworthy, you ought have a plan in case the target account is compromised. Who will you notify, how will you get that account deactivated, etc.

    The only technological solution I can think of–you log on manually, capture the cookie, and provide that cookie to the script–protects the password, but presumably a hostile host could use that cookie to do any damage he wanted on the target system using whatever privileges are attached to that cookie, including changing your password. So it’s no solution at all.

    Oh, speaking of privileges: Can the task you need to automate be accomplished with a target account that has lowered privileges, such as a read-only account, or one that cannot make any changes to its profile? Having only your low-privilege credentials on the hosting service would lower your risk (or “exposure,” as the polysyllabic crowd likes to say).

    Prior answer, found to be unworkable, below the line.


    You can encrypt the user id and password using yet another password. In order to run, the script has to be provided with it’s password. It uses that password to decrypt the web service’s user name and password. Make sure that the script’s password doesn’t get stored anywhere, but only held in memory and only for long enough to decrypt the ultimate user id and password.

    If it really matters, make sure your connection to run the script is crypto (ssh, ssl, etc.), and make sure the script only uses https to log on.

    That doesn’t make you invulnerable to someone with root privileges on the box (at some point, the plaintext user-id and password will be in memory, and therefore vulnerable), but it does make it take more work for them to be able to get the user-id/password.

    Updated: The requirement that this be automated makes the above solution no good.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 326k
  • Answers 326k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer That's really an inefficient problem to solve with a regex,… May 14, 2026 at 1:39 am
  • Editorial Team
    Editorial Team added an answer input[type="submit"] { background-color: buttonface; border: 2px outset buttonface; color: buttontext;… May 14, 2026 at 1:39 am
  • Editorial Team
    Editorial Team added an answer Configure the sample grabber's media type (sampleGrabber.SetMediaType) with one that… May 14, 2026 at 1:39 am

Related Questions

I am trying to create a simple Automator droplet that will take the style.less
Working on a little Ruby script that goes out to the web and crawls
I need to build a scripting interface for my C# program that does system
I am using a shell script to run some runner scripts in my Ruby
I finished my short file for a homework assignment which uses IO.popen(command).readlines to grab

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.