Anonymous Anonymous - 3 years ago
4370 0

No description



Project: Buffer_Fuzzer
Filename: Buffer_Fuzzer.c
Since: Dec. 26, 2017 (Original Program)
Author: TheCodeWeaver
Version: 0.2 (Version 0.2 Start Date: Jan. 6, 2018)
About: Creates files to fuzz software buffers. Simulates fuzz and 4 byte memory address.

#include <stdio.h>
#include <stdlib.h>

//Fuzzing constants
#define FUZZ "A"

//Function to create a file and write fuzz to it
void create_and_fuzz(char* file_name, int file_len);

int main(int argc, char *argv[])
  //Command line arg parsing
  if (argc == 1)
    printf("Usage: bfuzz [filename] [fuzz length]\n");
    return 1;
  } else if (argc == 3)
    printf("[+] Creating and fuzzing file...\n");
    create_and_fuzz(argv[1], atoi(argv[2]));
    printf("[+] Fuzzing finished!\n");
    return 0;
  } else
    printf("Usage: bfuzz [filename] [fuzz length]\n");
    return 1;
  } //End of if else if else statement

  return 0;
} //End of main function

//create_and_fuzz function
void create_and_fuzz(char* file_name, int file_len)
  FILE* fp;

  //Open the file and fuzz it
  fp = fopen(file_name,"w+");
  //Write fuzz to file
  for (int i = 0; i < file_len; i++)
   fprintf(fp, "%s", FUZZ);
  } //End of for loop
  //Write address to file
  fprintf(fp, "%s", ADDRESS);

} //End of create_and_fuzz function
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download