Skip to content

Commit

Permalink
Reformat with current black version (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
SR4ven authored Sep 24, 2023
1 parent 0b5ec56 commit af0b802
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion boofuzz/pgraph/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


class Cluster:

id = None
nodes = []

Expand Down
1 change: 0 additions & 1 deletion boofuzz/primitives/float.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def __init__(
*args,
**kwargs
):

super(Float, self).__init__(name=name, default_value=str(default_value), *args, **kwargs)

self.s_format = s_format
Expand Down
1 change: 0 additions & 1 deletion boofuzz/primitives/from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class FromFile(BasePrimitive):
"""

def __init__(self, name=None, default_value=b"", filename=None, max_len=0, *args, **kwargs):

super(FromFile, self).__init__(name=name, default_value=default_value, *args, **kwargs)

self._filename = filename
Expand Down
1 change: 0 additions & 1 deletion boofuzz/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,6 @@ def _check_for_passively_detected_failures(self, target, failure_already_detecte
self._fuzz_data_logger.log_pass("No crash detected.")
else:
for monitor in set(target.monitors) - set(finished_monitors):

synopsis = monitor.get_crash_synopsis()
if len(synopsis) > 0:
self._fuzz_data_logger.log_fail(
Expand Down
10 changes: 5 additions & 5 deletions boofuzz/utils/crash_binning.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def crash_synopsis(self, crash=None):
synopsis += crash.context_dump

synopsis += "\ndisasm around:\n"
for (ea, inst) in crash.disasm_around:
for ea, inst in crash.disasm_around:
synopsis += "\t0x%08x %s\n" % (ea, inst)

if len(crash.stack_unwind):
Expand All @@ -169,7 +169,7 @@ def crash_synopsis(self, crash=None):

if len(crash.seh_unwind):
synopsis += "\nSEH unwind:\n"
for (addr, handler, handler_str) in crash.seh_unwind:
for addr, handler, handler_str in crash.seh_unwind:
synopsis += "\t%08x -> %s\n" % (addr, handler_str)

return synopsis + "\n"
Expand Down Expand Up @@ -215,7 +215,7 @@ def import_file(self, file_name):

self.bins = {}
bin_dict = json.load(open(file_name, "rb"))
for (crash_address, bin_list) in bin_dict.items():
for crash_address, bin_list in bin_dict.items():
self.bins[crash_address] = []
for single_bin in bin_list:
tmp = CrashBinStruct()
Expand Down Expand Up @@ -252,7 +252,7 @@ def last_crash_synopsis(self):
synopsis += self.last_crash.context_dump

synopsis += "\ndisasm around:\n"
for (ea, inst) in self.last_crash.disasm_around:
for ea, inst in self.last_crash.disasm_around:
synopsis += "\t0x%08x %s\n" % (ea, inst)

if len(self.last_crash.stack_unwind):
Expand All @@ -262,7 +262,7 @@ def last_crash_synopsis(self):

if len(self.last_crash.seh_unwind):
synopsis += "\nSEH unwind:\n"
for (addr, handler, handler_str) in self.last_crash.seh_unwind:
for addr, handler, handler_str in self.last_crash.seh_unwind:
try:
disasm = self.pydbg.disasm(handler)
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion boofuzz/utils/debugger_thread_pydbg.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _scan_proc_names_blocking(self):
return pid

def _scan_proc_names_once(self):
for (pid, name) in self.dbg.enumerate_processes():
for pid, name in self.dbg.enumerate_processes():
if name.lower() == self.proc_name.lower() and pid != self.ignore_pid:
return pid
return None
Expand Down
2 changes: 1 addition & 1 deletion boofuzz/utils/debugger_thread_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def watch(self):
"""
self.pid = None
while not self.pid:
for (pid, name) in _enumerate_processes():
for pid, name in _enumerate_processes():
# ignore the optionally specified PID.
if pid == self.ignore_pid:
continue
Expand Down
1 change: 0 additions & 1 deletion request_definitions/hp.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def unicode_ftw(val):
s_block_end()

if s_block_start("packet_2"):

# unicode byte order marker
s_static("\xfe\xff")

Expand Down
3 changes: 0 additions & 3 deletions utils/ida_fuzz_library_extender.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def find_ints(start_address):

# loop heads
for head in Heads(start_address, SegEnd(start_address)):

# if it's code, check for cmp instruction
if isCode(GetFlags(head)):
mnem = GetMnem(head)
Expand Down Expand Up @@ -100,7 +99,6 @@ def find_strings(start_address):
xref_start = import_ea
xref_cur = DfirstB(xref_start)
while xref_cur != BADADDR:

# print("Found call to ", import_name)
string_arg = get_arguments(xref_cur)

Expand All @@ -119,7 +117,6 @@ def find_strings(start_address):
lib_name = GetFunctionName(function_ea)

if len(lib_name) > 1 and "cmp" in lib_name:

# found one, now find xrefs to it and grab arguments
xref_start = function_ea
xref_cur = RfirstB(xref_start)
Expand Down
1 change: 0 additions & 1 deletion utils/pdml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def startElement(self, name, attributes):

# if parsing flag is set, we're past tcp
if self.start_parsing:

if not name == "field":
print("Found payload with name %s" % attributes["name"])
elif name == "field":
Expand Down

0 comments on commit af0b802

Please sign in to comment.