ANSSI-FR/polichombr

View on GitHub

Showing 1,243 of 1,244 total issues

Line is too long. [957/80]
Open

        strArg = [nil, 'TokenUser', 'TokenGroups', 'TokenPrivileges', 'TokenOwner', 'TokenPrimaryGroup', 'TokenDefaultDacl', 'TokenSource', 'TokenType', 'TokenImpersonationLevel', 'TokenStatistics', 'TokenRestrictedSids', 'TokenSessionId', 'TokenGroupsAndPrivileges', 'TokenSessionReference', 'TokenSandBoxInert', 'TokenAuditPolicy', 'TokenOrigin', 'TokenElevationType', 'TokenLinkedToken', 'TokenElevation', 'TokenHasRestrictions', 'TokenAccessInformation', 'TokenVirtualizationAllowed', 'TokenVirtualizationEnabled', 'TokenIntegrityLevel', 'TokenUIAccess', 'TokenMandatoryPolicy', 'TokenLogonSid', 'TokenIsAppContainer', 'TokenCapabilities', 'TokenAppContainerSid', 'TokenAppContainerNumber', 'TokenUserClaimAttributes', 'TokenDeviceClaimAttributes', 'TokenRestrictedUserClaimAttributes', 'TokenRestrictedDeviceClaimAttributes', 'TokenDeviceGroups', 'TokenRestrictedDeviceGroups', 'TokenSecurityAttributes', 'TokenIsRestricted', 'MaxTokenInfoClass'][carg]

Line is too long. [102/80]
Open

  if calculateSizeSubCallTree(fromaddr, toaddr, [[0, false]], countSubCallTree(fromaddr, toaddr)) > 20

Use snake_case for method names.
Open

def isFuncTreeLink(fromaddr, toaddr)

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for variable names.
Open

          currFunc += 'c' if di.opcode.name == 'call'

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Line is too long. [151/80]
Open

      toaddr << dasm.normalize(di.instruction.args.first) if (di.opcode.name == 'call') && dasm.normalize(di.instruction.args.first).to_s =~ /^[0-9]+$/

Use snake_case for method names.
Open

def repareIatLinks

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for variable names.
Open

@tbFuncName = {}

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Line is too long. [151/80]
Open

      toaddr << dasm.normalize(di.instruction.args.first) if (di.opcode.name == 'call') && dasm.normalize(di.instruction.args.first).to_s =~ /^[0-9]+$/

Line is too long. [103/80]
Open

              printCallTree(dasm.normalize(ep), orifunc) if isFuncTreeLink(dasm.normalize(ep), orifunc)

Use snake_case for variable names.
Open

      @fullHashSign += format('%08x', MurmurHash.murmur3_32_str_hash(currFunc)) + ":#{addr.to_s(16)};"

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Line is too long. [136/80]
Open

  if (di.opcode.name == 'mov') && MetasmUtils.is_modrm(di.instruction.args.last) && di.instruction.args.last.to_s =~ /dword ptr \[e.*\]/

Line is too long. [138/80]
Open

  next unless (di.opcode.name == 'xor') && (di.instruction.args.first.to_s != di.instruction.args.last.to_s) && MetasmUtils.is_looping(di)

Line is too long. [101/80]
Open

            log("  *   #{PoliUtils.poliLinkAddr(ref_from)} call #{PoliUtils.poliLinkAddr(orifunc)}.")

Use snake_case for method names.
Open

def printSubCallTree(fromaddr, toaddr, indent, cnt)

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Rename is_linked_block to linked_block?.
Open

  def self.is_linked_block(di, start_address)

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Line is too long. [91/80]
Open

        while blocks.include?(di.block.from_normal[i]) && (i < di.block.from_normal.length)

Use snake_case for variable names.
Open

            currFunc += (y + 1).to_s.to_s if to_ref == @treetbfunc[y][0]

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Line is too long. [109/80]
Open

            dasm.function[secAddr + i + pattAddr] = (dasm.function[:default] || dasm.DecodedFunction.new).dup

Line is too long. [85/80]
Open

        strings << [di.address, argStr.gsub(/[\x0d]/n, '\\r').gsub(/[\x0a]/n, '\\n')]

Line is too long. [95/80]
Open

    log("\nPotential crypto loop at #{PoliUtils.poliLinkAddr(di.address)} '#{di.instruction}'")
Severity
Category
Status
Source
Language