Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Re: Immoral?

by andreychek (Parson)
on Jun 27, 2001 at 20:46 UTC ( #91980=note: print w/replies, xml ) Need Help??

in reply to Re: Immoral?
in thread Morality of posting Perl "virus" code?

pmas, I think you did a good job at summing things up.

Let me be a devil's advocate for a moment. My question is -- where exactly does the point lie where code becomes a hazard? The code originally written on this could modify perl scripts in the current directory, and it was removed because it was deemed dangerous.

Now, where exactly is the line drawn that seperates code that is "okay" from something that should not be posted? In this case, the code was drawn up in the first place due to this post, by chromatic. In fact, chromatic's original post was rated quite high (and yes, I had to use a vote on it right now to figure that out ;-) Nobody seemed to object to that particular post.

The code in this post was removed because it gave a working example of how to create something virus-like. But by leaving Chromatic's post, aren't we saying that it's fine to write a virus, here's how to get started, we just aren't going to show you the exact code.. meaning that the person has to be at a particular skill level to make it work. So in essance, it would seem as if we are leaving virus writting for the more skilled Perl programmers, and simply keeping the script kiddies off the street for the moment.

Again, I'm saying all of this as devil's advocate. However, the question I am posing is this-- how do we know when to remove code? What if what was posted could be used for good as well as bad, is it worth keeping it then? What if self modifying code could be used as a fancy form of "perl -i blah"? What if "perl -i blah" could be used as a virus? Just some thoughts to ponder :-)

Replies are listed 'Best First'.
Re: Re: Re: Immoral?
by chromatic (Archbishop) on Jun 27, 2001 at 21:16 UTC
    A three-month Perl programmer could write a program that adds similar 'viral' code to all of the Perl programs or modules or CGI scripts in the current directory. The biggest thing tachyon does differently is to use *DATA to store the code and seek to rewind the pseudo file.

    Anyone who's capable of writing code that will search for files with a particular extension, open the file and insert a varying number of lines after the first line of each file is capable of writing something similar. Most people here could have done that within a few weeks of learning Perl. Several could have done that in their first week.

    That's not to say there are better examples tachyon could have chosen :), but does his code give someone a grand weapon of ferocious power? No. We already have that. It's called Perl.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://91980]
[planetscape]: sleep well, Corion
[stonecolddevin]: erix seems pretty good, i listened to "So Many Roads" and it was nice. Not everyone's cup of tea but this guy can absolutely shred, he and the guy from Mastodon are definitely up there: https://www. v=VzhMkSN9dQc
[erix]: ha, good stuff - loud and fast...
[stonecolddevin]: here's some Mastodon for when you have 13 minutes to have your mind blown: https://www. v=4pvfQtUhtNE
[karlgoethebier]: goes to Brownsville one more time..

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-06-22 21:48 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (531 votes). Check out past polls.