Skip to content

Instantly share code, notes, and snippets.

@jershmagersh
Last active August 29, 2015 14:04
Show Gist options
  • Save jershmagersh/81add17d179cf45373da to your computer and use it in GitHub Desktop.
Save jershmagersh/81add17d179cf45373da to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
int main(int argc, char ** argv) {
const char dat_secret[] = "// dat_secret = System.IO.MemoryStream";
long int secret_len = strlen(dat_secret);
char text[secret_len];
int i;
for(i = 0; i < secret_len; i++) {
char b = dat_secret[i];
text[i] = (char)((b >> 4 | ((int)b << 4 & 240)) ^ 41);
}
printf("%s\n", text);
char text2[strlen(text)];
int j;
int str_i = 0;
for(j = 0; j < secret_len; j += 2) {
text2[str_i] = text[j+1];
str_i += 1;
text2[str_i] = text[j];
str_i += 1;
}
printf("%s\n", text2);
int k;
char text3[strlen(text)];
str_i = 0;
for(k = 0; k < strlen(text2); k++) {
char arg_B6_0 = text2[k];
text3[str_i] = (char)(text2[k] ^ 102);
str_i += 1;
}
printf("%s\n", text3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment