Files
2025-09-02 21:39:37 +02:00

38 lines
804 B
C

#include <windows.h>
#include <stdio.h>
int main(void)
{
char caesar[42] = {0xc, 0xb, 0x81, 0xd, 0x72, 0xd, 0x80, 0xd, 0x81, 0xd, 0x72, 0xd, 0x76, 0xd, 0x7b, 0xd, 0x80, 0xd, 0x87, 0xd, 0x84, 0xd, 0x7c, 0xd, 0x72, 0xd, 0x76, 0xd, 0x7b, 0xd, 0x80, 0xd, 0x87, 0xd, 0x84, 0xd, 0x7c, 0xd, 0x3f, 0xd, 0x3f, 0xd};unsigned char shellcode[42] = { 0x00 };
for (int i = 0; i < sizeof(caesar); i++)
{
if ((caesar[i] - 13) < 0)
{
printf(""); // because defender
shellcode[i] = caesar[i] + 256 - 13;
}
else
{
shellcode[i] = caesar[i] - 13;
}
}
int idx = 0;
while (idx < sizeof(shellcode))
{
if (idx == (sizeof(shellcode) - 1))
{
printf("0x%02x ", (unsigned char)shellcode[idx]);
}
else
{
printf("0x%02x, ", (unsigned char)shellcode[idx]);
}
idx++;
}
return 0;
}