MCPcopy Create free account
hub / github.com/0xJs/RedTeaming_CheatSheet / XOR

Function XOR

coding/projects/Encoding_Encryption/Xor/implant.cpp:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <string.h>
7
8void XOR(char * data, size_t data_len, char * key, size_t key_len) {
9 int j;
10
11 j = 0;
12 for (int i = 0; i < data_len; i++) {
13 if (j == key_len - 1) j = 0;
14
15 data[i] = data[i] ^ key[j];
16 j++;
17 }
18}
19
20int main(void) {
21

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected