Showing 1,005 of 1,471 total issues
objectsType
has 44 functions (exceeds 20 allowed). Consider refactoring. Open
class objectsType(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, file=None, uri=None, domain=None, registry=None, ip=None, asn=None, entity=None, classification=None):
if file is None:
Function _gen_keys
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def _gen_keys(self):
"""Get registry calls.
@return: keys information list.
"""
keys = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def run(app=None, server='wsgiref', host='127.0.0.1', port=8080,
interval=1, reloader=False, quiet=False, plugins=None,
debug=False, **kargs):
""" Start a server instance. This method blocks until the server terminates.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_versioninfo
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def _get_versioninfo(self):
"""Get version info.
@return: info dict or None.
"""
if not self.pe:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __load
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def __load(self, filename=None, data=None):
if filename is not None:
# If the path does not exist, attempt to open a URL
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def run(self, results):
"""Writes report.
@param results: Cuckoo results dict.
@raise CuckooReportError: if fails to connect or write to MongoDB.
"""
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_import_table
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def get_import_table(self, rva):
table = []
# We need the ordinal flag for a simple heuristic
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
BaseRequest
has 41 functions (exceeds 20 allowed). Consider refactoring. Open
class BaseRequest(object):
""" A wrapper for WSGI environment dictionaries that adds a lot of
convenient access methods and properties. Most of them are read-only.
Adding new attributes to a request actually adds them to the environ
Function run
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def run(self):
"""
Process PCAP.
@return: dict with network analysis data
"""
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parse_imports
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def parse_imports(self, original_first_thunk, first_thunk, forwarder_chain):
"""Parse the imported symbols.
It will fill a list, which will be available as the dictionary
attribute "imports". Its keys will be the DLL names and the values
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
AnalysisType
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class AnalysisType(GeneratedsSuper):
"""AnalysisType is intended to provide a way of characterizing typical
malware analysis-related metadata, such as the subject of the
analysis and when it was started.The analysis_method attribute
is intended to provide a way of characterizing the type of
BehaviorCollectionType
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class BehaviorCollectionType(GeneratedsSuper):
"""BehaviorCollectionType is intended to provide a mechanism for
characterizing collections of behaviors.The name attribute
contains the name of the behavior collection, if applicable."""
subclass = None
ActionType
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class ActionType(GeneratedsSuper):
"""ActionType is intended to serve as a method for the characterization
of actions found or observed in malware. Actions can be thought
of as system state changes and similar operations that represent
the fundamental low-level operation of malware. Some examples
Function addObjects
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def addObjects(self):
"""Adds objects elements."""
# File objects
# Subject
self.objects.add_file(self.createFileObject(self.results['file']))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_resources
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def _get_resources(self):
"""Get resources.
@return: resources dict or None.
"""
if not self.pe:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File_System_Object_AttributesType
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class File_System_Object_AttributesType(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, DateTime_Created=None, DateTime_Modified=None, Path=None, Hashes=None, Permissions=None, File_Type=None, Packing=None, Pipe_Mode=None, Maximum_Instances=None, Security_Attributes=None, Origin=None, File_Type_Attributes=None):
self.DateTime_Created = DateTime_Created
ActionCollectionType
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class ActionCollectionType(GeneratedsSuper):
"""ActionCollectionType is intended to provide a method for
characterizing collections of actions. This can be useful for
organizing actions that may be related and where the exact
relationship is unknown, as well as actions whose associated
Function exportLiteralChildren
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def exportLiteralChildren(self, outfile, level, name_):
if self.Hashes is not None:
showIndent(outfile, level)
outfile.write('Hashes=model_.HashesType4(\n')
self.Hashes.exportLiteral(outfile, level, name_='Hashes')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function exportChildren
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def exportChildren(self, outfile, level, namespace_='maec:', name_='Optional_HeaderType', fromsubclass_=False):
if self.Hashes is not None:
self.Hashes.export(outfile, level, namespace_, name_='Hashes')
if self.Major_Linker_Version is not None:
self.Major_Linker_Version.export(outfile, level, namespace_, name_='Major_Linker_Version')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function buildChildren
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'Hashes':
obj_ = HashesType4.factory()
obj_.build(child_)
self.set_Hashes(obj_)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"