22016, 1100/1101 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   ÇØÅ·ÀßÇϰí½Í´Ù
   http://¾øÀ½
   lob ¿¬½ÀÇÒ ¶§ µµ¿òµÇ´Â ÀÚ·á (Á÷Á¢ ¸¸µé¾úÀ½)

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Board&no=37877 [º¹»ç]


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#define MAX_LEN 256

// Convert input string like "\\x31\\xc0..." into actual byte array
int decode_shellcode(const char *input, unsigned char *output) {
    int len = strlen(input);
    int out_idx = 0;
    
    for (int i = 0; i < len;) {
        // Check for "\xNN" pattern
        if (input[i] == '\\' && input[i+1] == 'x' &&
            isxdigit(input[i+2]) && isxdigit(input[i+3])) {
            char hex[3] = { input[i+2], input[i+3], '\0' };
            output[out_idx++] = (unsigned char)strtol(hex, NULL, 16);
            i += 4;
        } else {
            return -1; // Invalid format
        }
    }
    return out_idx; // Number of bytes converted
}

int main(void)
{
    char your_answer[MAX_LEN];
    char *shellcode_25bytes = "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e"
                               "\x89\xe3\x50\x53\x89\xe1\x31\xd2\xb0\x0b\xcd\x80";

    unsigned char decoded_input[MAX_LEN];

    while (1) {
        // Prompt user for shellcode input
        printf("Enter the shellcode('q' to exit) : ");
        fgets(your_answer, MAX_LEN, stdin);
        your_answer[strcspn(your_answer, "\n")] = '\0';  // Remove newline character

        // Exit if input is "q"
        if (strcmp(your_answer, "q") == 0) {
            exit(0);
        }

        // Decode input into raw bytes
        int decoded_len = decode_shellcode(your_answer, decoded_input);

        if (decoded_len < 0) {
            printf("Invalid format. Use \\xNN format.\n");
            continue;
        }

        // Compare decoded input with actual shellcode
        if (decoded_len == strlen(shellcode_25bytes) &&
            memcmp(decoded_input, shellcode_25bytes, decoded_len) == 0) {
            printf("correct!!!\n");
            break;
        } else {
            printf("fail...\n");
        }
    }

    return 0;
}

  Hit : 1445     Date : 2025/05/07 06:30



    
36   Ç϶ó´Â ÇØÅ·Àº ¾È Çϰí -part10-     ÇØÅ·ÀßÇϰí½Í´Ù
02/27 1635
35   Ç϶ó´Â ÇØÅ·Àº ¾È Çϰí -part11-     ÇØÅ·ÀßÇϰí½Í´Ù
02/28 1430
34   Ç϶ó´Â ÇØÅ·Àº ¾È Çϰí -part13-     ÇØÅ·ÀßÇϰí½Í´Ù
02/28 1692
33   ÇØÅ· º¸¾È °ü·Ã °ú¿Ü¸¦ ÁøÇàÇÕ´Ï´Ù.[1]     bluewindsoul
03/26 1699
32 ºñ¹Ð±ÛÀÔ´Ï´Ù  ¿î¿µÀÚ´Ô... (¼­¹ö ¿À·ùº¸°í)[1]     ÇØÅ·ÀßÇϰí½Í´Ù
04/17 11
31   recording     ÇØÅ·ÀßÇϰí½Í´Ù
04/24 1320
30   ´ç±¸Àå ¸Å´ÏÀú...     ÇØÅ·ÀßÇϰí½Í´Ù
04/25 1303
29   ¿î¿µÀÚ´Ô[1]     ÇØÅ·ÀßÇϰí½Í´Ù
05/02 1468
  lob ¿¬½ÀÇÒ ¶§ µµ¿òµÇ´Â ÀÚ·á (Á÷Á¢ ¸¸µé¾úÀ½)     ÇØÅ·ÀßÇϰí½Í´Ù
05/07 1444
27   ¾Æ...     ÇØÅ·ÀßÇϰí½Í´Ù
05/11 1780
26   ºÒ¹ý°°Àº ÂÊÁö ³¯¶ó¿À¸é     ÇØÅ·ÀßÇϰí½Í´Ù
05/17 1508
25   ¾Æ¹« °Íµµ ¸ô¶ó¿ä     ÇØÅ·ÀßÇϰí½Í´Ù
05/20 1457
24   »ç¹«½Ç     ÇØÅ·ÀßÇϰí½Í´Ù
07/02 1222
23   ¹ÌÄ£µí     ÇØÅ·ÀßÇϰí½Í´Ù
07/02 1263
22   ½º½º·Î ¸ñ¼ûÀ» Á®¹ö¸°´Ù´Â °ÍÀº     ÇØÅ·ÀßÇϰí½Í´Ù
07/27 1285
21   ±Í¼ö(Сâ¢) µû¶óÇϱâ(?)     ÇØÅ·ÀßÇϰí½Í´Ù
07/28 1251
20   ¾Æ........ ¤Ð¤Ð     ÇØÅ·ÀßÇϰí½Í´Ù
08/04 1431
19   °°ÀÌ ÇØÅ· ÆÀ ÀÌ·ç½ÇºÐ??     hacs98
08/26 1080
18   ÇØÅ·ÆÀ¿ø ¸ðÁý[1]     koromoon
08/27 1520
17   ¿ÉÄ¡ ÇÙ°¨Áö ÇÁ·Î±×·¥Á» ¸¸µé¾îÁÖ¼¼¿ä[1]     powerima
10/15 940
[1]..[1091][1092][1093][1094][1095][1096][1097][1098][1099] 1100 ..[1101]

Copyright 1999-2026 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org