Showing 219 of 389 total issues
Function encrypt
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def encrypt(self, iput, key, size):
output = [0] * 16
# the number of rounds
nbrRounds = 0
# the 128 bit block to encode
- 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 decrypt
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def decrypt(self, iput, key, size):
output = [0] * 16
# the number of rounds
nbrRounds = 0
# the 128 bit block to decode
- 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 __init__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, file):
id = file.read(1)
if id != PROPERTY_FOLDER:
raise FormatError, 'folder id expected but %s found' % repr(id)
self.numfolders = self._read64Bit(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 bisect_check
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function bisect_check(bisect_firsthalf, bisect_secondhalf, addr) {
// INFO("bisect_check " + addr);
var iframe = document.createElement("iframe");
Function XSLTObject
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function XSLTObject(page, childrenaddr, nameaddr, elementaddr, xml) {
if (page === undefined) {
ERR("XSLTObject: A page object is required.");
}
Function stage1_xml
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stage1_xml(base=0x6b503000, nextaddr=None):
"""
Generates the exploit XML document. The parameter base must be an integer.
"""
Function stage1_xml
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stage1_xml(base=0x6b503000, nextaddr=None):
"""
Generates the exploit XML document. The parameter base must be an integer.
"""
Function stage1_xml
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stage1_xml(base=0x6b503000, nextaddr=None):
"""
Generates the exploit XML document. The parameter base must be an integer.
"""
Function stage1_xml
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stage1_xml(base=0x6b503000, nextaddr=None):
"""
Generates the exploit XML document. The parameter base must be an integer.
"""
Function call
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
RCE.prototype.call = function(fn, r0, r1, r2, r3, r4, forking) {
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, info, start, src_start, size, folder, archive, maxsize=None):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, info, start, src_start, size, folder, archive, maxsize=None):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, info, start, src_start, size, folder, archive, maxsize=None):
Avoid deeply nested control flow statements. Open
for g in gadgets_retrieved:
# gadget not found TODO: test
if ( len(g) > 8 or g == 'null' ):
ExploitHTTPHandler.send_empty_reply()
Avoid deeply nested control flow statements. Open
for g in gadgets_retrieved:
# gadget not found TODO: test
if ( len(g) > 8 or g == 'null' ):
ExploitHTTPHandler.send_empty_reply()
Avoid deeply nested control flow statements. Open
if len(gadgets_retrieved) != 9:
firstStageSuccessful = False
ExploitHTTPHandler.send_empty_reply()
logging.debug('Not enough gadgets {} '.format( len(gadgets_retrieved) ) )
Avoid deeply nested control flow statements. Open
if not candidate_port in used_socket_ports:
found = True
Avoid deeply nested control flow statements. Open
if len(gadgets_retrieved) != 6:
firstStageSuccessful = False
ExploitHTTPHandler.send_empty_reply()
logging.debug('Not enough gadgets {}'.format( len(gadgets_retrieved) ) )
Function decrypt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def decrypt(self, cipherIn, originalsize, mode, key, size, IV):
Avoid deeply nested control flow statements. Open
if (m_data < 0x10000) {
INFO("find_node_40: Invalid data value for text node: " + hex(m_data, 8) +
" (type offset: " + i*4 + ", dataoffset: " + dataoffset);
return null;
}