|
|
|
|
|
by ericbb
3552 days ago
|
|
I like this one even better: $ cat test.c
void _start(void)
{
__asm__(
"movabsq $6278066737626506568,%rax\n\t"
"movq %rax,-32(%rsp)\n\t"
"movl $1684828783,-24(%rsp)\n\t"
"movw $10,-20(%rsp)\n\t"
"movq $1,%rax\n\t"
"movq $1,%rdi\n\t"
"leaq -32(%rsp),%rsi\n\t"
"movq $13,%rdx\n\t"
"syscall\n\t"
"movq $60,%rax\n\t"
"movq $0,%rdi\n\t"
"syscall");
}
$ gcc -nostdlib -static -Os -o test test.c && strip test && ls -lgG test
-rwxr-xr-x 1 864 Sep 28 14:22 test
864 bytes! :) |
|