Module Expr Str Import alias Import alias Import alias Import alias Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad ListLoad If Call NameLoad NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body For NameStore Call NameLoad Num Call NameLoad NameLoad body Expr Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad If BoolOpOr Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad CompareIn NameLoad TupleLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body If CompareEq SubscriptLoad NameLoad Index NameLoad ListLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad With Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Str NameStore body If Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str TryExcept body Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Str BinOpAdd NameLoad Str Str Call NameLoad NameLoad Str NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Assert NameLoad BinOpMod Str NameLoad Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad BinOpAdd BinOpAdd NameLoad Str NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A Wrapper for Radamsa for fuzzing objects. It will collect valid
strings from objects, run a fuzzer over them, and return them in a dict
that can be passed on to the injector. N/A tempfile N/A os N/A subprocess N/A shutil N/A 
Copyright (c) 2012-2014 F-Secure
See LICENSE for details
 collect_values N/A N/A branch valid_values anomaly_key N/A None N/A N/A Recursively collect all values from a data structure into a dict where
    valid values are organised under keys, or a "None" key if
    they weren't found under any key

    :param branch: A branch of the data structure
    :param valid_values: The collected valid values
    :param anomaly_key: Under which key the current branch is
     N/A N/A N/A N/A valid_values get anomaly_key None N/A N/A N/A valid_values N/A anomaly_key N/A N/A N/A isinstance branch dict N/A N/A N/A key value N/A N/A branch items N/A N/A N/A collect_values value valid_values key N/A N/A isinstance branch list N/A N/A i N/A range 0 N/A len branch N/A N/A N/A collect_values N/A branch N/A i valid_values anomaly_key N/A N/A N/A isinstance branch N/A int str unicode float N/A branch N/A True False None N/A N/A N/A N/A N/A valid_values N/A anomaly_key append branch N/A N/A N/A N/A valid_values N/A None append branch N/A valid_values N/A fuzz_values N/A N/A valuedict no_of_fuzzcases radamsacmd N/A N/A N/A Run every key's valid value list through a fuzzer

    :param valuedict: Dict of collected valid values
    :param no_of_fuzzcases: How many injection cases to produce
    :param radamsacmd: Command to run Radamsa
     N/A fuzzdict N/A N/A key N/A N/A valuedict keys N/A N/A N/A N/A valuedict N/A key N/A N/A N/A N/A fuzzdict N/A key N/A get_fuzz N/A valuedict N/A None no_of_fuzzcases radamsacmd N/A N/A N/A fuzzdict N/A key N/A get_fuzz N/A valuedict N/A key no_of_fuzzcases radamsacmd N/A fuzzdict N/A get_fuzz N/A N/A valuelist no_of_fuzzcases radamsacmd N/A N/A N/A Run Radamsa on a set of valid values

    :param valuelist: Valid cases to feed to Radamsa
    :param no_of_fuzzcases: Number of fuzz cases to generate
    :param radamsacmd: Command to run Radamsa
    :return:
     N/A valid_case_directory N/A N/A tempfile mkdtemp N/A fuzz_case_directory N/A N/A tempfile mkdtemp N/A valid_string valuelist N/A N/A tempfilehandle N/A N/A tempfile mkstemp suffix .case dir valid_case_directory N/A N/A N/A os fdopen N/A tempfilehandle N/A 0 w filehandle N/A N/A N/A isinstance valid_string N/A bool int long float N/A N/A valid_string N/A str valid_string N/A N/A N/A filehandle write N/A bytearray valid_string UTF-8 N/A N/A N/A N/A N/A subprocess check_call N/A radamsacmd -o N/A fuzz_case_directory /%n.fuzz -n N/A str no_of_fuzzcases -r valid_case_directory N/A N/A N/A N/A subprocess CalledProcessError N/A error N/A N/A False N/A Could not execute Radamsa: %s error N/A fuzzlist N/A N/A filename N/A N/A os listdir fuzz_case_directory N/A N/A filehandle N/A open N/A N/A fuzz_case_directory / filename r N/A N/A N/A fuzzlist append N/A N/A filehandle read N/A N/A N/A shutil rmtree valid_case_directory N/A N/A N/A shutil rmtree fuzz_case_directory N/A fuzzlist N/A