Hi guys, I need a suggestion from someone experience. I wrote a Perl script that one of the actions does a GET request but you need to provide username and password for that.
The trivial option is to just ask the user for that in runtime, but in that way, the script will not be automatic.
The other idea I had was to use our faceless user to do the GET request but by doing that way you'll need to keep the username and the password hardcoded, also bad idea.
The third idea I had was to use a config file which will contain the username and the password, but that will require additional step and then users will be frightened to keep their password in a file, so it is not so good idea.
I'm looking for a way of somehow performing that GET request. I also the owner of the server-side of the site (written in JS), so I could do changes there too, but not sure which (we want to keep the username-password check).
Thank you.

In reply to how to hide information in code by ovedpo15

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.