Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Darkhog's challenge: Obfuscated drawing

  1. #11
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    presumably if I do store the image in my code and binary but succeed in obfuscating the fact that I did, then I win some chocolate? The hand drawn image contains very little geometric repetition in which you can really push the boat out in terms of generation, any program that does this would be pretty much be scan-line based with fixed or obfuscated data describing filled blocks etc or otherwise break the image down into the smallest procedurally replicable parts.

    I'd be up for an obfuscation challenge any day or night but if we're going to obfuscate the process of re-constructing an image then it'd be far nicer if that image had interesting structures to replicate.

    Plus an obfuscation challenge is very subjective, what may be indecipherable to one pascal coder might be perfectly fine for the next. Unfortunately the language is a very poor choice for obfuscation as it's strongly typed by design. A lot of the fun of a C obfuscation challenge comes from throwing off the reader with obscure syntax or by deliberately exploiting the non-type safe design blunder of such languages.

    I think it'd be a challenge just to write any obfuscated pascal code, at least in the classical, small code snippet sense. Obfuscation through sheer size (we've all done that ) or macros used to redefine language keywords etc are boring.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  2. #12
    Just out of curiosity i tried to draw some graphics in small executable. I managed to fit the compiled Lazarus exe and source code under 60kb (or actually under 50kb i guess), and it draws a full color pixel map in a WinAPI window.

    Some limitations i noticed, is that simple types like TBitmap is not allowed. It uses interfaces which increases executable size by 1Mb or so. Anyway, it is doable.

    (The only thing i have in uses list is Windows)

    edit: I have finalized my entry. Up to you if i send it as private message or post public. I know it could be obfiscated to remove all line-change characters, but i left it at 137 lines
    Last edited by User137; 26-07-2013 at 03:36 AM.

  3. #13
    Under Darkhog's permission, i'll post my submission in this thread. That is under 50kb when extracted:
    https://www.dropbox.com/s/nk8u6a0bwv...window_obf.zip

  4. #14
    In source you are pretty much storing image in that big string. It isn't allowed.

    You can save steps (e.g. draw line by line), but you can't store image itself. Nice try though.

  5. #15
    Actually i stored line start and end indices, and for black lines only. So isn't that what we describe as steps? And if i compare my data to whole image PNG packed, the PNG is 1703 bytes, and string 2219 bytes. So it is quite compact.

  6. #16
    Ah, okay. If that's so, then it's good.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL