Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.

Commit

Permalink
Merge pull request #40 from fgeek/cleanup
Browse files Browse the repository at this point in the history
Cleanup import orders, continuation and trailing whitespaces
  • Loading branch information
rc0r authored Nov 12, 2016
2 parents f773296 + f7f0f1d commit 1a10e7b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
6 changes: 2 additions & 4 deletions afl_utils/afl_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@

import argparse
import os
import queue
import shutil
import sys
import threading

import afl_utils
from afl_utils import SampleIndex, AflThread
from afl_utils.AflPrettyPrint import clr, print_ok, print_err, print_warn
from db_connectors import con_sqlite

import threading
import queue


# afl-collect global settings
global_crash_subdirs = "crashes"
global_queue_subdirs = "queue"
Expand Down
4 changes: 2 additions & 2 deletions afl_utils/afl_multicore.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def build_master_cmd(conf_settings, master_index, target_cmd):
if "master_instances" in conf_settings and conf_settings["master_instances"] > 1:
# multi-master mode
master_cmd += ["-M", "%s%03d:%d/%d" % (conf_settings["session"], master_index,
master_index+1, conf_settings["master_instances"]), "--", target_cmd]
master_index+1, conf_settings["master_instances"]), "--", target_cmd]
else:
# single-master mode
master_cmd += ["-M", "%s000" % conf_settings["session"], "--", target_cmd]
Expand Down Expand Up @@ -379,7 +379,7 @@ def main(argv):
else:
if not args.verbose:
fuzzer_inst = subprocess.Popen(" ".join(['nohup', cmd]).split(), stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
stderr=subprocess.DEVNULL)
else:
fuzzer_inst = subprocess.Popen(" ".join(['nohup', cmd]).split())
if is_master:
Expand Down
2 changes: 1 addition & 1 deletion afl_utils/afl_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def parse_stat_file(stat_file, summary=True):
'afl_version': '',
'command_line': ''
}

for l in lines:
if summary:
stats = summary_stats
Expand Down
8 changes: 4 additions & 4 deletions afl_utils/afl_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
limitations under the License.
"""

import afl_utils
from afl_utils.AflPrettyPrint import clr, print_ok, print_warn, print_err

import argparse
import os
import sys
import subprocess

import afl_utils
from afl_utils.AflPrettyPrint import clr, print_ok, print_warn, print_err

_rsync_default_options = ['-racz']


Expand Down Expand Up @@ -138,7 +138,7 @@ def main(argv):
show_info()

parser = argparse.ArgumentParser(description='afl-sync synchronizes fuzzer state directories between different \
locations. Supported are remote transfers through rsync that may use transport compression.',
locations. Supported are remote transfers through rsync that may use transport compression.',
usage='afl-sync [-S SESSION] <cmd> <src_sync_dir> <dst_storage_dir>')

parser.add_argument('cmd',
Expand Down
6 changes: 2 additions & 4 deletions afl_utils/afl_vcrash.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@

import argparse
import os
import queue
import sys
import threading

import afl_utils
from afl_utils import AflThread, afl_collect
from afl_utils.AflPrettyPrint import *

import threading
import queue


def show_info():
print(clr.CYA + "afl-vcrash " + clr.BRI + "%s" % afl_utils.__version__ + clr.RST + " by %s" % afl_utils.__author__)
print("Crash verifier for crash samples collected from afl-fuzz.")
Expand Down

0 comments on commit 1a10e7b

Please sign in to comment.