verbose option
This commit is contained in:
parent
9099dfa2d1
commit
ed35e6e225
@ -49,6 +49,10 @@ def main():
|
|||||||
"--fast", action='store_true',
|
"--fast", action='store_true',
|
||||||
help="Faster, less complete, reduction (no range or byte pattern attempts).")
|
help="Faster, less complete, reduction (no range or byte pattern attempts).")
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"--verbose", action='store_true',
|
||||||
|
help="Verbose reduction.")
|
||||||
|
|
||||||
class TimeoutException(Exception):
|
class TimeoutException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -132,6 +136,8 @@ def main():
|
|||||||
while changed:
|
while changed:
|
||||||
changed = False
|
changed = False
|
||||||
|
|
||||||
|
if args.verbose:
|
||||||
|
print("TRYING ONEOF REMOVALS...")
|
||||||
cuts = s[0]
|
cuts = s[0]
|
||||||
for c in cuts:
|
for c in cuts:
|
||||||
newTest = currentTest[:c[0]] + currentTest[c[1]+1:]
|
newTest = currentTest[:c[0]] + currentTest[c[1]+1:]
|
||||||
@ -145,6 +151,8 @@ def main():
|
|||||||
|
|
||||||
if (not args.fast) and (not changed):
|
if (not args.fast) and (not changed):
|
||||||
for b in range(0, len(currentTest)):
|
for b in range(0, len(currentTest)):
|
||||||
|
if args.verbose:
|
||||||
|
print("TRYING BYTE RANGE REMOVAL FROM BYTE", str(b) + "...")
|
||||||
for v in range(b+1, len(currentTest)):
|
for v in range(b+1, len(currentTest)):
|
||||||
newTest = currentTest[:b] + currentTest[v:]
|
newTest = currentTest[:b] + currentTest[v:]
|
||||||
r = writeAndRunCandidate(newTest)
|
r = writeAndRunCandidate(newTest)
|
||||||
@ -156,6 +164,8 @@ def main():
|
|||||||
break
|
break
|
||||||
|
|
||||||
if not changed:
|
if not changed:
|
||||||
|
if args.verbose:
|
||||||
|
print("TRYING BYTE REDUCTIONS...")
|
||||||
for b in range(0, len(currentTest)):
|
for b in range(0, len(currentTest)):
|
||||||
for v in range(0, currentTest[b]):
|
for v in range(0, currentTest[b]):
|
||||||
newTest = bytearray(currentTest)
|
newTest = bytearray(currentTest)
|
||||||
@ -169,6 +179,8 @@ def main():
|
|||||||
break
|
break
|
||||||
|
|
||||||
if not changed:
|
if not changed:
|
||||||
|
if args.verbose:
|
||||||
|
print("TRYING BYTE REDUCE AND DELETES...")
|
||||||
for b in range(0, len(currentTest)):
|
for b in range(0, len(currentTest)):
|
||||||
if currentTest[b] == 0:
|
if currentTest[b] == 0:
|
||||||
continue
|
continue
|
||||||
@ -183,6 +195,8 @@ def main():
|
|||||||
|
|
||||||
if (not args.fast) and (not changed):
|
if (not args.fast) and (not changed):
|
||||||
for b1 in range(0, len(currentTest)-4):
|
for b1 in range(0, len(currentTest)-4):
|
||||||
|
if args.verbose:
|
||||||
|
print("TRYING BYTE PATTERN SEARCH FROM BYTE", str(b) + "...")
|
||||||
for b2 in range(b1+2, len(currentTest)-4):
|
for b2 in range(b1+2, len(currentTest)-4):
|
||||||
v1 = (currentTest[b1], currentTest[b1+1])
|
v1 = (currentTest[b1], currentTest[b1+1])
|
||||||
v2 = (currentTest[b2], currentTest[b2+1])
|
v2 = (currentTest[b2], currentTest[b2+1])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user