Obfuscated Code Contest

This is a discussion on Obfuscated Code Contest within the Contests Board forums, part of the Community Boards category; Cool, This contest is getting interesting. I hope all goes well! P.S. I can't Edit my posts after a while, ...

  1. #16
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    Cool,

    This contest is getting interesting. I hope all goes well!

    P.S. I can't Edit my posts after a while, so anyone that participates in the contest will be added to my signature. Once the contest is over, I will post all the contestants names and of course the winner.


    - Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  2. #17
    System.out.println("");
    Join Date
    Jan 2005
    Posts
    84
    I would like to try and come up with something.

  3. #18
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    How might I go about obfuscating c++ code?? just stick in a bunch of dumb symbols or what?

  4. #19
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    Hello,

    cerin: By obfuscating code, you literally take a normal piece of code and make it harder to understand. Literally by using #define to make code look less presentable with type shortcuts, etc... Maybe this link could help clear some things up.

    Loctan: Sure. Everyone is welcome to join in!


    - Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  5. #20
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    I'm in

  6. #21
    Handy Andy andyhunter's Avatar
    Join Date
    Dec 2004
    Posts
    540
    I'll give it a shot. Sounds like fun.

    Can you intermix languages as long as it can all be compiled by a standard C compiler?
    Last edited by andyhunter; 01-04-2005 at 11:57 PM.
    i don't think most standard compilers support programmers with more than 4 red boxes - Misplaced

    It is my sacred duity to stand in the path of the flood of ignorance and blatant stupidity... - quzah

    Such pointless tricks ceased to be interesting or useful when we came down from the trees and started using higher level languages. - Salem

  7. #22
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    Hello,

    andyhunter: Yes. As long as it works on any C/C++ compiler, i.e. gcc. If you include any special libraries, please state which ones. If you use any special gcc or other compiler flags, please state that also.

    linuxdude: Cool!


    - Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  8. #23
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    Sorry but that doesn't help me much because I c++ and have no programming background. Heh heh, sorry for the trouble.

  9. #24
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    No problem,

    Take for example the following code:
    Code:
    #include <stdio.h>
    
    int v,i,j,k,l,s,a[99];main(){for(scanf("%d",&s);*a-s;v=a[j*=v]-a[i],k=i<
    s,j+=(v=j<s&&(!k&&!!printf(2+"\n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&&++
    l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=0:++a[i])>=s*k&&
    ++a[--i]);printf("\n\n");}
    If I asked you what it does, I would probably get a dumbfounded look. If I told you this program solves the n-queens problem with chessboard output, would you believe me? That is obfuscated code. There is no telling what it does, and it is difficult to reverse engineer such code. This code may be easy to reverse engineer, but in practical size source code I would have to think twice.


    - Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  10. #25
    VOX
    VOX is offline
    Deleting... VOX's Avatar
    Join Date
    Oct 2004
    Location
    VA
    Posts
    94
    Count me in
    Boy you stink, go take a shower before you continue to code. Better do your laundry and spray your chair too.

    The one and only resource for finding information.

    Next version of windows released!!!!

  11. #26
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    the past 28 years of my life have been obfuscated.. does that count for anything towards this contest..
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  12. #27
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    I'm in.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  13. #28
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,171
    I'm in too
    If you understand what you're doing, you're not learning anything.

  14. #29
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    Awesome,

    12 running contestants as of now. Keep 'em rolling! I've received a few submissions already. It's showing promise.

    P.S. I will compile all submissions on Windows, .Net 2003 & Dev-C++ 4.9.9.0, and Linux, gcc / g++ 3.2.2, 3.3.2, and 3.4.2. Red Hat 9, Mandrake 10.0, and FreeBSD 5.3. Good luck!


    - Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  15. #30
    Jez
    Jez is offline
    The C-er
    Join Date
    Mar 2004
    Posts
    192
    I'm up for it too!

    I've never done the obfuscated thing before, but I'll have a crack at it.

Page 2 of 4 FirstFirst 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  2. Seems like correct code, but results are not right...
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 02-13-2003, 01:33 PM
  3. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 06:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21