From: "Erik Itter" Newsgroups: alt.ascii-art Subject: ASCII art from sourcecode as image Date: Tue, 15 Jul 2003 21:52:57 +0200 Organization: T-Online Lines: 15 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 1058298599 03 12507 aWwBVDbbSyAGQ6 030715 19:49:59 X-Complaints-To: usenet-abuse@t-online.de X-ID: TJ1ba2ZOoe1v2jh8NYUrv8uJCYjozHYoqJqVkDMTGZQSkNIfR6EsZy X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!switch.ch!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail Xref: chonsp.franklin.ch alt.ascii-art:36298 I have seen both linux source codes and some scripts for my company rendered as images - reads formated with extra blanks line feeds etc. to look like some image if displayed using small enough letters. (without inserting/deleting anything changing the source from the compilers point of view) I am sure there has to be some converter to do that source2asciiArt conversion using a given image as formating mask but i cannot find such a tool. Where are they??? plz help erik ###### From: "Arthur J. O'Dwyer" Newsgroups: alt.ascii-art Subject: Re: ASCII art from sourcecode as image Date: Tue, 15 Jul 2003 17:05:21 -0400 (EDT) Organization: Carnegie Mellon, Pittsburgh, PA Lines: 38 Message-ID: References: NNTP-Posting-Host: smtp5.andrew.cmu.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: bb3.andrew.cmu.edu 1058303122 21166 128.2.10.85 (15 Jul 2003 21:05:22 GMT) X-Complaints-To: advisor@andrew.cmu.edu NNTP-Posting-Date: 15 Jul 2003 21:05:22 GMT In-Reply-To: Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!switch.ch!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.online.be!news-hog.berkeley.edu!ucberkeley!newsfeed.srv.cs.cmu.edu!bb3.andrew.cmu.edu!lmtp2nntp!not-for-mail Xref: chonsp.franklin.ch alt.ascii-art:36292 On Tue, 15 Jul 2003, Erik Itter wrote: > > I have seen both linux source codes and some scripts for my company rendered > as images - reads formated with extra blanks line feeds etc. to look like > some image if displayed using small enough letters. (without > inserting/deleting anything changing the source from the compilers point of > view) > > I am sure there has to be some converter to do that source2asciiArt > conversion using a given image as formating mask but i cannot find such a > tool. Where are they??? Not only do you have to know the "formatting mask", you also have to know the formatting rules of the language you're using. For example, in C and C++ you can't add whitespace in the middle of an identifier, or in the middle of a multi-character operator like -> or ++. A program would have to have a list of "atomic symbols" like '++' and 'if' that could *never* be changed, and probably a list of "identifiers" like 'count' and 'foobaz' that *could* be changed, as long as they were changed everywhere. Ditto rules about comments (both single-line and delimited varieties). It would be a nice programming exercise to write a very simple "formatter" in this vein; you might even try it yourself, if you know a programming language. To create a generic "formatter" taking into consideration everything I said above: that would be really challenging, IMO. -Arthur ObAscii: terribly un-ergonomic monitor-keyboard setup _/\ _- \\ --\ \\-----. /-_ \ _\\ _ `. / -_ \.-'\ -~-\#c_ `. / ~~~~~~ ~~~~ `. / `. ###### Newsgroups: alt.ascii-art From: Faux_Pseudo Subject: Re: ASCII art from sourcecode as image References: Reply-To: Faux_Pseudo@yahoo.comERCIAL X-PGP-Server: wwwkey.nl.pgp.net X-Why: are you reading this? X-PGP-KeyID: CF4DA06B Message-ID: User-Agent: slrn/0.9.7.4 (Linux) Lines: 20 Date: Tue, 15 Jul 2003 21:14:05 GMT NNTP-Posting-Host: 68.107.106.56 X-Complaints-To: abuse@cox.net X-Trace: fed1read01 1058303645 68.107.106.56 (Tue, 15 Jul 2003 17:14:05 EDT) NNTP-Posting-Date: Tue, 15 Jul 2003 17:14:05 EDT Organization: Cox Communications Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!switch.ch!news.imp.ch!news.imp.ch!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!cyclone1.gnilink.net!central.cox.net!east.cox.net!cox.net!p01!fed1read01.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.ascii-art:36301 _.--- Erik Itter spoke in alt.ascii-art --------._ > I have seen both linux source codes and some scripts for my company rendered > as images - reads formated with extra blanks line feeds etc. You might want to have a look at It may take a little while but you will find some nice ones like this: > I am sure there has to be some converter to do that source2asciiArt > conversion Not that I am aware of. Last I checked it is all done by hand. '---...____ Faux_Pseudo ________________...---~~~ -- ICQ=66618055 : http://asciipr0n.com/fp UPDATED=05/06 YIM=faux_pseudo : Rev: 2/anthrax/killer_as/02_-_Only.mp3 These 34 bytes : Now: /01_-_bud_e._luvbomb_and_satan's_lounge_band.mp3 Are up for sale : Fwd: de_-_walking_in_london_-_06_-_city_screaming.mp3 ###### Newsgroups: alt.ascii-art From: Harry Mason Subject: Re: ASCII art from sourcecode as image References: Message-ID: User-Agent: slrn/0.9.7.4 (Linux) NNTP-Posting-Host: tarrant.ecs.soton.ac.uk Date: 16 Jul 2003 08:07:44 GMT X-Trace: 16 Jul 2003 08:07:44 GMT, tarrant.ecs.soton.ac.uk Lines: 61 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!switch.ch!news.imp.ch!news.imp.ch!zen.net.uk!213.253.16.105.MISMATCH!mephistopheles.news.clara.net!news.clara.net!server3.netnews.ja.net!news-spool.soton.ac.uk!news.ecs.soton.ac.uk!tarrant.ecs.soton.ac.uk Xref: chonsp.franklin.ch alt.ascii-art:36290 Erik Itter wrote: > I have seen both linux source codes and some scripts for my company rendered > as images - reads formated with extra blanks line feeds etc. to look like > some image if displayed using small enough letters. (without > inserting/deleting anything changing the source from the compilers point of > view) For perl there is Acme::EyeDrops. It doesn't just format the program, it obfuscates it too. -- 8< -- cut here -- >8 -- #!/usr/bin/perl -w eval eval '"'. ('#'). '!'.'/' .('[' ^'.' ) .('['^'('). ("\["^ ')')."\/".( '`'|'"').('`'| ')').( '`'|'.') .'/'. ( '['^'+').('`'|'%').('[' ^')').('`'|',').('{' ^'[').'-'.('['^',').('!' ^'+').('['^'.').('['^ '(').('`'|'%').('{'^('[')).( '['^'(').('['^'/').( '['^')').('`'|')').('`'|'#').("\["^ ('/')). ';'.('!'^'+').('['^'+').('['^"\)").( '`'|')').('`'|'.').('['^'/').('{'^'[').'\\'.'"'.('`'|'(').( '`'|'%').('`'|',').('`'|',').('`'|'/').','.('{'^'[').('['^',' ).('`'|'/').('['^')').('`'|',').('`'|'$').'\\'.'\\'.('`'|"\."). '\\'.'"'.';'.('!'^'+').'"';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/= '`'|'.';$_='('^'}';$,='`'|'!';$\=')'^'}';$:='.'^'~';$~='@'|'('; $^=')'^'[';$/='`'|'.';$_='('^'}';$,='`'|'!';$\=')'^'}';$:="\."^ '~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}';$,='`'|('!');$\= ')'^'}';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}'; $,='`'|'!';$\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')'^'[' ;($/)= '`'|'.';$_='('^'}';$,='`'|'!';$\=')'^'}';$:='.'^'~'; ($~)= '@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}';$,=('`')| "\!"; $\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')' ^'[';$/= '`'| (( '.'));$_='('^'}';$,='`'|"\!";$\= ')'^'}'; ($:) ='.'^"\~"; $~='@'|'(' ;$^=')'^ '[';$/= '`' |('.');$_= '('^'}';$, ='`'|'!' ;$\=')' ^+ "\}";$:= '.'^'~';$~ =('@')| '(';$^ =')'^'[' ;$/=('`')| '.';$_= "\("^ '}';$,= '`'|'!';$\ ="\)"^ '}';$: =('.')^ "\~";$~= ('@')| "\("; $^=')' ^"\["; $/='`' |'.'; ($_)= ('(')^ '}';$, ='`'| "\!"; $\=')'^ '}';$: ='.' ^'~'; $~='@'|'(' ;$^= ')'^ "\[";$/= '`'| '.'; $_=('(')^ '}'; ($,) ='`'|'!';$\ =')'^ "\}"; $:='.'^'~';$~= ('@')| "\("; $^="\)"^ '['; $/='`'| '.';$_= '('^'}'; $,="\`"| '!';#; -- 8< -- cut here -- >8 -- -- | Harry Mason | .------------. | .___, |"Whatever you do will be | | University of | | hjm200 @ | | ___('v')___ | insignificant. However, | | Southampton | | zepler.net | | `"-\._./-"' | it is vitally important | | England | '------------' | hjm ^ ^ | that you do it." Gandhi | ###### From: "Arthur J. O'Dwyer" Newsgroups: alt.ascii-art Subject: Re: ASCII art from sourcecode as image Date: Wed, 16 Jul 2003 09:13:32 -0400 (EDT) Organization: Carnegie Mellon, Pittsburgh, PA Lines: 40 Message-ID: References: NNTP-Posting-Host: smtp5.andrew.cmu.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: bb3.andrew.cmu.edu 1058361212 12586 128.2.10.85 (16 Jul 2003 13:13:32 GMT) X-Complaints-To: advisor@andrew.cmu.edu NNTP-Posting-Date: 16 Jul 2003 13:13:32 GMT In-Reply-To: Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!switch.ch!news.imp.ch!news.imp.ch!snoopy.risq.qc.ca!cyclone.bc.net!logbridge.uoregon.edu!usenet01.sei.cmu.edu!bb3.andrew.cmu.edu!lmtp2nntp!not-for-mail Xref: chonsp.franklin.ch alt.ascii-art:36291 On Wed, 16 Jul 2003, Harry Mason wrote: > > Erik Itter wrote: > > I have seen both linux source codes and some scripts for my company rendered > > as images - reads formated with extra blanks line feeds etc. to look like > > some image if displayed using small enough letters. (without > > inserting/deleting anything changing the source from the compilers point of > > view) > > For perl there is Acme::EyeDrops. It doesn't just format the program, it > obfuscates it too. > #!/usr/bin/perl -w > eval eval '"'. ('#'). > '!'.'/' .('[' > ^'.' ) .('['^'('). ("\["^ > ')')."\/".( '`'|'"').('`'| ')').( > '`'|'.') .'/'. ( '['^'+').('`'|'%').('[' > ^')').('`'|',').('{' ^'[').'-'.('['^',').('!' > "\}"; $:='.'^'~';$~= ('@')| > "\("; $^="\)"^ '['; $/='`'| > '.';$_= '('^'}'; > $,="\`"| '!';#; Very nice! The OP has told me via e-mail that he really wants Java, of course. So unfortunately the 'eval big_long_string' trick that I think is at the root of EyeDrops' approach wouldn't work. Out of curiosity: Why *two* nested 'eval's at the start of this program? And what does ('['^'.') mean? 0x5B^0x2E = 0x75 = 'u', or is there some deeper magic at work here? :) -Arthur __ __ _ . \-' \-_ \<_ \_ -------------- ###### Reply-To: "BoD" From: "BoD" Newsgroups: alt.ascii-art References: Subject: Re: ASCII art from sourcecode as image Date: Wed, 16 Jul 2003 16:24:26 +0200 Organization: BoD inc. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Lines: 7 Message-ID: <3f15600a$0$10830$626a54ce@news.free.fr> NNTP-Posting-Date: 16 Jul 2003 16:24:11 MEST NNTP-Posting-Host: 195.132.84.232 X-Trace: 1058365451 news2-1.free.fr 10830 195.132.84.232:1169 X-Complaints-To: abuse@proxad.net Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!feed.news.nacamar.de!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!feeder2-1.proxad.net!news2-1.free.fr!not-for-mail Xref: chonsp.franklin.ch alt.ascii-art:36296 my god... Now I remember why I don't do perl :) BoD ###### Newsgroups: alt.ascii-art From: Harry Mason Subject: Re: ASCII art from sourcecode as image References: Message-ID: User-Agent: slrn/0.9.7.4 (Linux) NNTP-Posting-Host: prodigy.ecs.soton.ac.uk Date: 17 Jul 2003 16:04:23 GMT X-Trace: 17 Jul 2003 16:04:23 GMT, prodigy.ecs.soton.ac.uk Lines: 49 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!switch.ch!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!213.253.16.105.MISMATCH!mephistopheles.news.clara.net!news.clara.net!server3.netnews.ja.net!news-spool.soton.ac.uk!news.ecs.soton.ac.uk!prodigy.ecs.soton.ac.uk Xref: chonsp.franklin.ch alt.ascii-art:36311 Arthur J. O'Dwyer wrote: > > On Wed, 16 Jul 2003, Harry Mason wrote: >> >> Erik Itter wrote: >> > I have seen both linux source codes and some scripts for my company >> > rendered as images - reads formated with extra blanks line feeds etc. to >> > look like some image if displayed using small enough letters. (without >> > inserting/deleting anything changing the source from the compilers point >> > of view) >> >> For perl there is Acme::EyeDrops. It doesn't just format the program, it >> obfuscates it too. > >> #!/usr/bin/perl -w >> eval eval '"'. ('#'). >> '!'.'/' .('[' > > > The OP has told me via e-mail that he really wants Java, of course. > So unfortunately the 'eval big_long_string' trick that I think is > at the root of EyeDrops' approach wouldn't work. Bear in mind that this is actually an obfuscator, not just a reformatter. You could achieve a similar effect in most languages, including Java, by creative use of white space, string concatenation, etc. > Out of curiosity: Why *two* nested 'eval's at the start of this program? The inner "eval" constructs the text of the original program. You can see this if you replace the outer "eval" with "print": #!/usr/bin/perl -w use strict; print "hello, world\n"; which is the original source code. > And what does ('['^'.') mean? 0x5B^0x2E = 0x75 = 'u', or is there some > deeper magic at work here? :) ('['^'.') corresponds to the "u" in "use strict". Obfuscating is so much more effective if you don't use any alphanumerics in your source code. :) -- | Harry Mason | .------------. | .___, |"Whatever you do will be | | University of | | hjm200 @ | | ___('v')___ | insignificant. However, | | Southampton | | zepler.net | | `"-\._./-"' | it is vitally important | | England | '------------' | hjm ^ ^ | that you do it." Gandhi | ###### From: "Arthur J. O'Dwyer" Newsgroups: alt.ascii-art Subject: Re: ASCII art from sourcecode as image Date: Thu, 17 Jul 2003 16:20:29 -0400 (EDT) Organization: Carnegie Mellon, Pittsburgh, PA Lines: 48 Message-ID: References: NNTP-Posting-Host: smtp7.andrew.cmu.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: bb3.andrew.cmu.edu 1058473230 20670 128.2.10.87 (17 Jul 2003 20:20:30 GMT) X-Complaints-To: advisor@andrew.cmu.edu NNTP-Posting-Date: 17 Jul 2003 20:20:30 GMT In-Reply-To: Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!switch.ch!newsfeed00.sul.t-online.de!t-online.de!nntp-relay.ihug.net!ihug.co.nz!logbridge.uoregon.edu!usenet01.sei.cmu.edu!bb3.andrew.cmu.edu!lmtp2nntp!not-for-mail Xref: chonsp.franklin.ch alt.ascii-art:36310 On Thu, 17 Jul 2003, Harry Mason wrote: > > Arthur J. O'Dwyer wrote: > > On Wed, 16 Jul 2003, Harry Mason wrote: > >> #!/usr/bin/perl -w > >> eval eval '"'. ('#'). > >> '!'.'/' .('[' > > > > > > The OP has told me via e-mail that he really wants Java, of course. > > So unfortunately the 'eval big_long_string' trick that I think is > > at the root of EyeDrops' approach wouldn't work. > > Bear in mind that this is actually an obfuscator, not just a reformatter. > You could achieve a similar effect in most languages, including Java, by > creative use of white space, string concatenation, etc. Certainly not in C or C++, and not in the vanilla beginner's Java I'm familiar with. They don't have any equivalent of "eval", unless you build your own interpreter on top of everything. :) > > Out of curiosity: Why *two* nested 'eval's at the start of this program? > > The inner "eval" constructs the text of the original program. You can see > this if you replace the outer "eval" with "print": > > #!/usr/bin/perl -w > use strict; > print "hello, world\n"; > > which is the original source code. Aha. [I certainly wouldn't've run that random Perl program on *my* machine! ;-)] > > And what does ('['^'.') mean? 0x5B^0x2E = 0x75 = 'u', or is there some > > deeper magic at work here? :) > > ('['^'.') corresponds to the "u" in "use strict". Obfuscating is so much more > effective if you don't use any alphanumerics in your source code. :) Yeah - but does Perl specify ASCII? And in a language where x is an operator, I wasn't sure but that ^ meant something even weirder for strings... -Arthur