Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: to retrieve content of cgi-bin folder
by gellyfish (Monsignor) on Oct 18, 2004 at 11:51 UTC

    Yes, you can use same mechanism that you used to upload the files in the first place (FTP, ssh or whatever) of course I'm not quite sure why don't have local copies of the files anyway. If it is not your site you are trying to get the files from you will have to ask the sites owner if they will let you have copies of the files, I'm sure you have a perfectly legitimate interest in obtaining copies.

    /J\

Re: to retrieve content of cgi-bin folder
by bart (Canon) on Oct 18, 2004 at 10:57 UTC
    Your webserver is normally configured not to ever deliver this kind of content. So there's no way you can make it do so. Well, except maybe on IIS... as the company that makes it is known for its lack of implementing proper security.
Re: to retrieve content of cgi-bin folder
by Prior Nacre V (Hermit) on Oct 18, 2004 at 10:54 UTC

    I think you need to do some networking. Your local police station would be a good start. They, or their associates, keep dossiers on this sort of thing. I'm sure you'll find them extremely attentive.

    Regards,

    PN5

Re: to retrieve content of cgi-bin folder
by radiantmatrix (Parson) on Oct 18, 2004 at 13:18 UTC

    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;
Re: to retrieve content of cgi-bin folder
by jfroebe (Parson) on Oct 18, 2004 at 15:29 UTC

    Hi Anonymous Monk,

    You're best bet is to contact the webmaster of the website you are looking at. If you could some how get the contents of the cgi-bin folder, you are most likely doing so illegally (depends on which country you're in). If it is a U.S. server, it doesn't matter which country you live in..

    My advice to you: don't try to get the contents of cgi-bin or any part of the website without permission. It's simply not worth the risk of fines or jail time.

    Jason L. Froebe

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

      Thank you for advice, has got already! Its appeared simply enough. No anything interesting, one primitive cgi scripts. Probably the author uses bad coding, in any case very rough scripts, no good ideas.. "My advice to you: don't try to get the contents of cgi-bin or any part of the website without permission. It's simply not worth the risk of fines or jail time."
Re: to retrieve content of cgi-bin folder
by xorl (Deacon) on Oct 18, 2004 at 13:14 UTC