Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
# Analysis phase 1 print join ' ', map { 344 + ( ( 1, -1, -1, 1 )[ $o++ ] * ord('d') * ( $i++ == 3 ? 5 +: 1 ) ) + # ord('d') == 100 doesn't affect last two digits ord } split //, 'Codz'; # 'C' -> 11, 'N' -> 22, 'Y' -> 33, 'd' -> 44, 'o' -> 55, 'z' -> 66, # '!' -> 77, ',' -> 88, '7' -> 99, '8' -> 00 (if > 0) # '-' -> 11, '"' -> 22, '{' -> 33, 'p' -> 44, 'e' -> 55, 'Z' -> 66, # 'O' -> 77, 'D' -> 88, '9' -> 99, '8' -> 00 (if < 0 - doesn't happen +here) print "\n"; undef $o; undef $i; # clean up # 511 355 344 966 # ^^ ^^ ^^ ^^ last two digits ==, first digit != second # could have more digits as long as only last pair == e.g. -1211 # Analysis phase 2 print join ' ', map { qq|$_@{[ord(A)+(map-100+ord,split//, 'mdsk')[$.++]]}3| # 100 == ord('d') so 'd' -> 'A' # mdsk -> lcrj -> kbqi -> JAPH (another Caesar cipher!) } map { 344 + ( ( 1, -1, -1, 1 )[ $o++ ] * ord('d') * ( $i++ == 3 ? 5 +: 1 ) ) + ord } split //, 'Codz'; print "\n"; undef $o; undef $i; undef $.; # clean up # 511743 355653 344803 966723 # ^^^ ^^^ ^^^ ^^^ first 3 digits same as above # ^^ ^^ ^^ ^^ JAPH # ^ ^ ^ ^ last digit == 3 # Analysis phase 3 (++perltidy!) A( split //, join '', map { qq|$_@{[ord(A)+(map-100+ord,split//, 'mdsk')[$.++]]}3| } map { 344 + ( ( 1, -1, -1, 1 )[ $o++ ] * ord('d') * ( $i++ == 3 ? 5 +: 1 ) ) + ord } split //, 'Codz' ); # The argument list of A is actually # split / */, '511743 355653 344803 966723' # but since A restarts after each number # (the final 3 is a "stop digit") # I'll keep them separate in the comments below. # The stop digit had to be 1, 3, or 9 # since 0, 2, 4, 5, 6, 7, and 8 all appear # among the digits of the ASCII values of 'JAPH'. sub A { $_[0] && do { ( $_[0] != $_[1] ) && shift # skip leading garbage # 511743 355653 344803 966723 -> 11743 55653 44803 66723 and &A || do { shift; shift; # skip leading garbage # 11743 55653 44803 66723 -> 743 653 803 723 $_ = $|; # $| has to be 0 so don't unbuffer STDOUT { $_ *= 10; $_ += shift; $_[0] == 3 || redo } # $_ = 74 65 80 72 = 'J' 'A' 'P' 'H' print chr, chr( 1 + 15 * shift ); # 1 + 15 * 3 = 46 = '.' &A; # process next number } } } s,,$i++*$o+ord,ex; # misdirection - changes $_ from 72 to 7172 (71 = 4*4+ord('7'))

In reply to Re: untitled obfu by jdalbec
in thread untitled obfu by Chady

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.