Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Here is a commercial obfuscator

by antirice (Priest)
on Jun 17, 2003 at 08:49 UTC ( #266409=note: print w/ replies, xml ) Need Help??


in reply to Here is a commercial obfuscator

While running around the monastery, I ran into this discussion. Gee willy, a fan-dangled perl auto-obfuscator eh? Hope whatever you obfuscate is running on a mighty powerful server. Have you tried benchmarking any of the code that is created by this thing?

#!/usr/bin/perl =head1 SYNOPSYS A small program that does trivial things. =cut #here is a comment sub doit { my ($v) = @_; print "it's " . ($v + time()) . " seconds since epoch\n"; } doit(2);

Maintainer: Hey! I can read that!

#!/usr/bin/perl =head1 SYNOPSYS A small program that does trivial things. =cut my $SDzEh = q"{7hD$ZAo8eDSD+/FPUl$m0.nZl3l'++hdD)))%1jO)X2P52YT($IJCsM +d+dD))02P52YT($IJCsMdDdWUU);N$IJCsMNi~NYT^272\\/k=dnDJBLRWf+NHpr9.:a +q6Ab3xj7FVt45?8Ei1XSYMcOKvuCZgGm,IQ_U2yPhloTe0wzs^272\\/Eg4JN?D9Gfe2s +YruVqOW6PF1BXh5:LIiKUZbw8nTamQHlovtCx,_yM70A+dRp z=jc3k.S^272\\/;$IJC +sMNiNIEV.($IJCsM);;N};2b3N$IJCsMNiNR^67\\#tVpVeVpTwVpvpgFVpVeVpTmVpYp +YVIeIBYvVpVtVpVtVpVtVppXVVglYtTITeglYtTYTvglYtTVTYglYtTYTTglYtTVTpVVV +pVBVpVtVpVvYXTeIgToIITeToIIIoTTTtVpVmVpYvIeIwIgVpVeVpVeVpVBVppXVVglYt +TpTtVmVpTITY^33\\';$::JBkLsL(.2M(gkbgi2($::JBkxEE0wxE))>hp?3n2((0j01. +2M(gkbgi2($::JBkxVxE)))%y0h)Ygkbgi2($::JBkxEE0hxE))Ngkbgi2($::JBkxEE0 +wxE7E)Ngkbgi2($::JBkxExEE00);L$::JBkLs~Li2^272\\/swNBjVlE+a5oiIWMAgyd +6DY=8nLJ7XKu9hpce.0bGPt?r3_mQOC41,RvzxUk:qFH TZSf^272\\/,5L?0duFVab=s + mG8ZtxQEiPcn.9+YDXrpCIOWNKAkS1lgU4zMhT_yeH3vR7:w6fjo2JBq^272\\/;$::J +BkLsL FdW($::JBk);;L};{KUL$::JBkLsL^33\\'MTTTeVwTpYtTVTpTgTeVeVpVeVpT +mpX^545\\';K$H_cwwKR~K1.^272\\/pgITVwXmFBvYtelo^191\\\";$CLR5 JDJbCHb +k,($CLR5 INpKjIttNt)1bCHbk,($CLR5 ItINpKt)1(x,U(bCHbk,($CLR5 ItIt))>j +7f8,((t=x,U(bCHbk,($CLR5 I9It)))%N32)ybCHbk,($CLR5 INpKNIt));J$CLR5 J +D~Jk,\\/K3qDNXrvd:cPlJfe+2Ysko5CShR6x=ujyBLpZUg9zFHmO,VIaTM?wtE0.8A1_ +4nQW Gi7b\\/EaQ2ykXL_BxcvVn,71rq4:Au3eGzKWTNmdJtDIjMY?9PFbsO.5H+R SZo +wU6ig8hf0=lCp\\/;$CLR5 JDJVZuB($CLR5 );;J};W{dTJ$CLR5 JDJa\"y^80\\/Ip +BoltTvYVgXmFwe^272\\/;K$H_cwwKRKV_TyKQTwaK(^545\\'A*^545\\'h$H_cww);Q +.,W1K=Cfduu$@K,Y$@;$H_cww;} bTVTpglYtTYTTglYtTITgglYtTITTglYtTIIIglYtTIIgglYtTITvglYtTYTTglYtTVTpg +lYtTYTTglYtTITeglYtTIIgglYtX,TITTglYtTITgglYtTVTpglYtTITgglYtTYTpglYt +TIIIglYtTITTglYtTITtglYtTpIoVVpXVpVeVpVeVpTmVpYwVpY^16\\/;$q1dPXQtQPe +dPqO($q1dPXGf,.?GZFA)+PedPqO($q1dPXGf6pAGAf)+(cOD(PedPqO($q1dPXGpGf)) +>fp6=78O((TAYcOD(PedPqO($q1dPXGf6p?Gf)))%ZF6)xPedPqO($q1dPXGf6pTGf))+ +PedPqO($q1dPXGpGf,.?);Q$q1dPXQt~QqO^16\\/DKoqVI6pz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pmSaQ3kZGKD0wElAMCO.vBXeb?r=h7R:Ty6VdqjtP2F41n cUsouiYLI8 +xHf_JWg\\/;$+zgaqxjxNLd1($+zgaq);;x};AYvx$+zgaqxjxQ#^200\\/uWIK2zDqU1 +=xlF6Cn, aMTHY?rpjgOec4o_Qm0fGwtibLXkABdhs.83SN7PZ:9RVv5EJ+y^272\\/If +UD0buwnHSyA5,ECOqY49Z?r8TQxiBeNck_adPmvM3167sp: 2oXF+hK=.RJGtVjLlgWz^ +272\\/;$1OjejDtDVk9z($1Ojej);;D};{80D$1OjejDtDy^135\\\"{r2K$H_cwwKRK^ +545\\'VpYTYgIVVpYXITTvTYITITTtIVTeIITgVpYmVpVtVpIwYeVpVtVpVvYXTeIgToI +ITeToIIIoTTT_^67\\#;$IJCsMNiN2P52YT($IJCsJ^3\\#;$HA4XA B UbjU.T($HA4X +AniO33nu1h)cUbjU.T($HA4XAnhn++)cUbjU.T($HA4XAn++ni+xx)c(FTt(UbjU.T($H +A4XAn++ni))>3xxR:dT((1hgFTt(UbjU.T($HA4XAn3K+3ni)))%3u1)?UbjU.T($HA4X +AniO3ini)); $HA4XA B~ .T^16\\/kKzisN.7_GaOX0DSld2Z3vm?YJPw1L9cyHgUu=r +ntIqjC+F R4VoeM,A5x6WEbpBhf8T:Q^16\\/8:DMngw4y .v5Hba?6PSikB0rqeN2sch +_o3uIWEV7dxQAUO=GpZftlXjR+z1KF,mYJTCL9^16\\/;$HA4XA B 6lGm($HA4XA);; +};0^1\\';$WoUXdL5LxG1xSl($WoUXdcucR22_)0(glz(xG1xSl($WoUXdcR2Pucn))>n +9_qEHl((6nbglz(xG1xSl($WoUXdcRP_2cn)))%R69)?xG1xSl($WoUXdcR22_cn))0xG +1xSl($WoUXdcR2Pucnn2);L$WoUXdL5~LSl^16\\/PW52xZ6OtEKbI4B_FN9SAH1w diY +gav3yrpo=Me+J0RcqUC,z.l7LDGnfXT?:8usjVhmkQ^16\\/QfhK:2,_zsDG7w5MgejUB +89iLHn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($ZAo8eM_MEPKE)tj5bj 6($ZAo8eMEPKPM: +avm);D$ZAo8eDS~D 6/scfT5yJOX87_zgZr,6IvLMnl?9VQ13tHaNDKS: w.qE+ijpW0u +4Cb=GdhPoF2mUkBRYAxe/dE1YXw=9oxcHbar+BIspfn5Dk:_0 SFJWCNzl2VyG.4ZP8?i +TALv,Oqe37RjM6htUQmgKu/;$ZAo8eDSDA81R($ZAo8e);;D};";$SDzEh =~ s/\^([0 +-9]+)/"\\"x$1/eg;$SDzEh =~ tr/R9yzC58DejvhTPkGcia+wZtVWI4U2lXu?QSANxb +s =E1o:gF3OMnH,0q7Bd.frLKYmpJ_6/lQiFMuv _s7yw6:O+N0qDo.VfUWTRX9SBd=eI +Hbht?5aK2jJ4C,gkZLcmApzEPx3G8Yn1r/;eval($SDzEh);

Maintainer: Wtf?!?! So this is what hell looks like. Hmmm, I thought it'd be better somehow.

Well, let's see how fast these little puppies run.

Benchmark: timing 1000 iterations of norm, wtf... norm: 0 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU) @ 12 +8000.00/s(n=1000) wtf: 20 wallclock secs (20.44 usr + 0.01 sys = 20.45 CPU) @ 48 +.91/s (n=1000)

