Showing 1,373 of 3,020 total issues
File sem.py
has 4353 lines of code (exceeds 250 allowed). Consider refactoring. Open
#
# Copyright (C) 2011 EADS France, Fabrice Desclaux <fabrice.desclaux@eads.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
File arch.py
has 3761 lines of code (exceeds 250 allowed). Consider refactoring. Open
#-*- coding:utf-8 -*-
from __future__ import print_function
from builtins import range
import re
File arch.py
has 2720 lines of code (exceeds 250 allowed). Consider refactoring. Open
#-*- coding:utf-8 -*-
from builtins import range
from future.utils import viewitems
File win_api_x86_32.py
has 2634 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import print_function
#
# Copyright (C) 2011 EADS France, Fabrice Desclaux <fabrice.desclaux@eads.net>
#
# This program is free software; you can redistribute it and/or modify
File data_flow.py
has 1918 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Data flow analysis based on miasm intermediate representation"""
from builtins import range
from collections import namedtuple, Counter
from pprint import pprint as pp
from future.utils import viewitems, viewvalues
File sem.py
has 1821 lines of code (exceeds 250 allowed). Consider refactoring. Open
from builtins import range
from future.utils import viewitems
from miasm.expression.expression import ExprId, ExprInt, ExprLoc, ExprMem, \
ExprCond, ExprCompose, ExprOp, ExprAssign
File sem.py
has 1788 lines of code (exceeds 250 allowed). Consider refactoring. Open
from builtins import range
from future.utils import viewitems, viewvalues
from miasm.expression.expression import *
from miasm.expression.simplifications import expr_simp
File arch.py
has 1728 lines of code (exceeds 250 allowed). Consider refactoring. Open
#-*- coding:utf-8 -*-
from builtins import range
from future.utils import viewitems, viewvalues
File expression.py
has 1643 lines of code (exceeds 250 allowed). Consider refactoring. Open
#
# Copyright (C) 2011 EADS France, Fabrice Desclaux <fabrice.desclaux@eads.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Function simp_cst_propagation
has a Cognitive Complexity of 210 (exceeds 5 allowed). Consider refactoring. Open
def simp_cst_propagation(e_s, expr):
"""This passe includes:
- Constant folding
- Common logical identities
- Common binary identities
- 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 gen_modrm_form
has a Cognitive Complexity of 201 (exceeds 5 allowed). Consider refactoring. Open
def gen_modrm_form():
global db_afs_64, sib_64_s08_ebp
ebp = 5
sib_s08_ebp = [{f_isad: True} for i in range(0x100)]
- 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 simplifications_common.py
has 1535 lines of code (exceeds 250 allowed). Consider refactoring. Open
# ----------------------------- #
# Common simplifications passes #
# ----------------------------- #
from future.utils import viewitems
File pe.py
has 1470 lines of code (exceeds 250 allowed). Consider refactoring. Open
#! /usr/bin/env python
from __future__ import print_function
from builtins import range, str
from collections import defaultdict
File llvmconvert.py
has 1463 lines of code (exceeds 250 allowed). Consider refactoring. Open
#
#
# Miasm2 Extension: #
# - Miasm2 IR to LLVM IR #
# - JiT #
File objc.py
has 1424 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
C helper for Miasm:
* raw C to Miasm expression
* Miasm expression to raw C
* Miasm expression to C type
File cpu.py
has 1364 lines of code (exceeds 250 allowed). Consider refactoring. Open
#-*- coding:utf-8 -*-
from builtins import range
import re
import struct
File elf.py
has 1349 lines of code (exceeds 250 allowed). Consider refactoring. Open
#! /usr/bin/env python
from miasm.loader.cstruct import CStruct
class Ehdr(CStruct):
Function add_ir
has a Cognitive Complexity of 164 (exceeds 5 allowed). Consider refactoring. Open
def add_ir(self, expr):
"Add a Miasm2 IR to the last bbl. Return the var created"
if self.main_stream is True and expr in self.expr_cache:
return self.expr_cache[expr]
- 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 types.py
has 1269 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""This module provides classes to manipulate pure C types as well as their
representation in memory. A typical usecase is to use this module to
easily manipylate structures backed by a VmMngr object (a miasm sandbox virtual
memory):
File asmblock.py
has 1109 lines of code (exceeds 250 allowed). Consider refactoring. Open
#-*- coding:utf-8 -*-
from builtins import map
from builtins import range
import logging