MCPcopy Create free account
hub / github.com/0xHossam/Killer / reverseShellcode

Function reverseShellcode

reverse-shellcode.cpp:4–15  ·  view source on GitHub ↗

Function to reverse a shellcode array in 0x format

Source from the content-addressed store, hash-verified

2
3// Function to reverse a shellcode array in 0x format
4void reverseShellcode(unsigned char *shellcode, int size) {
5 int i;
6 unsigned char temp;
7 for (i = 0; i < size/2; i++) {
8 temp = shellcode[size-i-1];
9 shellcode[size-i-1] = shellcode[i];
10 shellcode[i] = temp;
11 }
12 if (size % 2 != 0) {
13 shellcode[size/2] = shellcode[size/2];
14 }
15}
16
17int main() {
18 // Example shellcode array in 0x format

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected