I'm afraid you can't get an HTTP client to retrieve the source files in a /cgi-bin/ directory. You see, the webserver treats files there in a special manner -- it attempts to execute these files and return their output, rather than the file itself.

Since that behavior is a function of the web server daemon, and not the client software, nothing you do on the client side can "trick" the webserver into returning the source files.

Instead, as gellyfish and xorl have pointed out, you need to attach to the server in an authenticated way -- via your FTP or SCP account -- and download them. Of course, if you do not own the server account in question, you are still left without a solution.

If there are some scripts you'd like to see the source of on a web site you do not control, try mailing the web master. Unless the site code is particularly sensitive (e.g. e-commerce, etc.), there is a good chance the web master will be willing to share.

radiantmatrix
require General::Disclaimer;

In reply to Re: to retrieve content of cgi-bin folder by radiantmatrix
in thread to retrieve content of cgi-bin folder by Anonymous Monk

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.