Woah! norm is some blazing code. wtf seems to be...uh...wtf!?!?! 48.91/s to execute what was 4 lines of code. Can't wait to try this on those 500kb scripts and modules that you were talking about.

I can see the reaction after the sales pitch:

Me: So let me get this straight. Anyone who will ever want to read my code again, including myself, will have to spend an eternity trying to break this down. And my spanking fast code will become so slow that I can watch the opcodes go by. How much could such a little gem possibly cost?

You: The low low price of $879 for developers! Some astronomical price for the enterprise edition! And hey, we may give you a t-shirt that says "$879 bought this t-shirt and a nifty program, but I only use one of them"!

Me: Is there a sadomasochist or I-never-want-to-be-hired-again special?

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1


Comment on Re: Here is a commercial obfuscator
Select or Download Code
Re: Re: Here is a commercial obfuscator
by Anonymous Monk on Aug 25, 2003 at 09:16 UTC
    To be fair, you are measuring "startup time" in this sample (and per your figures, it increased by 0.02 sec only). It doesn't matter for serious apps that run more than 3 seconds long (e.g. FastCGI scripts, GUI apps, etc). And if you are worried about startup time, it's possible (according to their documentation) to either disable encoding at all, or lower the number of encoding iterations applied (in your sample, it's 10; you can lower it to e.g. 3).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://266409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (15)
As of 2014-08-01 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (33 votes), past polls