Tag: 反混淆

理解main的一个不常见的参数

在大学编程竞赛中提出了以下问题。 我们被要求猜测输出和/或解释它的工作原理。 不用说,我们都没有成功。 main(_){write(read(0,&_,1)&&main());} 一些简短的谷歌搜索引导我到这个确切的问题,在codegolf.stackexchange.com中codegolf.stackexchange.com : https://codegolf.stackexchange.com/a/1336/4085 在那里,它解释了它的作用: Reverse stdin and place on stdout ,但不是如何 。 我也在这个问题上找到了一些帮助: 主要的三个参数,以及其他混淆的技巧,但它仍然没有解释main(_) , &_和&&main()工作。 我的问题是,这些语法如何工作? 它们是我应该知道的东西,因为它们仍然相关吗? 如果不是直接的答案,我会感激任何指针(资源链接等)。

如何对2001年IOCCC的获胜者ctk.c代码进行去混淆?

我见过ctk.c混淆代码,但是如何开始对其进行去混淆呢? #include #include #include #include #include #define m(b)a=b;z=*a;while(*++a){y=*a;*a=z;z=y;} #define h(u)G=u<=w[21])exit(0);if(g!=G){struct itimerval t= {0,0,0,0};g+=((g<G)<> 3)+1);setitimer(0,&t,0);f&&printf(“\e[10;%u]”,g+24);}f&&putchar(7);s+=(9-w[21] )*((g>>3)+1);o=p;m(x);m(w);(n=rand())&255||–*w||++*w;if(!(**P&&P++||n&7936)){ while(abs((X=rand()%76)-*x+2)-*w<6);++X;P=T;}(n=rand()&31)<3&&(d=n);!d&&–*x79&&(–*x,–d);signal(i,u);}void e(){signal(14, SIG_IGN);printf(“\e[0q\ecScore: %u\n”,s);system(“stty echo -cbreak”);}int main (int C,char**V){atexit(e);(C<2||*V[1]!=113)&&(f=(C=*(int*)getenv("TERM"))==( int)0x756E696C||C==(int)0x6C696E75);srand(getpid());system("stty -echo cbreak" );h(0);u(14);for(;;)switch(getchar()){case 113:return 0;case 91:case 98:c(44,k =-1);case 32:case 110:c(46,k=0);case 93:case 109:c(47,k=1);c(49,h(0));c(50,h(1 ));c(51,h(2));c(52,h(3));}} http://www.ioccc.org/2001/ctk.hint : This is a game based on an Apple ][ Print Shop Companion easter egg named […]