main(a,b){a="main(a,b){a=%c%s%c;b='%c';printf(a,b,a,b,b);}";b='"';printf(a,b,a,b,b);} main(a){a="main(a){a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);} main(a){printf(a="main(a){printf(a=%c%s%c,34,a,34);}",34,a,34);}Only the first version is ASCII independent. The first two are compiler independent. Dario also wrote a hiding siganture programs and a self-printing one in Java.
char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}This has been used by Mike Davis ..!att!ihlpm!jmdavis, and Paul Makepeace.
t c=c++show c;self=s"t c=c++show c;self=s"
% /bin/ksh: /bin/ksh:: not found
main() {char *p,a;printf(p="main() {char *p,a;printf(p=%c%s%c,a='",a='"',p, a);printf(p="%c',p,%ca);printf(p=%c%s%c%c,a,10,a,p,a,10,a,%c%s%c,a,10);}%c" ,a,10,a,p,a,10,a," *** Email: xxxxxxx@xxx.xx *** IRC: Zuikkis *** ",a,10);}
$_=q{$_=q{Q};s/Q/$_/;print};s/Q/$_/;print
import java.text.*;class a{public static void main(String x[]){char b[]={34};char c[]={123};String s[]=new String[3];s[0]="import java.text.*;class a{2}public static void main(String x[]){2}char b[]={2}34};char c[]={2}123};String s[]=new String[3];s[0]={1}{0}{1};s[1]=new String(b);s[2]=new String(c);System.out.println(MessageFormat.format(s[0],s));}}";s[1]=new String(b);s[2]=new String(c);System.out.println(MessageFormat.format(s[0],s));}}He also wrote some in C and a hiding program signature program.
python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"