http://qs321.pair.com?node_id=661048

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

How would you check if script contains virus spyware malware?
  • Comment on Is there perl script virus spyware malware?

Replies are listed 'Best First'.
Re: Is there perl script virus spyware malware?
by kirillm (Friar) on Jan 08, 2008 at 11:27 UTC

    I understand your question as how to identify Perl code that does bad things, not as how to check for viruses/malware in other files from a Perl script.

    To that my answer to your question will be: "Read the code, Luke". Additionally you could put the code you don't trust enough in a Safe, define what things shall be considered "bad" and see if the code tries to do one of these bad things.

      but I don't know perl
Re: Is there perl script virus spyware malware?
by Burak (Chaplain) on Jan 08, 2008 at 10:26 UTC
Re: Is there perl script virus spyware malware?
by sundialsvc4 (Abbot) on Jan 08, 2008 at 16:54 UTC

    Maybe we shouldn't have encouraged words like these, because they happily imply that these things are something biological or at least invisible, when in fact they are neither. I prefer to use the term rogue program.

    When you look at a Perl script, you see the entire source-code (along with libraries and other things that you are incorporating into that source-code indirectly), and “what you see is what you get.” Now, there are lots of ways to write Perl so that it is hard to read ... check out the obfuscation and poetry sections of this site. But still, what you see is what you get.

    Writers of “anti-virus” software have shamelessly exploited fear and ignorance to sell more copies of their products. (The fact that damm near everyone used Windows as an all-powerful Administrator did not hurt sales either.) But there is actually nothing magical about a rogue program, and if you use a non-admin userid, a good automatic backup system (like the one that Windows has provided free with their system for years) and an ounce of common-sense, you'll never be bothered with them. (And if you do, you won't lose anything.) It took an annoying amount of time to strip the useless anti-virus crap from my Windows boxes and to turn it completely off, but I finally managed to do it.