• Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

[C] Example program [ASM]

ZionHD

Leader
Retired Staff
You can run this with gcc compiler. This is an example for all teams on this site. What this program does is just display text "Example C!". This program uses C, ASM, and Hexadecimals. I'm not going to explain how this works, if you really want to know go study some C and ASM. The purpose of showing you this code is to try to get all of you to learn some C and ASM. Also I was bored af since there was no interesting anime xd.

main.c:
Code:
#include <sys/mman.h>
#include <string.h>

int main ()
{
char code[] = {
0x48, 0xc7, 0xc7, 0x01, 0x00, 0x00,
0x00, 0xe8, 0x0b, 0x00, 0x00, 0x00,
0x45, 0x78, 0x61, 0x6D, 0x70, 0x6C,
0x65, 0x20, 0x43, 0x21, 0x0a, 0x5e,
0x48, 0xc7, 0xc2, 0x0b, 0x00, 0x00,
0x00, 0xb8, 0x01, 0x00, 0x00, 0x00,
0x0f, 0x05, 0xbf, 0x0b, 0x00, 0x00,
0x00, 0xb8, 0x3c, 0x00, 0x00, 0x00,
0x0f, 0x05
};

void *buf;

buf = mmap (0,sizeof(code),PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON,-1,0);
memcpy (buf, code, sizeof(code));

((void (*) (void))buf)();
}

To compile the code run, modify if needed:
gcc main.c -o main

Results:
Example C!
 
inb4 you teach people how to code keyloggers :troll:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Omar-_- is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    lilmonster3 is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    765rdchy5rfvbj5edcvj4ed is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    wilson sales is our newest member. Welcome!
  • Chat Bot:
    riggv is our newest member. Welcome!
  • Chat Bot:
    ripthors is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    modmonkey is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    ZynxDEX is our newest member. Welcome!
  • Chat Bot:
    ZynxDEX has started a new thread called "Console ID" in Console ID's.
  • Chat Bot:
    keplerland is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    orencoooo is our newest member. Welcome!
      Chat Bot: orencoooo is our newest member. Welcome!
      Back
      Top