Advertisement
Guest User

Shellcode1_decoder.c

a guest
Oct 2nd, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.86 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stdint.h>
  4.  
  5.  unsigned char doshead[] = {
  6.     0x54, 0x68, 0x69, 0x73, 0x20, 0x70,
  7.     0x72, 0x6F, 0x67, 0x72, 0x61, 0x6D,
  8.     0x20, 0x63, 0x61, 0x6E, 0x6E, 0x6F,
  9.     0x74, 0x20, 0x62, 0x65, 0x20, 0x72,
  10.     0x75, 0x6E, 0x20, 0x69, 0x6E, 0x20,
  11.     0x44, 0x4F, 0x53, 0x20, 0x6D, 0x6F
  12.     };
  13.     //0x64, 0x65
  14. unsigned char var_28[] = {
  15.     0x12, 0x24, 0x28, 0x34, 0x5B, 0x23,
  16.     0x26, 0x20, 0x35, 0x37, 0x4C, 0x28,
  17.     0x76, 0x26, 0x33, 0x37, 0x3A, 0x27,
  18.     0x3D, 0x6E, 0x25, 0x48, 0x6F, 0x3C,
  19.     0x58, 0x3A, 0x68, 0x2C, 0x43, 0x73,
  20.     0x10, 0x0E, 0x10, 0x6B, 0x10, 0x6F
  21.     };
  22.  
  23. int main() {
  24.    unsigned char * ptr1 = doshead;
  25.    unsigned char * ptr2 = var_28;
  26.    while (*ptr1 != 0) {
  27.         uint8_t ascii = *ptr1 ^ *ptr2;
  28.         printf("%c",ascii);
  29.         ptr1++;
  30.         ptr2++;
  31.    }
  32.    return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement