Thursday, 15 November 2007
Drunk coding
[16:51:25] <@Ophichius> Dae, speaking of drunken exploits, I still have that ungodly scary C code you and a bunch of other people wrote while drunk.
[16:51:40] <@Ophichius> The one that has 'I am a little teapot, short and stout' as a valid line of code.
[16:51:49] <Daeken> lmao, yea
[16:51:56] <@Ophichius> I've yet to be crazy enough to compile and run it.
[16:52:43] <Kunama> PLEASE PLEASE PLEASE compile and run
[16:54:21] <@Ophichius> Kunama, I suspect it compiles just fine, even though they were massively drunk.
[16:54:30] <@Ophichius> I'm just too scared to actually compile it.
[16:54:39] <@Ophichius> I can't figure out what it does.
[16:54:57] <@Ophichius> And I'm not in the habit of compiling and running code that was written by drunk hackers without first understanding it.
after some searching by Ophi...
[17:18:35] <@Ophichius> pastebin.ca/774364
[17:20:08] <Daeken> *((const char **)&kthx[1]) = "meow" term <-- you can tell where myria was playing around :P
[17:21:03] <@Ophichius> So, what does it do?
[17:21:18] <Daeken> Ophichius: i'm not entirely sure it does anything
[17:21:26] <Daeken> if it does, i have no fucking clue what it is
[17:21:27] <@Ophichius> I'm assuming the bit near kthx is the actual shellcode.
[17:21:35] <Daeken> tbh, i'm scared of the shellcode buffer... caustik wrote that
[17:21:42] <@Ophichius> Mostly due to having 4 NOPs in a row.
[17:22:12] <@Ophichius> Shellcode buffer is...where exactly?
[17:22:19] <@Ophichius> My C-fu is weak.
[17:22:24] <Daeken> Ophichius: no, that's really woem, not nops
[17:22:46] <Daeken> err, no, wait, it's the address of "meow"
[17:22:47] <@Ophichius> woem?
[17:22:47] <Daeken> wtf... ?
[17:22:56] <Daeken> Ophichius: meow reversed
[17:23:01] <Daeken> i honestly have no idea wtf is being done
#c&t@irc.alexis-irc.net br>
[16:51:40] <@Ophichius> The one that has 'I am a little teapot, short and stout' as a valid line of code.
[16:51:49] <Daeken> lmao, yea
[16:51:56] <@Ophichius> I've yet to be crazy enough to compile and run it.
[16:52:43] <Kunama> PLEASE PLEASE PLEASE compile and run
[16:54:21] <@Ophichius> Kunama, I suspect it compiles just fine, even though they were massively drunk.
[16:54:30] <@Ophichius> I'm just too scared to actually compile it.
[16:54:39] <@Ophichius> I can't figure out what it does.
[16:54:57] <@Ophichius> And I'm not in the habit of compiling and running code that was written by drunk hackers without first understanding it.
after some searching by Ophi...
[17:18:35] <@Ophichius> pastebin.ca/774364
[17:20:08] <Daeken> *((const char **)&kthx[1]) = "meow" term <-- you can tell where myria was playing around :P
[17:21:03] <@Ophichius> So, what does it do?
[17:21:18] <Daeken> Ophichius: i'm not entirely sure it does anything
[17:21:26] <Daeken> if it does, i have no fucking clue what it is
[17:21:27] <@Ophichius> I'm assuming the bit near kthx is the actual shellcode.
[17:21:35] <Daeken> tbh, i'm scared of the shellcode buffer... caustik wrote that
[17:21:42] <@Ophichius> Mostly due to having 4 NOPs in a row.
[17:22:12] <@Ophichius> Shellcode buffer is...where exactly?
[17:22:19] <@Ophichius> My C-fu is weak.
[17:22:24] <Daeken> Ophichius: no, that's really woem, not nops
[17:22:46] <Daeken> err, no, wait, it's the address of "meow"
[17:22:47] <@Ophichius> woem?
[17:22:47] <Daeken> wtf... ?
[17:22:56] <Daeken> Ophichius: meow reversed
[17:23:01] <Daeken> i honestly have no idea wtf is being done
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#define I for
#define am (
#define a int
#define little i
#define teapot =
#define small 0; i
#define and
#define stout
#define here
#define is < 5
#define my ;
#define handle i
#define i5 )
#define mY print("%s ", teapot[i])
#define spout ;
#define EVER ;;
#define FOREVER for(EVER)
#define AINT !=
#define holla printf0
#define dontstop "\n"
#define whereuat scanf
#define dyn_o_mite __asm__ __volatile__
#define m int main()
#define begin {
#define end }
#define get_out_my_face(a) memset(a, 0, sizeof(a))
#define trudat(type, count) ((type) *) malloc(count * sizeof(type))
#define whereuat holla
#define whos_yo_daddy(a, d) do begin \
dyn_o_mite ( \
"rdtsc" dontstop \
: "=a"(a), "=d"(d)); \
while(0)end
#define whereisyourgodnow(ultra, violet) \
do begin \
dyn_o_mite ( \
"lea %eax, %ecx(8*edx)"
#define list_of enum
#define term ;
list_of DORKS
begin
BUNNIE,
WARREN,
MIST,
CAUSTIK,
DAEKEN,
MYRIA
end term
#define empty ()
#define numbah int
numbah lolz empty
begin
end
#define cook void *
#define biatch struct
biatch w3rd begin
numbah a, b term
cook me, dinner term
end term
#define white biatch w3rd *
#define picket ll_init
#define fence
#define is_teh_equal =
white picket(fence) begin
biatch w3rd *yum is_teh_equal trudat(biatch w3rd, 1);
end
Eight in the morning
I forgot to go to sleep
My mage aren't tired
char* teapot = { "
m begin
numbah i2 term
numbah *p term
numbah msg[40] term
numbah omg, wtf, hax term
holla("Hello World!")term
I am a little teapot small and stout; here is my handle here is my spout
p = trudat(int, 6)term
holla("And the memory goes to... %p\n", p) term
whereuat("%s\n", msg) term
get_out_my_face(p) term
begin
char kthx[6] = begin 0xB8, 0x90, 0x90, 0x90, 0x90, 0xC3 end term
end
*((const char **)&kthx[1]) = "meow" term
printf((*(const char (*)(void))kthx)) term
whos_yo_daddy(omg, wtf) term
holla("%d%d", omg, wtf) term
end;
#c&t@irc.alexis-irc.net br>