• Facepunch Obfuscation Challenge
    109 replies, posted
[QUOTE=Icedshot;44842035]I submitted a code entry to you, but facepunch is being buggy as fuck. Can you let me know if it got through?[/QUOTE] Yep, I got yours.
Did you upload a white rectangle to Imgur so you could indent the bullet points?
[QUOTE=nos217;44843824]Did you upload a white rectangle to Imgur so you could indent the bullet points?[/QUOTE] [img]http://i.imgur.com/LGxkqEY.png[/img][img]http://i.imgur.com/LGxkqEY.png[/img][img]http://i.imgur.com/LGxkqEY.png[/img][img]http://i.imgur.com/LGxkqEY.png[/img][img]http://i.imgur.com/LGxkqEY.png[/img][img]http://i.imgur.com/LGxkqEY.png[/img][img]http://i.imgur.com/LGxkqEY.png[/img][img]http://i.imgur.com/LGxkqEY.png[/img]Yes.
I've collected everyone's entries [url=http://fpcomp.github.io/pages/deobf1.html]here[/url]. Sure, some of them might take ages to run, and one might only work with 16 bit numbers, and one I can't get to compile because it's in APL, but fuck it, I'm going to allow it. It's time for analysis. Also, pentium owes benjojo $5.
[QUOTE=supersnail11;44845082]I've collected everyone's entries [url=http://fpcomp.github.io/pages/deobf1.html]here[/url]. Sure, some of them might take ages to run, and one might only work with 16 bit numbers, and one I can't get to compile because it's in APL, but fuck it, I'm going to allow it. It's time for analysis. Also, pentium owes benjojo $5.[/QUOTE] Forgetting something?
[QUOTE=CarLuver69;44845392]Forgetting something?[/QUOTE] Woops :v: [editline]18th May 2014[/editline] Added
[QUOTE=supersnail11;44845409]Woops :v: [editline]18th May 2014[/editline] Added[/QUOTE] Thanks, Andrew! [code]file:///C:/Users/Andrew/Downloads/FPObfuscationComp.zip[/code] Oh wait...:v:
-ninja'd-
[QUOTE=CarLuver69;44845465]Thanks, Andrew! [code]file:///C:/Users/Andrew/Downloads/FPObfuscationComp.zip[/code] Oh wait...:v:[/QUOTE] ffs [editline]18th May 2014[/editline] Actually fixed this time :v:
There's a note under mine saying it's really slow. Were you compiling it under windows? If yes then idk, it might be. It's just tested on ubuntu 12.10 with gnu99 c.
[QUOTE=cartman300;44845637]There's a note under mine saying it's really slow. Were you compiling it under windows? If yes then idk, it might be. It's just tested on ubuntu 12.10 with gnu99 c.[/QUOTE] For me, on Windows 8 64-bit using GCC 4.8.1, it wouldn't even tell me if 11 was prime :v:
[QUOTE=supersnail11;44845838]For me, on Windows 8 64-bit using GCC 4.8.1, it wouldn't even tell me if 11 was prime :v:[/QUOTE] 4.8.1 on Linux x86-64, fast enough for 11 regardless of optimisations.
[QUOTE=DrTaxi;44845864]4.8.1 on Linux x86-64, fast enough for 11 regardless of optimisations.[/QUOTE] Well, I said that it has to work on one of the three, so it's a valid entry.
I'm seeing quite a few #defines that are obviously meant to throw off your eyes but you can just run the preprocessor without compiling so they don't achieve anything, do they?
Can we post our analysis in the thread? Also shouts out to Simspelaaja. I love yours so much. [editline]19th May 2014[/editline] Also general proof that mine actually works (From a trust worthy source no less!) [media]http://www.youtube.com/watch?v=hyMmjz1KI80[/media]
[QUOTE=benjojo;44846918]Can we post our analysis in the thread?[/QUOTE] The point is so that multiple people can get points for analyzing one person's program. So posting it in the thread would let people cheat.
[QUOTE=sambooo;44846484]I'm seeing quite a few #defines that are obviously meant to throw off your eyes but you can just run the preprocessor without compiling so they don't achieve anything, do they?[/QUOTE] Mine are compression. [editline]19th May 2014[/editline] Not gonna name names but some programs think some numbers are prime when they're not and vice versa.
[QUOTE=Jookia;44847698]Mine are compression. [editline]19th May 2014[/editline] Not gonna name names but some programs think some numbers are prime when they're not and vice versa.[/QUOTE] If a program is invalid, unless its a simple fix that doesn't really alter the spirit of the code much, they should probably get disqualified Also, does anyone else think we should have a code length limit in the future? It'd make the programs try to be more about being clever in a limited amount of space
Half way coding mine I forgot how it works. so uh; have fun!
How come cartman300's one got in seeing as it doesn't read from stdin?
[QUOTE=Jookia;44871282]How come cartman300's one got in seeing as it doesn't read from stdin?[/QUOTE] jamie1130's does not either just to note
[QUOTE=Jookia;44871282]How come cartman300's one got in seeing as it doesn't read from stdin?[/QUOTE] What? It does read from stdin?
[QUOTE=benjojo;44871840]jamie1130's does not either just to note[/QUOTE] [code]$ echo 11 | jamieh prime $ echo 12 | jamieh not prime[/code]
[QUOTE=cartman300;44872126]What? It does read from stdin?[/QUOTE] [cpp]#include <stdio.h> #include <unistd.h> void* ___ = " ENTRUMB:NOTPRIME\n%d"; int main (int argc, char *argv[]) { void* __; int* ______; int _______; void (*____)(void*, void*, int) = (void (*)(void*, void*, int))write; void (*_)(void*, void*) = (void (*)(void*, void*))scanf; asm volatile("jmp pn; np: nop"); ____(0, ___ + 9, 3); ____(0, ___, 1); asm volatile("p:"); ____(0, ___ + 12, 6); asm volatile("pn:"); __ = &__; ______ = (int*)__; _______ = _______; ____(0, ___ + 1, 3); ____(0, ___ + 1, 1); ____(0, ___ + 4, 1); ____(0, ___, 1); ____(0, ___ + 2, 1); ____(0, ___ + 5, 3); ____(0, ___ + 1, 1); ____(0, ___ + 4, 1); ____(0, ___ + 8, 1); ____(0, ___, 1); _(___ + 18, __); if (~((~(*______ - 0x2)) >> 31) & 0x1) { asm volatile("jmp np"); }{ *______ = (*______ + (*______ >> sizeof(int) * 8 - 1)) ^ (*______ >> sizeof(int) * 8 - 1); for (_______ = 3; _______*_______ <= 20;_______++); for (_______ = 2; _______*_______ <= *______;_______++) if(*______%_______ == 0) asm volatile("jmp np"); } asm volatile("jmp p"); return 0; }[/cpp] [code][jookia@jookia-arch todo]% gcc cartman300.c [jookia@jookia-arch todo]% echo 123 | ./a.out ^C [jookia@jookia-arch todo]% ./a.out ENTER NUMBER: 123 NOT PRIME ENTER NUMBER: 456 NOT PRIME ENTER NUMBER: ^C[/code] I have a feeling supernail hasn't even run your program considering it doesn't abide to the actual rules and he wrote "This is really slow, so I'm not even sure if it works - but I'll include it anyways."
[QUOTE=Jookia;44872950]I have a feeling supernail hasn't even run your program considering it doesn't abide to the actual rules and he wrote "This is really slow, so I'm not even sure if it works - but I'll include it anyways."[/QUOTE] If I run his program, it just hangs, but since it's confirmed working on Linux I can't really disqualify him since the rules say it's OK to work on just one of the three. And he's right, it [i]does[/i] read from stdin, though not in the way I posted in the OP. So, technically, it does follow the rules (though I guess I need to make them more specific next time). I think his program waits for an enter key to be pressed, which is why piping it doesn't work (but I'm not entirely sure, someone might want to confirm this).
[QUOTE=supersnail11;44873786]If I run his program, it just hangs, but since it's confirmed working on Linux I can't really disqualify him since the rules say it's OK to work on just one of the three. And he's right, it [i]does[/i] read from stdin, though not in the way I posted in the OP. So, technically, it does follow the rules (though I guess I need to make them more specific next time). I think his program waits for an enter key to be pressed, which is why piping it doesn't work (but I'm not entirely sure, someone might want to confirm this).[/QUOTE] I'm on Linux. The rules are pretty clear that you should be able to pipe it in via stdin, though?
Why does it even matter?
[QUOTE=Jookia;44873937]I'm on Linux. The rules are pretty clear that you should be able to pipe it in via stdin, though?[/QUOTE] It says: [quote]You will be provided a random large integer, via stdin.[/quote] However, as reevezy says, the goal is obfuscation, not "who can take input via stdin the best." I'm not going to disqualify an entry for something so trivial.
[QUOTE=supersnail11;44874148]It says: However, as reevezy says, the goal is obfuscation, not "who can take input via stdin the best." I'm not going to disqualify an entry for something so trivial.[/QUOTE] 'You will be provided' is not the same as 'You will solicit', and there's an explicit example: [code]$ echo 11 | prime prime $ echo 122 | prime not prime[/code] The program doesn't abide by this, it also loops. Not only that, but when provided with input it flat out doesn't work. It can't be automated so I can't test that my changes don't cause regressions when I go through the math by generating outputs and comparing them to previous outputs. It's not helpful. That said, I don't want it disqualified. I didn't say that or even suggest it. I'm just wondering how it got in in the first place seeing as its behaviour is broken and doesn't even pass the example.
[QUOTE=Jookia;44874214]'You will be provided' is not the same as 'You will solicit', and there's an explicit example: [code]$ echo 11 | prime prime $ echo 122 | prime not prime[/code] The program doesn't abide by this, it also loops. Not only that, but when provided with input it flat out doesn't work. It can't be automated so I can't test that my changes don't cause regressions when I go through the math by generating outputs and comparing them to previous outputs. It's not helpful. That said, I don't want it disqualified. I didn't say that or even suggest it. I'm just wondering how it got in in the first place seeing as its behaviour is broken and doesn't even pass the example.[/QUOTE] Half because I can't test it and half because I don't want to disqualify anyone because I absolutely have to. (Although "provided with" and "solicit" are functionally identical. Running any of these programs without piping input to it would solicit input from you.)
Sorry, you need to Log In to post a reply to this thread.