summaryrefslogtreecommitdiff
path: root/examples/externalfuzzers/rangeFuzz.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/externalfuzzers/rangeFuzz.py')
-rwxr-xr-xexamples/externalfuzzers/rangeFuzz.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/examples/externalfuzzers/rangeFuzz.py b/examples/externalfuzzers/rangeFuzz.py
deleted file mode 100755
index dd888445..00000000
--- a/examples/externalfuzzers/rangeFuzz.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-
-import mmap
-import os
-from random import randint
-import sys
-
-RANGE_START = 0x1b30
-RANGE_END = 0x1b50
-MIN_BYTES_TO_FLIP = 1
-MAX_BYTES_TO_FLIP = 5
-
-with open(sys.argv[1], "r+b") as f:
- mapped = mmap.mmap(f.fileno(), 0)
-
- bytes_to_flip = randint(MIN_BYTES_TO_FLIP, MAX_BYTES_TO_FLIP)
- bytes_flipped = 0
-
- while bytes_flipped < bytes_to_flip:
- byte_pos = randint(RANGE_START, RANGE_END)
- byte_new = chr(randint(0, 255))
- mapped[byte_pos] = byte_new
- bytes_flipped += 1
-
- mapped.close()