### Obfu spoiler: vladb's sig (was Re: Deobfuscation for fun and profit)

by belden (Friar)
 on May 27, 2002 at 23:49 UTC ( #169669=note: print w/replies, xml ) Need Help??

```\$"=q;grep;;\$,=q"grep";for(`find . -name ".saves*~"`){s;\$/;;;/(.*-(\d+)
+-.*)\$/;
\$_=["ps -e -o pid | "," \$2 | "," -v "," "];`@\$_`?{print"+ \$1"}:{print"
+- \$1"}&&`r
m \$1`;
print\$\;}
```
```\$"=q;

...
`@\$_` ? {print"+ \$1"} : {print"- \$1"} && `rm \$1`;
print \$\;
}
```
``` 1:  \$"=q;
2:
...
9:    `@\$_` ? {print"+ \$1"} : {print"- \$1"} && `rm \$1`;
10:    print \$\;
11:  }
```
```perl -e '@a = qw (a bc def); print "before: @a\n"; \$"=q; print "after:
+ @a\n";'

Output:
before: a bc def
```
```perl -MO=Deparse -e '@a = qw (a bc def); print "before: @a\n"; \$"=q; p
+rint
"after: @a\n";'

...
print "before: @a\n";             # yep, still with ya
\$" = ' print "after: @a\\n"';     # whoa, this is unexpected
-e syntax OK                      # good news, I guess
```
```\$"=q;grep;;
\$,=q"grep";
```
```\$" = 'grep';
\$, = 'grep';
```
``` 1:  \$"= 'grep' ;
2:  \$,= 'grep' ;
...
8:    `@\$_` ? {print"+ \$1"} : {print"- \$1"} && `rm \$1`;
9:    print \$\;
10:  }
```
```     /               # start of pattern match
(              # begin storing into \$1
...
)              # stop storing into \$2
\$               # end of the line, bub
/x;              # / to terminate regex, x to allow comments
```
```@command = "ps -e -o pid | grep \$2 | grep -v grep ";
\$ar_command = \@command;
```
```perl -e '\$foo = 0; \$foo==0 ? print "foo is zero" : print "foo is non-z
+ero";'

Output:
foo is zero
```
```\$foo = 0;
if ( \$foo == 0 ) {
...
} else {
print "foo is non-zero" ;
}
```
```if ( `@\$_` ) {
print "+ \$1";
} else {
print "- \$1" && `rm \$1`;
}
```
```my \$owner_is_still_running = `@\$_`;             # search for a specifi
+c \$pid
if ( \$owner_is_still_running ) {
...
print "removing \$1";                          # didn't find \$pid
`rm \$1`;                                      # remove \$pid's tempfi
+le
}
```
```#!/usr/bin/perl

...
`rm \$filename`;
}
}
```

Create A New User
Node Status?
node history
Node Type: note [id://169669]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2018-06-20 19:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should cpanminus be part of the standard Perl release?

Results (117 votes). Check out past polls.

Notices?