1
0

fuzzer.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. Manages what to fuzz when.
  3. */
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <stdint.h>
  7. #include <string.h>
  8. #include "frameDefinitions.h"
  9. #include "fuzzERP.h"
  10. //CHANGE WHEN NEW SUBFUZZER
  11. //CHANGE WHEN NEW SUBFUZZER
  12. //Number of subfuzzers
  13. #define SUBFUZZERS (1)
  14. //CHANGE WHEN NEW SUBFUZZER
  15. //Array of pointers to subfuzzers update functions
  16. //int (*p[SUBFUZZERS]) (int i) = {vendorFuzzUpdate, rsnFuzzUpdate, bssloadFuzzUpdate, extcapabFuzzUpdate, apreportFuzzUpdate, htinfoFuzzUpdate, htcapabFuzzUpdate, extratesFuzzUpdate, erpFuzzUpdate, requestFuzzUpdate, hoptableFuzzUpdate, hopparmFuzzUpdate, countryFuzzUpdate, ibssFuzzUpdate, cfFuzzUpdate, timFuzzUpdate, dsFuzzUpdate, fhFuzzUpdate, ratesFuzzUpdate, ssidFuzzUpdate};
  17. int (*p[SUBFUZZERS]) (int i) = {erpFuzzUpdate};
  18. //State of sub-fuzzer
  19. //-1 = Done
  20. //0 = In progress
  21. int subFuzzState = -1;
  22. //Current sub-fuzzer
  23. //Starts with -1 to prevent skipping the first sub-fuzzer
  24. int subFuzzerIdx = -1;
  25. //Flag to indicate if the done with all subfuzzers notification has been sent
  26. int notifyDone = 0;
  27. int frameCounter = 0;
  28. //Controls state of fuzzer, and therefore what to fuzz next
  29. void increaseFuzzer()
  30. {
  31. erpFuzzUpdate(0);
  32. }