Results 1 to 6 of 6

Thread: [PERL]Beginner: /bin/sh on localhost??

  1. #1
    Just burned his ISO
    Join Date
    Oct 2007

    Default [PERL]Beginner: /bin/sh on localhost??

    Heyz allemaal ik heb dit ook op een ander engels forum gepost dus vandaar dat die engels is!


    Hi all!

    I'm a beginner with this but I have had succes a year ago but forgot how it worked.
    I want to run a perl script, I have a website with perl installed on it if I put the script in the cgi-bin folder and after that go to:
    I get a 500 internal server error

    Now I installed ActivePerl to my pc so I can run perl scripts from the CMD. But when I place a script like here:

    and typ in CMD:
    I get this error:
    Can't exec /bin/sh at C:\ line 1

    I wanted to try an exploit from milw0rm

    It has something to do with the first line of the exploit which say's:

    Don't know what it does or is supposed to do... Can anyone help me out here plz??

  2. #2
    Senior Member
    Join Date
    Jan 2006


    Well it's telling it the shell to use in *nix.......


    You would run "perl"

    But you're trying to run this in windows?
    (This is a BT2 forum)

    EDIT: yes, I should've been a little more explicit - it's telling it that the script is to be run by a shell, sh/bash,etc - rather than by a perl interpreter.

  3. #3
    Join Date
    Mar 2007


    A perl script should start like this..........


    Futhermore as re@lity said this is a linux forum but since I'm feeling helpful you need to install a perl interpreter in windows or you'll never get it going. Here is one for example.In order to run a bash script which is what you appear to have you would need to install cygwin which creates a bash enviorment in windows.

  4. #4
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010


    If it's really a perl script it shouldn't start with #!/bin/sh

    If you provide the milw0rm reference # we'd be in a much better position to help.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  5. #5
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA


    Quote Originally Posted by thorin View Post
    If it's really a perl script it shouldn't start with #!/bin/sh

    If you provide the milw0rm reference # we'd be in a much better position to help.
    It's probably this one: 344.c
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

  6. #6
    Just burned his ISO sorrow's Avatar
    Join Date
    Oct 2007


    If you got a perl interpreter installed, you should write its name with the full path included on the first line.
    On *nix it sometimes looks like this
    If your interpreter's name is 'some_perl.exe' in the dir 'c:\Perl\bin\'
    i guess you should write on the first line(make sure it's the first one)


    I guess that's it
    Why am i so sad?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts