From 04e7fb290c65579ff2a9fd5bdaf94fa63f15732c Mon Sep 17 00:00:00 2001 From: marrub-- Date: Fri, 16 Jan 2015 06:30:25 -0500 Subject: [PATCH] the real initial commit --- .gitignore | 1 + LICENSE | 2 -- garbage.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ rngenerator.c | 18 ++++++++++++ 4 files changed, 99 insertions(+), 2 deletions(-) create mode 100755 .gitignore create mode 100755 garbage.c create mode 100755 rngenerator.c diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..3110669 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +a.exe \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9c1adcf..4bae29d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,3 @@ -The MIT License (MIT) - Copyright (c) 2015 Marrub Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/garbage.c b/garbage.c new file mode 100755 index 0000000..286047b --- /dev/null +++ b/garbage.c @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include + +#define XCONDS(ch) ch != 'a' + +/* sorry for mega ultra ugly code, I made this in like 5 minutes */ +int main() +{ + char *str; + char *garbage; + char stackgarbage[4000]; + long long int burn_cycles; + long long int rng = clock(); + char column[80]; + int LCHAR = ' ' + 1; + int i; + FILE *OUTFILE = fopen("garbage.txt", "wb"); + + /* overly complex way of srand(time(NULL)); */ + for(burn_cycles = 0; burn_cycles < 1000; burn_cycles++) + { + printf("%lld\n", atan2(sqrt(burn_cycles), sqrt(burn_cycles + 4) * exp(burn_cycles))); + } + + printf("======================\n"); + + srand(clock() + (double)rng); + rng = (rand() / 4) < 5000 ? rand() / 6 : rand() / 5; + str = malloc(1); + garbage = str + (rng % 100); + + printf("%d\n", rng); + for(i = 0; ++garbage < str + (rng % 100) + 1295; i++) + { + if (i > 80){ + i =0; + while(++i<80) { + while((column[i] < LCHAR && XCONDS(column[i])) || column[i] > '~'){ + int ghsfg = rand() % 127; + do{ghsfg = rand() % 127;}while(ghsfg 18) + { + int ghsfg = rand() % 127; + do{ghsfg = rand() % 127;}while(ghsfg ' '){ + column[i] = garbage[0];} /* the below doesn't work on linux because it has proper stack read protection */ + else if((*(stackgarbage + (garbage - str - rng)) * 2) > LCHAR && XCONDS((*(stackgarbage + (garbage - str - rng)) * 2))) { + column[i] = *(stackgarbage + (garbage - str - rng)) * 2;} + else { + int ghsfg = rand() % 127; + do{ghsfg = rand() % 127;}while(ghsfg +#include +#include + +int main() +{ + int i; + srand(time(NULL)); + printf("static const unsigned char rng[256] = {\n\t"); + for(i = 0; i < 255; i++) + { + if(!(i % 10)) + printf("\n\t"); + printf("%d, ", rand() % 255); + } + printf("};"); + return 0; +}