Hello Monks,

I had read up on the new nodes, so I went to the tutorials to select something that I thought might be interesting and improve my perl game, settling on 181977, which has a good example of Tk that a beginner can replicate. I downloaded and executed the script, finding that it produces a window that shows the contents of a directory, has another for a listing of a selected file, and a final one for the output if it's a perl script. It's billed as an "obfu decoder ring," as one can, allegedly, see the output of a script or with pasted-in text without giving it full-reign.

At the end of the thread, someone posted an obfuscated script, which I turned into a .pl file to see what it might reveal, getting no output. What's more, the poster claimed you would be more or less brainless to run it without the use of Safe.pm.

My question is: how do I use Safe.pm effectively? Assume that I have an obfu that I can make neither heads nor tails of. I won't list the one at the end of this node, because I don't know whether it is pernicious or not. What I have so far is this:

#!/usr/bin/perl use Safe; use 5.010; say "safe";

Thanks for your comment,


In reply to using Safe.pm by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.