看板 NTUGIEE_EDA 關於我們 聯絡資訊
※ 引述《yellowfishie (喵喵喵喵~~~)》之銘言: : 有沒有人有興趣把程式轉成讓人看不懂(不容易看懂), : 但卻可以正確執行的? : 就是把有意義的變數/函數名稱 : 轉成無意義的變數/函數名稱 (如 sum => xxx, answer => xxxx) : 例如: : int main() : { : int s = sum(100); : return s; : } : int sum(int upper_bound) : { : int answer = 0; : for (int i = 1; i <= upper_bound; i++) : { answer += i; } : return answer; : } : 轉成: : int main() : { : int Xx = xXx(100); : return Xx; : } : int xXx(int xXXx) : { : int xxxXx = 0; : for (int x = 1; x <= xXXx; x++) : { xxxXx += x; } : return xxxXx; : } : 看起來用 lex 加亂數就可以達到。 : 多的額外功能: 建一個 symbol table, 進行加密/解密。 這是去年其中一個範例,hoyle.c,可以畫出 y = x^2 的圖形: #include <stdio.h> #include <stdlib.h> #include <math.h> #define _ ;double #define void x,x #define case(break,default) break[O]:default[O]: #define switch(bool) ;for(;x<bool; #define do(if,else) inIine(else)>int##if? #define true (--void++) #define false (++void--) char*O=" <60>!?\\\n"_ doubIe[010]_ int0,int1 _ Iong=0 _ inIine(int eIse){int O1O=!O _ l=!O;for(;O1O<010;++O1O)l+=(O1O[doubIe]*pow(eIse,O1O));return l;}int main(int booI,char*eIse[]){int I=1,x=-*O;if(eIse){for(;I<010+1;I++)I[doubIe-1] =booI>I?atof(I[eIse]):!O switch(*O)x++)abs(inIine(x))>Iong&&(Iong=abs(inIine(x )));int1=Iong;main(-*O>>1,0);}else{if(booI<*O>>1){int0=int1;int1=int0-2*Iong/0 [O]switch(5[O]))putchar(x-*O?(int0>=inIine(x)&&do(1,x)do(0,true)do(0,false) case(2,1)do(1,true)do(0,false)6[O]case(-3,6)do(0,false)6[O]-3[O]:do(1,false) case(5,4)x?booI?0:6[O]:7[O])+*O:8[O]),x++;main(++booI,0);}}} -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.5.65