Welcome to the Monastery PerlMonks

### The best part of waking up?

by one4k4 (Hermit)
 on Dec 17, 2003 at 01:23 UTC Need Help??

```#!/usr/bin/perl -w
use strict;@\ = (9,15,{7=>79,22=>124##
,23=>124,26=>78,27=>45,28=>67,29=>72##
,49=>45,70=>124,47=>51,58=>124,54=>###
124,65=>124,79=>47,42=>92,30=>51,36###
=>47,40=>47,38=>92,46=>72,48=>67,50###
=>78,70=>124,92=>79,81=>92,83=>47,85##
=>92,78=>47,73=>124,69=>124,55=>124,##
129=>51,128=>72,127=>67,112=>124,101##
=>78,97=>78,87=>47,88=>47},1,0);map{##
map{\$\[4]++;\$\[2]{\$\[4]}?print chr\$\##
[2]{\$\[4]}:print ' ';}(1..((\$\[0]*\$\##
[1])/9));print "\n";}(1..9);##########

Update: In agreeance with simonm's post below, I've taken the rm-rf sarcasm out of my sig. And the copy of Win95C.

Replies are listed 'Best First'.
Re: The best part of waking up?
by Anonymous Monk on Dec 17, 2003 at 10:45 UTC
I thought the best part of waking up is the fact that you aren't dead.
Too some, that can be a disappointment ;) And sometimes it's not clearly a fact that you aren't dead when you wake up. Drink too much whiskey and find out the next day ;)
--
b10m
Re: The best part of waking up?
by simonm (Vicar) on Dec 17, 2003 at 03:02 UTC
While I see that it's part of your sig, the reference to rm -rf's at the bottom of an obfuscation made me think twice before running it.

In general, I find the fact that we're not plagued by malicious Perl code notable; while obfuscation seems to leave the door open for abuse, I've yet to hear of a case of someone posting a damaging snippet or sneaking a vulnerability into an existing module.

I like your reply. I wondered about that, and you're the first to mention. So, it's gone like the plague. I agree with you though, I often wonder how many obfus could contain an entire copy of Win95C.. just waiting to be activated. ;)

/me hopes nobody notices (or runs) the shell script in his sig.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Sure my reply is about a year late but I'm amazed that no one posted a comment about : () { :|:& };: because it's a fork bomb in one line of bash. (The colon is a valid function name.)

Since this thread was just linked to by Funniest Nodes of 2004 I'm going to reply with this warning. Otherwise I would be tempted to hope as few people saw the command as possible.

I mean I catch the irony in your post saying you hope people don't run a dangerous command and then including such a command yourself. I find that funny but I'd rather not have people run it on machines they shouldn't by accident.

I did run a fork bomb I wrote in C on my 486 before I formated the drive a while ago. It was running Slackware 4.0 and even the caps-lock lights and control-alt-delete stopped responding.
the reference to rm -rf's at the bottom of an obfuscation made me think twice before running it

If an obfuscator wanted to zap you like that, he'd probably obfuscate the rm -rf somehow. You'd have no warning unless you de-obfuscated the code before running it, or read comments by others who either de-obfuscated it or got bitten. There are an infinite number of ways to obfuscate code, as I'm sure you're aware if you follow this section closely.

My suggestion is to keep an unprivileged account around for running untrusted code. I'm generally not a big advocate of unprivileged accounts; for normal, everyday use I feel that they cause more inconvenience than they're worth[1]. However, for running untrusted code, or code that processes untrusted data from the internet (especially, any kind of server code), an unprivileged account can save you a lot of grief. If you don't trust an obfu (or whatever other code you don't trust) run it as a user with no privileges, no access to your home directory with your data.

That said, I'll admit that with obfuscations on Perlmonks I often don't bother, especially if there are already positive comments by monks whose names I recognize. I haven't been bitten yet...

[1] I say this not to persuade anyone that it's true, nor to start an argument about it (I'm tired of that argument, believe me), but to point out that even someone who holds this view, such as myself, still sees the value of an unprivileged account for running untrusted code. Where you draw the line in terms of what software you choose to trust is another matter.

```\$;=sub{\$/};@;=map{my(\$a,\$b)=(\$_,\$;);\$;=sub{\$a.\$b->()}}
split//,".rekcah lreP rehtona tsuJ";\$\=\$ ;->();print\$/
Re: The best part of waking up?
by woolfy (Hermit) on Dec 17, 2003 at 10:41 UTC
Hey nice, ++ to you, that cafein molecule looks good. But cafein is bad for you, you know! I'm no coffee drinker myself, already being hyperactive and such, but I "imbibe" tea with half a gallon a day.

Create A New User
Node Status?
node history
Node Type: obfuscated [id://315194]
Approved by Limbic~Region
Front-paged by Limbic~Region
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-02-21 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
When it is dark outside I am happiest to see ...

Results (276 votes). Check out past polls.

Notices?