Skip to content

Instantly share code, notes, and snippets.

@iagox86
Created March 9, 2021 00:11
Show Gist options
  • Save iagox86/910c90e47a9c77e3da50976200b55fd3 to your computer and use it in GitHub Desktop.
Save iagox86/910c90e47a9c77e3da50976200b55fd3 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int i;
srand(0x13371337);
unsigned char buffer[4096];
ssize_t len = read(0, buffer, 4096);
if(len < 0) {
printf("Error reading!\n");
exit(1);
}
for(i = 0; i < len; i++) {
buffer[i] ^= (rand() >> 3) & 0x0FF;
printf("%c", buffer[i]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment