Skip to main content

Without Cheeting [WORKING]

More
17 years 8 months ago #16104 by Smurf
nnbnbThought i would start a new thread as the other one just didn't work properly and saves going through all the issues with it before i got it to work. If you don't have a compiler and would like to see the output let me know and i will post a screen shot

Ok,

Since there are some programmers in here (not me I'm affraid, did it at Uni and thought it would drive me up the wall doing it day in day out, lol), I thought I would share some code that I picked up at Uni.

Its quite simple, WITHOUT compiling it, can anyone tell me what this C code does ? (Apparently it won a competition some time ago for the most unreadible code, or something like that).

If you do want to compile it (don't post what it does for a week or so incase anyone is mad enough to try and work it out), how does it work (never bothered to try and understand it myself but if anyone else wants to and try to explain it then, go ahead, hehe)

DEFINATELY COMPILES NOW

The code is here www.onlineweblinks.com/upload/enigma.txt

For some reason it will not work if i post the code directly into this thread.

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
17 years 8 months ago #16106 by Smurf
I should attach a WARNING to this, lol, it could drive you insane trying to understand the code

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
17 years 7 months ago #16736 by Starfire
From my old uni programming days as well, I think it has something to do with regular expressions (unix 'sed'/'awk' like)

Regular expressions can be very very powerfull programming tools in any language. One /. can do amazing things but looking at that lot there is no way I am even going to attempt to try figure it out.
See www.regular-expressions.info/ or other sources.

There is a story a lecturer once told us that is relevent to that mangled mess of characters you want someone to figure out to do with one of the Saturn/Jupiter probes many years ago.

The flight path was to check out one planet then carry on going and swing off another planet and bounce off another to get to it's destination orbit. It managed the first few hops but then flew off at a tangent and was never seen again.

Upon analysis of the code many years later they found that the fault had been caused by a ";" being used instead of a "." ....

Debugging Regular Expressions can be a bit like that.

PS: You may not be able to paste it straight into the thread because regular expressions are language independant including within HTML I would expect.
More
17 years 7 months ago #16737 by Arani
Replied by Arani on topic smurft ...recollect anything?
hi,
smurf, does that remind you of anything, that we did on the forum regarding that gibberish code??!??!?!?! :D
the code when compiled and run from the command line displays the famouse song:
"on the first day of christmas my true love gave to me..." and so on and so forth.
it's the mother of all recursions, i lost three nights worth of sleep over it, and managed only half of the code being deciphered.
better luck in my next birth probably :wink:

Picking pebbles on the shore of the networking ocean
More
17 years 7 months ago #16741 by Smurf
hehe, i did get the code from my Uni days, i lost some sleep over it and then thought life was too short :lol:

Would be good to understand how it worked though, just got bored with programming after Uni and shifted to networking instead. Should really pick it back up again when i have time in order to start looking more at the Ethical Hacking stuff since i now want to shift to the Security sector (if someone will employ me in that field, hehe)

Cheers

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
17 years 7 months ago #16748 by Starfire
Look at .net languages like c# and assembly too. With your uni structured programming background (I still moan about Pascal) it will be like riding a bike.

With your background in networking, you could produce some usefull stuff to help track the critters down.
Time to create page: 0.150 seconds