FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function getDeviceByIP has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    getDeviceByIP( pIpAddress, pPort=null, pUp=true){
        let d=null, b=null;
        for(let i in this.devices){
            d = this.devices[i];
            for(let k in d.bridges){
Severity: Minor
Found in src/DeviceManager.js - About 2 hrs to fix

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 compare has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

Method.prototype.compare = function(meth){
    let diff = [];

    for(let i in this){
        switch(i){
Severity: Minor
Found in src/CoreClass.js - About 2 hrs to fix

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 start has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

     start(hook_script, pType=null, pExtra=null, pDevice=null){
        
        let target = null;
        let PROBE_SESSION = this.newSession();
        
Severity: Minor
Found in src/HookManager.js - About 2 hrs to fix

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 export has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    export(pExclude=null){
        let data={}, coll=null, pData=null;
        let self=this;

        data.methods = {data:{}, size:self._db.getIndex("methods").size()};
Severity: Minor
Found in inspectors/Saver/SaveManager.js - About 2 hrs to fix

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

DeviceManager has 24 functions (exceeds 20 allowed). Consider refactoring.
Open

class DeviceManager
{
    /**
     * To create an instance of DeviceManager
     * @param {Configuration} config The configuration object
Severity: Minor
Found in src/DeviceManager.js - About 2 hrs to fix

    Inspector has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Inspector{
        
        constructor(config){
            this.id = null;
            this.name = null;
    Severity: Minor
    Found in src/Inspector.js - About 2 hrs to fix

      Workspace has 24 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Workspace{
      
          /**
           * 
           * @param {*} pPath 
      Severity: Minor
      Found in src/Workspace.js - About 2 hrs to fix

        Function createInstance has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            createInstance( pProject){
                let ins = new Inspector.Inspector();
                let hs = null;
                let hooks = null;
        
        
        Severity: Major
        Found in src/InspectorFactory.js - About 2 hrs to fix

          Function runDecompile has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              runDecompile(pTree, pSource=[], pDepth=0, pStop=false, pClose=false){
                  let cont = true, source=pSource, res={ depth:0 }, succ=null, pred=[], d=null, tmp=null;
                  let next = [], ifelse=false;
                  
                  console.log(this.dump(pTree));
          Severity: Major
          Found in src/Decompiler.js - About 2 hrs to fix

            Function fromXml has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

                static fromXml(config, context){
                    let self = new AndroidManifest();
                    // init manifest attributes 
                    for(let i in config){
                        switch(i){
            Severity: Minor
            Found in src/AndroidAppComponents.js - About 2 hrs to fix

            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 findSingleGoto has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            function findSingleGoto(method){
                let found = {}, singles = [];
                
            
                // count GOTOs
            Severity: Minor
            Found in inspectors/BytecodeCleaner/service/main.js - About 2 hrs to fix

            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 makeArgsHelper has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            Hook.prototype.makeArgsHelper = function(args_arr){
                if(args_arr.length ==0) return null;
                let raw_name = null;
                let helper = {
                    // Value to pass to the "overload()" method of Frida
            Severity: Minor
            Found in src/HookManager.js - About 2 hrs to fix

            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 flatternGotoOf has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            function flatternGotoOf(method){
            
                let blocksToMove = null;
                let singleGoto = findSingleGoto(method);
                let ret = false;
            Severity: Minor
            Found in inspectors/BytecodeCleaner/service/main.js - About 2 hrs to fix

            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 searchInternalDependencies has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

                static searchInternalDependencies(_context_, activity){
                    if(activity==null) return false;
            
                    let cls = activity.getImplementedBy();
                    if(cls == null){
            Severity: Minor
            Found in inspectors/ApplicationTopography/src/ClassAnalyzer.js - About 2 hrs to fix

            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 VM has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function VM() {
                this._reg= [];
                this._regSize= 0;
                this._local= [];
                this._localSize= 0;
            Severity: Major
            Found in src/VM.js - About 2 hrs to fix

              Function show has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              FinderResult.prototype.show = function(){
                  let sub = [];
                  this.data.map((k,x)=>{
              
                      if(x instanceof CLASS.Method){
              Severity: Major
              Found in src/Finder.js - About 2 hrs to fix

                Function fullscan has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    async fullscan( pPath){
                        let elemnt=null;
                        let success  = false;
                
                        // scan OS/Platform
                Severity: Major
                Found in src/DexcaliburProject.js - About 2 hrs to fix

                  AndroidActivity has 23 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class AndroidActivity
                  {
                      static MODEL = {
                          allowEmbedded:["true" , "false"],
                          allowTaskReparenting:["true" , "false"],
                  Severity: Minor
                  Found in src/AndroidAppComponents.js - About 2 hrs to fix

                    InspectorManager has 23 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class InspectorManager
                    {
                        /**
                         * 
                         * @param {DexcaliburProject} pProject Project instance
                    Severity: Minor
                    Found in src/InspectorManager.js - About 2 hrs to fix

                      File Utils.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      const fs = require("fs");
                      const Process = require("child_process");
                      const Chalk = require("chalk");
                      const Path = require("path");
                      const crypto = require("crypto");
                      Severity: Minor
                      Found in src/Utils.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language