cOMPRESSed JaPH,
No replies — Read more | Post response
|
by kschwab
on Dec 30, 2018 at 13:55
|
|
|
Run on a VT100 compatible terminal
#!/usr/bin/perl
BEGIN{$^="USE\0cOMPRESS\x1a\x1azLIB"^" ",$^=~s,$,
$^,ee};$_=q|M'XL(`*[Q*%P"`Y5231J%(`C<=PJ.VJ)E"U?T\\ZSNYDD>(B)HF_P^R
V9@A!A(MN"5<0!=]P[@831@,-!4@,\\(N"1%8[U%)BV[Y-,:12L?1&S.C5]A]F4+RES
`)M=WN*$C4R#/YH[YT\\/>:$IY/?&(M#&>VATA0W9VBE7T-U<2LWU%.$ALFQ=J"\\M=
ICPR"76N)ZYZS7P<7U/*.ZP!N$BHG,%-BZ,`E+WV@_7_N90.FH18I'@K*69M(LSP4X;
:C=:)EP[H@MXNEWIO?[&'U@_#@,?:O54D([YD6E$_3F^+*NOL<Q1+4Y0[.M_SP=<;<Y
O0'IR@8@`4$|;y| \n||d;$_=unpack'u';$,='-V4Jfdy{lzz33Se`k33dldN|gs'.
'`y!-V 2y{`g}2';$,^="\t"x$,=~y,,,c;$,=~s;^;$,;ee;
|
Perl Golang Partial Polyglot
No replies — Read more | Post response
|
by kschwab
on Dec 30, 2018 at 09:50
|
|
|
Similar to my earlier Perl Python Partial Polyglot.
This one runs under either Golang (go run ./script) or Perl, and produces *mostly* the same output. Arguably not a true polyglot since the Go doesn't depend on the Perl, but the Perl certainly depends on the Go.
//;$_=<<'/*',y'>>'';
package main;
func main() {
print("Just another Golang Hacker,\n");
}
//;main()
/*
s&(\146\w{3})(.*)\x47\w{5}&lc($1^'5 ,C').$2.('dQFX'^4x4)&es;s;$;$_;ee;
*/
|
More fun with a reference
1 direct reply — Read more / Contribute
|
by kschwab
on Dec 22, 2018 at 12:48
|
|
|
perl -e 's/^/pack+q.a..($^F^$^F**$^F),qq^\x19"\x11\x04mX^^\$\//e/print
+'
|
Just Another Perl Hacker,
1 direct reply — Read more / Contribute
|
by choroba
on Dec 21, 2018 at 10:43
|
|
|
Having fun with references.
print map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[
+{}],[sub{}^*ARGV,3];
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord
}map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
VT100 Screensaver
1 direct reply — Read more / Contribute
|
by kschwab
on Dec 09, 2018 at 16:27
|
|
|
Only works on Unix like machines...requires a VT100 compatible terminal like an xterm, and a working "stty" binary. Handles resizing the window while it's running. Ctrl-C to stop it.
#!/usr/bin/perl
use warnings;use strict;my($r,$c);$|=1;init();
sub init{print "\ec";($r,$c)=split' ',qx"stty size";$r-=5;$c-=16};
$SIG{INT}= sub{print "\ec\n";exit};$SIG{WINCH}=sub{init()};
$_='!X!E!EIC%IC%IC%!X!ECu#kCD@3ilowg!E!WICD@biloQgIO#kAr@DiloT@/@j'.
'@D@j@%IO#myD@gg!QCu#kC%IO#kO#gO#gC%!MIC%!QCu#kC%IO#ne#me#ni%!MICD'.
'@f@/iloQK';s/!/4pa/g;s/@/ilp/g;s/#/KW/g;s/%/Ag/g;tr|A-Za-z0-9+/| -_|;
@_=split(/\n/,unpack('u',join($',map(chr(32+length($_)*3/4).
$_,/(.{1,60})/gs))));print "\ec\e[2J\e[?25l";srand();
for (;;) {
my($x,$y)= map{int(rand($_))+1}($c,$r);
for(0..4){print "\e[".($y+$_).";${x}H".$_[$_];}
select($\,$\,$\,rand(1.2)+.3);
for(0..4){print "\e[".($y+$_).";${x}H"." "x16;}
}
|
Christmas Package Obfuscation
1 direct reply — Read more / Contribute
|
by kschwab
on Dec 08, 2018 at 14:11
|
|
|
#!/usr/bin/perl
$;;$^;s#^#$\
_-~,..___
.-' .--._ ```--.-----.___
._^---- (`-...`-. _/,----. ) ````---=.
_.-'' ````-- `.___.-.) (---=='' .-' |
_.-' _.-. )(`.-._``--.._ .' |
|`---..__ .-'.-'.' )| |_ ``--...`. |
| ``--.._ ,'.-' ( ( `-.`-. .'| : |
| | | --.._`. ) `. `. | : |
| | | ( )-.._.') ) ) : |
| | | | | | ( ( ) : |
| | | (_( | ) ) | : .'
| | | | L/ | : .'
(__ | | | | :.'
`-.._ | | | | :
`-.._ | | | |/
`--`_|_ | .'
`._ | .'
``-.__ | .'
`--`;
# and "Happy Holidays" or Merry Christmas!
print "Is print broken?\n";print;# guess not?
|
perl: we package API -- oneliner
2 direct replies — Read more / Contribute
|
by Discipulus
on Dec 07, 2018 at 07:11
|
|
|
perl -we "package API{$|++;$'__=__PACKAGE__;$\"=','}print/J$__/?exit:q
+q($_\r)for glob qq{{@{[A..P,I]}}}x4"
Note: Win32 double quotes!
Thanks Tux, thanks Eily
L*
PS changed the title from empty API package -- oneliner to the current
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
|
die if lie! fun with Win32
1 direct reply — Read more / Contribute
|
by Discipulus
on Nov 12, 2018 at 05:27
|
|
|
Hello nuns and monks!
I'm not an obfusctor, but as Win32 is obfuscated per se i present you this little lie/truth game
use Win32; exit unless @}; $ms = \&Win32::GetSystemMet
+rics if $^O;
END{ exit if @};while(<DATA>) { s/\s//g ; push @} , jo
+in '', map
{chr (($^O =~ s/\D+//r)+$_)}( $_ =~ /\d{2}/g ) } seek DA
+TA, 0, 0; ;
$s.=$_ for<DATA>;die if !eval $s; system('cls'); print $
+^O,' ', map
{uc $_} substr($} [4], 0, 1 ), substr ($}[0] , 7 , 1), sub
+str( $}[5]
,4,1), substr ($}[8],1,1), $/;} map{die 'lie!' unless($$_[1
+]->($$_[2]
)?6:7 )== Win32::MsgBox($}[$$_ [0]] . "?", 4, $0); }[0, $ms
+,75], [1,
$ms, 91], [2, $ms, 23],[3,$ms, 0x2004], [4,$ms, 67],[5, $ms
+,0x2003];
map { print $}[$$_[0]]. "?\n"; <STDIN> eq $$_[1] ( $$_[2] ).
+"\n" or
die'lie!'}[6,$ms,80],[7,$ms,0], [8,$ms,1]; eval '#!perl' unle
+ss $^O;
__DATA__
777 9 8 5 8 36 9 00 7265 830 08 669 82 847 36 765 760 08 7726
+96 976
77 79 858 36 90 0726 5830072798 27390 7978 84 65 76 00 8772 69
+69 76
7 7 7 98583 69 0 0 66 8 58 4847 97 8830 0658 26900 83 876 58080
+ 6968
73 8 30 08 4 726 90 080 670 073 78 006 8 79 67 756 96 80 077 796
+ 869
74 85 8 3 84006 67 9798 4007378 007 065 7376 1383 6570 69 007779
+6869
89 798 500 808 5840 08 0670 079 78 0 08 37 6 6 58 4 69 0 07 779 6
+869
72798 70077 65788 9007 77 97873 84798283 0068790089798 500726 58
+669
87726584078 3008472690087736884 720079700070738 28384008367 826969
+78
8772658407830084726900726973717 284007970007073 8283840083678269697
+8
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
|
rand ( perl --help )
No replies — Read more | Post response
|
by usemodperl
on Jun 18, 2018 at 19:28
|
|
|
perl -le 'chomp(@_=`perl -h`);($u)=grep/^U/,@_;($r)=grep/^R/,@_;@_=gre
+p/^\s+\-/,@_;$s=$_[int(rand(scalar@_))];for(1..2){system"clear";print
+"\033\[1m$u\033\[0m";print/1/?"\033[5m":"",$s,/1/?"\033[0m":"";print"
+\033\[1m$r\033\[0m";sleep(3)if/1/}'
|
Larry Wall
2 direct replies — Read more / Contribute
|
by usemodperl
on Jun 17, 2018 at 22:19
|
|
|
perl -e '$_=`perl -v`;while(/\d\,(\s\x4c[^\n]+)/){print$1}'
Edit: It prints a lot! If that annoys you try the static version:
perl -le '$_=`perl -v`;if(/\d\,\s(\x4c[^\n]+)/){print$1}'
|
|