forked from mame/quine-relay
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
196 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
eval$s=%q(eval(%w(B=92.chr;g=32.chr;puts(eval(%q(N=10.chr;n=0;e=->s{Q[Q[s,B],?"].K(N,B+?n)};E=->s{'("'+e[s]+'")'};d=- | ||
>s,t=?"{s.K(t){t+t}};Q=->s,t=?${s.K(t){B+$&}};M=->s{"<stdio.h>#{N}!t~mX{puts#{E[s]};return~0;}"};V=->s,a,z{s.K(/(#{B* | ||
4})+/){a+"#{$&.size/2}"+z}};$D="program~QR"; %(objec t~QR~ext ends~App{Z#{E[%((display~"#{e[%(Zf~%s~"#{Q[e["Transcr | ||
ipt~show:~'#{d[%(proc~f~{n}~{sJ~rep eat~" Y"~$ n}~; puts~[reK~-all~{.}~"#{V[Q[e[%[!t~mX{sJ~s=#{E[%(with~Ad | ||
a.Text_Io;procedure~qr~is~beg!~Ad a.T e xt_Io.Put_L!e("#{d[%(Z("#{d[%(BEGIN{s=#{E[%(f | ||
={n~as~!t|'Y'*n};a=0;s=#{ V[Q[E [ "#!clude"+M["#!clude<iostream>`n!t~mX{std::cou | ||
t<<#{E[%(class~Program{p ubl ic~static~void~MX{System.Console.Wri | ||
te(#{E[%((doseq[s(lazy- c at["IDENTIFICATION~DIVISION.""PROGRAM | ||
-ID.~QR.""PROCEDURE~DI VISION."'DISPLA`x59](map~#(str | ||
"~~~~^""(.replace%1"^ """^"^"")"^"&")(re-seq~#".{1,45 | ||
}""#{e[%((f=(n)->Arr ay(n+1).jo!~"Y");console.l | ||
og("%s",#{V[E[%((H- l!e"#{e[%(~:~A~."#{g*9}"~;~ | ||
:~B~A~."~WRITE(*, *)'"~A~;~ :~C~B~T`x59PE~."~'"~CR~ | ||
;~:~D~S"~#$D"~C ~S^"~Z~^"(&"~C~S^"~#{e[%( package~ma!;import"fmt"; | ||
func~mX{fmt.Pr !t#{E[%(Z'#{e[("ma!=putStr"+E[%(pr ocedure~mX;i:=c:=0;s:=# | ||
{E[%(.class~ public~QR`n.super~#{$T="java/io/Pr!tStrea m"}`n.method~public~s | ||
tatic~ma!([ L#{S="java/lang/"}SJ;)V~;]`n.limit~stack~2`nge tstatic~#{S}System/o | ||
ut~L#$T;`n ldc~"#{e[%(class~QR{public~static~void~ma!(SJ[]v){ SJ~c[]=new~SJ[8000] | ||
,y="",z=y ,s="#{z=t=(0..r=q=126).map{|n|[n,[]]};a="";b=->n{a<<( n%78+55)%84+42};(% | ||
(@s=glob al[#{i=(s=%(PR~"`x48AI^~1.2~PR~"VISIBLE^~"#{Q["Z"+E[%(al l:`n`t@echo~'#{d[ | ||
Q["l!el :99999;Z#{E[%(.assem bly~t{}.method~static~void~MX{.entrypo !t~ldstr"#{e[%(m: | ||
db`x60# {e[s="$Z#{E[%(Zf#{E[ "require('util').Z#{E["#import"+M["Z_sJ "+E["Zf"+E["Z#{E | ||
[%(say "#{e["#$D(output);be g !~H(#{((p="eval";%($_="#{s=%(<?php~func tion~f($n){retu | ||
rn~str _repeat("Y",$n);};$f ="f ";$z=3+$w=strlen($s=#{V[Q[E["!t~mX{H#{ E["qr:-H('#{Q[e | ||
[%(for ~l ~!#{E[e[d[%(eval$s=% q(#$s ))]]]}.split("Yn"):Z('cat("say~Y"'+l+' Y"Yn")'))],?'] | ||
}')."] };return~0;}"]],"{$f (",")}" ]})*3;echo"^x89PNG^r^n^x1a^n";$m="";$t ="^xc0^0^xff"; | ||
for($i= -1;$i<12 8*$z;$m.=$c--?($w-$c||$i> $z)&&$i/$z<($c | ||
<$w?ord( $s[ (!t)($c/3) ]):$c-- %3+2)?$t[2].$ t[$c%3% 2].$t[$c%3]:"^0^0^0":"^0")$ c=++$i%$z;fore | ||
ach(array ("I`x48DR".pack( "NNCV ",$w+2,128,8,2) ,"IDA T".gzcompress($m),"IEND")as$ d)echo~pack("N | ||
A*N",strlen( $d)-4,$d,crc32($d) );? >);(s+N*(-s.size% 6)) .unpack("B*")[0].K(/.{6}/){n= $&.to_i~2;((n+ | ||
14)/26*6+n+47).chr }}";s|.|$n=ord$ & ;substr~unpack(B8,c h r$n-!t($n/32)*6-41),2|eg;Z~pac k"B*",$_).scan | ||
(/[~,-:A-z]+|(.)/) {p="s++#{$1?"chr ~#{$1.ord}+e":$&+?+}; "+p};p)).K(/.{1,255}/){|s|"'#{s }',"}}'')end." | ||
]}"`nend)]};quit"+ N]]]]}"]})+N]}; " +N]}`x60`nglobal~_s t art`n_start:mov~edx,#{s. s ize}`nmov~ecx, | ||
m`nmov~ebx,1`nmov~ eax,4`n!t~128 `nm ov~ebx,0`nmov~eax ,1` n!t~128)]}"c a l l~void~[msco | ||
rlib]System.Console ::Write(sJ)r et})] };quit();",B],? $].K( ?'){%('" ' " ')}}')].K(/ | ||
[:"]/,":^0"),/[~Y`t ;"(){}`[`] ]/]}"~P R~"`x4bT`x48` x58B`x5 9E~B`x59E)).si z e +1}x~i8]c" | ||
#{s.K(/[^"]/){"^%`x5 8"%$&.ord }}^00"declar e ~ i32@puts( | ||
i8*)def!e~i32@mX{%1= call~i32@puts(i8*gete lementp tr([#{i}x~i8]*@s,i32~0,i3 2~0))ret ~ i 32~0})).b | ||
ytes{|n|r,z=z[n]||(b[ r/78];b[r];q<6083&&z[ n]=[q +=1,[]];t[n])};b[r/78];b[r]}";!t~i = 0 ,n=0,q=0 | ||
;for(;++n<126;)c[n]="" +(char)n;for(;i<s.len gth ();){q=q*78+(s.charAt(i)-13)%84;if(i + +%2>0){y | ||
=q<n?c[q]:y;c[n++]=z+y. charAt(0);System.out. Z (z=c[q]);q=0;}}}})]}"`n!vokevirtual~ # $T/Zln(L | ||
#{S}SJ;)V`nreturn`n.end~ method)+N]};H("DO,1< -#"||*s);s?while~t:=ord(move(1))do{ i +:=1;u: | ||
=-i;every~0to~7do{u:=u*2+ t%2;t/:=2};H("PLEASE ")^(i%4/3);H("DO,1SUB#"||i||"<-#"|| ( (c-u)%2 | ||
56));c:=u;};H("PLEASEREADO UT,1^nPLEASEGIVEUP");end)]).tr(B,?&)]}'.tr('&','YY') ;)]};}) ]}"~DUP | ||
~FOR~S"~&A,&"~C~NE`x58T~S^"~ &A)^",&"~C~0~DO~B~."~&char("~COUNT~.~."~),&'"~CR ~LOOP~S^" ~&^"^"" | ||
~C~S"~end~#$D"~C~A~."~STOP"~C R~A~."~END"~CR~B`x59E~;~D~)]}"))],'#{f(',' )}']}))]}"))["~~~~^ "~^"."" | ||
STOP~RUN."])](Zln(str"#{g*8}"s) ))).tr~B,?`x7e]}.Replace("`x7e","Y") );}})]};}"]]],"$(f("," ))"]}; | ||
for~i~!~range(len(s)):b~as~!t=s[i] ;a-=b;Z(('+'*-a~if~0>a~else' -'*a)+'.');a=b;).tr~B,?` x21]}; | ||
K(/`x21/,"Y",s);Z~s})]}"))]}");end~q r;)]};!t~i,j; Z("module~QR;!itial~beg!~");for(i=0 | ||
;i<s.length;i++){Z("$H(^"~~~");for(j=6;j >=0;j--)Z((s[i]>>j)%2>0?"Yt":"~");Z("Y | ||
nYtYn~~^`");");}Z("$display(^"YnYn^");end~en dmodule");return~0;}].reverse],/[`[`]$]/]," | ||
[f~",?]]}"~^x60.&]k),?']}';cr"]]}")]}"))]};})).gsub (/[!HJKXYZ^`~]/){[B*2,:write,B,:tring,:gsub,"ain() | ||
",B*4,:print,g,:in][$&.ord%47%12]})))*"")#_buffer_for_future_bug_fixes_#_buffer_for_future_bug_fixes_#_buffer_for_fut | ||
###################### Quine Relay -- Copyright (c) 2013 Yusuke Endoh (@mametter), @hirekoke #####################) | ||
eval$s=%q(eval(%w(B=92.chr;g=32.chr;puts(eval(%q(N=10.chr;n=0;e=->s{Q[Q[s,B],?"].K(N,B+?n)};E=->s{'("'+e[s]+'")'};d=->s,t | ||
=?"{s.K(t){t+t}};Q=->s,t=?${s.K(t){B+$&}};M=->s{"<stdio.h>#{N}!t~mX{puts#{E[s]};return~0;}"};V=->s,a,z{s.K(/(#{B*4})+/){a | ||
+"#{$&.size/2}"+z}};$D="program~QR";%(object~Q R~exten ds~App{Z #{E[%((display~"#{e[%(Zf~%s~"#{Q[e["Transcript~show:~'# | ||
{d[%(proc~f~{n}~{sJ~repeat~"Y"~$n}~;p uts~[ reK~ -all ~{.}~"#{V[Q[e[%[!t~mX{sJ~s=#{E[%(with~Ada.Text_Io;proced | ||
ure~qr~is~beg!~Ada.Text_Io.Put_L!e( "#{ d [%(Z("#{d[%(BEGIN{s=#{E[%(f={n~as~!t|'Y'*n};a=0 | ||
;s=#{V[Q[E["#!clude"+M["#!c lude< i ostream>`n!t~mX{std::cout<<#{E[%(class~Program{p | ||
ublic~static~void~MX{Syste m.C onsole.Write(#{E[%((doseq[s(lazy-cat[" | ||
IDENTIFICATION~DIVISION." " PROGRAM-ID.~QR.""PROCEDURE~DIVISION."'D | ||
ISPLA`x59](map~#(str"~~~ ~^""(.replace%1"^"""^"^"")"^"&") | ||
(re-seq~#".{1,45}""#{e[ %((f=(n)->Array(n+1).jo!~"Y");con | ||
sole.log("%s",#{V[E[%( (H-l!e"#{e[%(~:~A~."#{g*9}"~ | ||
;~:~B~A~."~WRITE(*,*) '"~A~;~:~C~B~T`x59PE~."~'"~CR | ||
~;~:~D~S"~#$D"~C~S^ "~Z~^"(&" ~C~S^"~#{e[%(package~ma!; | ||
import"fmt";func~ mX{fmt.Pr!t#{E[%(Z'#{e[(" ma!=putStr"+E[%(procedure~ | ||
mX;i:=c:=0;s:=#{ E[%(.class~public~QR`n.super~#{$T= "java/io/Pr!tStream"}`n.m | ||
ethod~public~s tatic~ma!([L#{S="java/lang/"}SJ;)V~;]`n.l imit~stack~2`ngetstatic | ||
~#{S}System/o ut~L#$T;`nldc~"#{e[%(class~QR{public~static~vo id~ma!(SJ[]v){SJ~c[]=n | ||
ew~SJ[8000], y="",z=y,s="#{z=t=(0..r=q=126).map{|n|[n,[]]};a="" ;b=->n{a<<(n%78+55)%8 | ||
4+42};(%(@s =global[#{i=(s=%(PR~"`x48AI^~1.2~PR~"VISIBLE^~"#{Q["Z "+E[%(all:`n`t@echo~ | ||
'#{d[Q["l! el:99999;Z#{E[%(.assembly~t{}.method~static~void~MX{.ent rypo!t~ldstr"#{e[%( | ||
m:db`x60# {e[s="$Z#{E[%(Zf#{E[ "require('util').Z#{E["#import"+M["Z_s J"+E[%(s=toascii#{E | ||
["Z#{E[%( say"#{e["#$D(output) ;beg!~H(#{((p="eval";%($_="#{s=%(<?php~ function~f($n){ret | ||
urn~str_ repeat("Y",$n);};$f= " f";$z=3+$w=strlen($s=#{V[Q[E["!t~mX{H#{ E["qr:-H('#{Q[e[% | ||
(for~l~! #{E[e[d[%(eval$s=%q( #$s ))]]]}.split("Yn"):Z('cat("say~Y"'+l+' Y"Yn")'))],?']}') | ||
."]};ret ur n~0;}"]],"{$f(",")}" ]})*3 ;echo"^x89PNG^r^n^x1a^n";$m="";$t="^xc 0^0^xff";for($i= | ||
-1;$i<12 8*$z;$m.=$c--?($w-$c ||$i>$z )&&$i/$z<($c<$w?ord($s[(!t)($c/3)]):$c --%3+2)?$t[2].$t | ||
[$c%3%2]. $t[$c%3] :"^0^0^0":"^0")$c=++$i%$z ;foreach(array(" | ||
I`x48DR".p ack ("NNCV",$w +2,128, 8,2),"IDAT".g zcompre ss($m),"IEND")as$d)echo~pac k("NA*N",strlen( | ||
$d)-4,$d,cr c32($d));?>);(s+ N*(-s .size%6)).unpac k("B* ")[0].K(/.{6}/){n=$&.to_i~2; ((n+14)/26*6+n+4 | ||
7).chr}}";s|.| $n=ord$&;substr~un pac k(B8,chr$n-!t($n/ 32) *6-41),2|eg;Z~pack"B*",$_).sc an(/[~,-:A-z]+|( | ||
.)/){p="s++#{$1?"chr ~#{$1.ord}+e":$ & +?+};"+p};p)).K(/.{ 1 ,255}/){|s|"'#{s}',"}}'')end." ]}"`nend)]};quit | ||
"]};t=num2cell(b=11- ceil(s/13));for~ n=1:9m={};for~i=1:141 f=@(x,y,n)repmat(["Ook"~x~"~Ook "~y~32],[1~abs(n | ||
)]);m(i)=[f(z=46,63, n)~f(q=z-(i<13) * 13,q,i-13)~f(33,z,1 ) ~f(63,z,n)];end;t(x)=m(d i ff([0~s(x=b==n)] | ||
)+13);end;Zf(strjo!( t,"")))]]]}"] })+ N]};"+N]}`x60`ngl oba l~_start`n_s t a rt:mov~edx,#{s | ||
.size}`nmov~ecx,m`nmo v~ebx,1`nmov ~eax, 4`n!t~128`nmov~ ebx,0 `nmov~ea x , 1`n!t~128)]}" | ||
call~void~[mscorlib]S ystem.Cons ole::Wr ite(sJ)ret})] };quit( );",B],?$].K(? ' ) {%('"'"')}}' | ||
)].K(/[:"]/,":^0"),/[~ Y`t;"(){} `[`]]/]}"~PR ~ " `x4bT`x48`x | ||
58B`x59E~B`x59E)).size +1}x~i8]c"#{s.K(/[^"] /){"^%` x58"%$&.ord}}^00"declare~ i32@puts ( i 8*)def!e~i3 | ||
2@mX{%1=call~i32@puts(i 8*getelementptr([#{i} x~i8] *@s,i32~0,i32~0))ret~i32~0})).byte s { |n|r,z=z[n | ||
]||(b[r/78];b[r];q<6083& &z[n]=[q+=1,[]];t[n]) };b [r/78];b[r]}";!t~i=0,n=0,q=0;for(;++ n <126;)c[n] | ||
=""+(char)n;for(;i<s.leng th();){q=q*78+(s.char A t(i)-13)%84;if(i++%2>0){y=q<n?c[q]:y ; c[n++]=z+y | ||
.charAt(0);System.out.Z(z= c[q]);q=0;}}}})]}"`n !vokevirtual~#$T/Zln(L#{S}SJ;)V`nre t urn`n.end | ||
~method)+N]};H("DO,1<-#"||* s);s?while~t:=ord(mo ve(1))do{i+:=1;u:=-i;every~0to~7do{ u :=u*2+t%2 | ||
;t/:=2};H("PLEASE")^(i%4/3); H("DO,1SUB#"||i||"<-#"||((c-u)%256));c:=u;};H("PLEAS EREADOU T,1^nPLEA | ||
SEGIVEUP");end)]).tr(B,?&)]}'. tr('&','YY');)]};})]}"~DUP~FOR~S"~&A,&"~C~NE`x58 T~S^"~&A) ^",&"~C~0 | ||
~DO~B~."~&char("~COUNT~.~."~),& '"~CR~LOOP~S^"~&^"^""~C~S"~end~#$D"~C~A~." ~STOP"~CR~A~."~END" ~CR~B`x59 | ||
E~;~D~)]}"))],'#{f(',')}']}))]}") )["~~~~^"~^".""STOP~RUN."])](Zln(str "#{g*8}"s)))).tr~B,?`x 7e]}.Rep | ||
lace("`x7e","Y"));}})]};}"]]],"$(f(" ,"))"]};for~i~!~range(len(s) ):b~as~!t=s[i];a-=b;Z((' +'*-a~if | ||
~0>a~else'-'*a)+'.');a=b;).tr~B,?`x21] };K(/`x21/,"Y ",s);Z~s})]}"))]}");end~qr;)]};!t~i,j | ||
;Z("module~QR;!itial~beg!~");for(i=0;i<s.l ength;i++){Z("$H(^"~~~");for(j=6;j>=0;j- | ||
-)Z((s[i]>>j)%2>0?"Yt":"~");Z("YnYtYn~~^`");") ;}Z("$display(^"YnYn^");end~endmodule");retur | ||
n~0;}].reverse],/[`[`]$]/],"[f~",?]]}"~^x60.&]k),?']} ';cr"]]}")]}"))]};})).gsub(/[!HJKXYZ^`~]/){[B*2,:wri | ||
te,B,:tring,:gsub,"ain()",B*4,:print,g,:in][$&.ord%47%12]})))*"")#_buffer_for_future_bug_fixes_#_buffer_for_future_bug_fi | ||
######################## Quine Relay -- Copyright (c) 2013 Yusuke Endoh (@mametter), @hirekoke #######################) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.