Please don't shoot this one down, as I looked through my Macbook Air and wanted to configure my Apache installation to more specific needs, I came across printenv.wsf and printenv.vbs, which I find curious as they are clearly Windows related, my question is: do you know why those files are in OS X. This is a pretty vague question but I really want to look into why and how they got there, my theory is they were from the beginning but that seems weird, as they are clearly not runnable.

Do you guys have those files in your OS X installations.

Please forgive me for posting here, in the unix & linux exchange.

I've been looking through Our Father in law, but he returns a lot of results which will neither satisfy my curiosity and I think he is just trolling.

  • Thank you for saying something -- I just found the same thing when looking at one of my servers, and just about had a heart attack. (if this message hadn't been here, I would've had to report it to our security group as an 'incident' as I had files that I couldn't account for ... I suspect an OS update kindly inserted them.) – Joe Apr 15 '16 at 19:23

These files are test scripts for your Apache installation in a Windows environment. Bear in mind that Apache may be installed on various platforms and the maintainers are likely to package test scripts for all platforms in the same bundle, it's not uncommon.

I have never installed apache on Windows though and searching but Google Allmighty reveals these scripts are meant to test the CGI engine.

For instance printenv.wsf :

' ***** !!! WARNING !!! *****
' This script echoes the server environment variables and therefore
' leaks information - so NEVER use it in a live server environment!
' It is provided only for testing purpose.
' Also note that it is subject to cross site scripting attacks on
' MS IE and any other browser which fails to honor RFC2616.
'' printenv -- demo CGI program which just prints its environment

Note that they must be removed from a production server.

  • 1
    Yes that's my thought and it's nice you are pointing out they should be removed from a production server, but I would have thought Apple, as they have packaged Apache2, would have removed specifics for Windows, as they are the only files in that location. Maybe one should send a suggestion to Apple to remove those files from the OS X installation as they are not needed nor will work on OS X. – OMG-1 Apr 19 '15 at 11:55
  • I'm not sure Apple is for anything in this; it all boils down to the question how have you installed Apache on your system? Did you fetch it on the internet as a DMG file? If yes, where did you fetch it from? – user86969 Apr 20 '15 at 16:30
  • 1
    by default apache2 is installed from Apple side, they install a lot of packages, hidden to regular users. So no I haven't installed it by myself. – OMG-1 Apr 22 '15 at 9:25
  • You might try suggesting Apple to remove useless files on the OSX platform but I doubt they would change anything how they bundle third party packages. It makes more sense to ask Apache maintainers instead, which I expect is what Apple will reply, too. – user86969 Apr 26 '15 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.