diff --git a/src/fuzz-testing/__init__.py b/src/fuzz-testing/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/fuzz-testing/nmea_fuzzer.py b/src/fuzz-testing/nmea_fuzzer.py new file mode 100644 index 0000000..51d7a43 --- /dev/null +++ b/src/fuzz-testing/nmea_fuzzer.py @@ -0,0 +1,18 @@ +try: + import atheris +except ImportError: + raise ImportError("You need to install atheris to run this script.") +import sys + +with atheris.instrument_imports(): + from ..ntrip_client.nmea_parser import NMEAParser + + +def TestOneInput(data): + parser = NMEAParser() + parser.is_valid_sentence(data) + + +atheris.Setup(sys.argv, TestOneInput) +atheris.Fuzz() + diff --git a/src/fuzz-testing/rtcm_fuzzer.py b/src/fuzz-testing/rtcm_fuzzer.py new file mode 100644 index 0000000..540cd8c --- /dev/null +++ b/src/fuzz-testing/rtcm_fuzzer.py @@ -0,0 +1,18 @@ +try: + import atheris +except ImportError: + raise ImportError("You need to install atheris to run this script.") +import sys + +with atheris.instrument_imports(): + from ..ntrip_client.rtcm_parser import RTCMParser + + +def TestOneInput(data): + parser = RTCMParser() + parser.parse(data) + + +atheris.Setup(sys.argv, TestOneInput) +atheris.Fuzz() +