Skip to main content
syntax highlighting added
Source Link
avall
  • 1.6k
  • 1
  • 10
  • 17

Perl

print pack qq;
\1108;
,hex for qw;
2e5d66e 4b88fad 4560770 3aedf79;
print pack qq;
\1108;
,hex for qw;
2e5d66e 4b88fad 4560770 3aedf79;

Prints a friendly message for a special day!

Outputs Happy Birthday!! (Was given to a programmer friend who hates Perl.)

The white space and semicolon as the delimiting characters are meant to deceive.

qq;\1108; (equivalent to "H8")
The semicolons are the delimiters for the double quote method. \110 is the octal code for H, followed by a plain 8, giving us the packing code "H8", meaning 8 hex digits

hex
Converts a hex string to an integer. No parameter means it runs on $_ (default variable)

for qw;2e5d66e 4b88fad 4560770 3aedf79;
The semicolons are the delimiters for the quoted list method. for indicates to run the entire block on the left once per each hex string.

"Unobfuscated", the script is:
print pack("H8", hex($_)) for (2e5d66e 4b88fad 4560770 3aedf79);

Each of those hex values, when de-hexed into an 8 digit number, and then packed into a 4 characters, will print 4 of the letters of Happy Birthday!!

Run it here

Perl

print pack qq;
\1108;
,hex for qw;
2e5d66e 4b88fad 4560770 3aedf79;

Prints a friendly message for a special day!

Outputs Happy Birthday!! (Was given to a programmer friend who hates Perl.)

The white space and semicolon as the delimiting characters are meant to deceive.

qq;\1108; (equivalent to "H8")
The semicolons are the delimiters for the double quote method. \110 is the octal code for H, followed by a plain 8, giving us the packing code "H8", meaning 8 hex digits

hex
Converts a hex string to an integer. No parameter means it runs on $_ (default variable)

for qw;2e5d66e 4b88fad 4560770 3aedf79;
The semicolons are the delimiters for the quoted list method. for indicates to run the entire block on the left once per each hex string.

"Unobfuscated", the script is:
print pack("H8", hex($_)) for (2e5d66e 4b88fad 4560770 3aedf79);

Each of those hex values, when de-hexed into an 8 digit number, and then packed into a 4 characters, will print 4 of the letters of Happy Birthday!!

Run it here

Perl

print pack qq;
\1108;
,hex for qw;
2e5d66e 4b88fad 4560770 3aedf79;

Prints a friendly message for a special day!

Outputs Happy Birthday!! (Was given to a programmer friend who hates Perl.)

The white space and semicolon as the delimiting characters are meant to deceive.

qq;\1108; (equivalent to "H8")
The semicolons are the delimiters for the double quote method. \110 is the octal code for H, followed by a plain 8, giving us the packing code "H8", meaning 8 hex digits

hex
Converts a hex string to an integer. No parameter means it runs on $_ (default variable)

for qw;2e5d66e 4b88fad 4560770 3aedf79;
The semicolons are the delimiters for the quoted list method. for indicates to run the entire block on the left once per each hex string.

"Unobfuscated", the script is:
print pack("H8", hex($_)) for (2e5d66e 4b88fad 4560770 3aedf79);

Each of those hex values, when de-hexed into an 8 digit number, and then packed into a 4 characters, will print 4 of the letters of Happy Birthday!!

Run it here

Source Link
Allen G
  • 1.9k
  • 2
  • 11
  • 8

Perl

print pack qq;
\1108;
,hex for qw;
2e5d66e 4b88fad 4560770 3aedf79;

Prints a friendly message for a special day!

Outputs Happy Birthday!! (Was given to a programmer friend who hates Perl.)

The white space and semicolon as the delimiting characters are meant to deceive.

qq;\1108; (equivalent to "H8")
The semicolons are the delimiters for the double quote method. \110 is the octal code for H, followed by a plain 8, giving us the packing code "H8", meaning 8 hex digits

hex
Converts a hex string to an integer. No parameter means it runs on $_ (default variable)

for qw;2e5d66e 4b88fad 4560770 3aedf79;
The semicolons are the delimiters for the quoted list method. for indicates to run the entire block on the left once per each hex string.

"Unobfuscated", the script is:
print pack("H8", hex($_)) for (2e5d66e 4b88fad 4560770 3aedf79);

Each of those hex values, when de-hexed into an 8 digit number, and then packed into a 4 characters, will print 4 of the letters of Happy Birthday!!

Run it here