FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function Analyzer has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Analyzer(encoding, finder, ctx=null){
    SmaliParser.setContext(ctx);

    var db = this.db = new AnalyzerDatabase(ctx);

Severity: Major
Found in src/Analyzer.js - About 2 hrs to fix

    Function initInstaller has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        initInstaller(){
            if(gAdmZip == null){
                gAdmZip = require('adm-zip');
            }
    
    
    Severity: Major
    Found in src/DexcaliburEngine.js - About 2 hrs to fix

      Function toJsonObject has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          toJsonObject( pOverride = {}, pExcludeList={}){
              let json = new Object();
              for(let i in this){
                  if(pExcludeList[i] === false) continue;
                  
      Severity: Minor
      Found in src/Device.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 showCFG has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      Analyzer.prototype.showCFG = function(bblocks, offset=0, prefix="", fn=null){
      
          if(bblocks.length==0 || bblocks[offset]==undefined){
              Logger.debug(offset+" => not block");
              return null;
      Severity: Minor
      Found in src/Analyzer.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 nextSingleGoto has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      function nextSingleGoto(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 toJsonObject has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          toJsonObject( pInclude=Configuration.PLATFORMS) {
              let o = new Object();
      
              for (let i in this) {
                  if(i=='ready') continue;
      Severity: Minor
      Found in src/Configuration.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 deploy has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      HookSet.prototype.deploy = function(){
          let hookManager = this.context.hook; //ctx.hook;
          let hook, method, hconfig;
      
          // if the hookset is already deployed only not deployed hooks are generated
      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

      File Disassembler.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var Chalk = require("chalk");
      var Op = require("./Opcode.js");
      const CONST = require("./CoreConst.js");
      const CLASS = require("./CoreClass.js");
      
      
      Severity: Minor
      Found in src/Disassembler.js - About 2 hrs to fix

        Util has 22 functions (exceeds 20 allowed). Consider refactoring.
        Open

        const Util = {
            ALPHA: 'abcdefghijklmnopqrstuvwxyz',
            ALPHANUM: 'abcdefghijklmnopqrstuvwxyz0123456789',
            FLAG_CR: FLAG_CR,
            FLAG_WS: FLAG_WS,
        Severity: Minor
        Found in src/Utils.js - About 2 hrs to fix

          Function dxc.fullscan.post_deploy has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  "dxc.fullscan.post_deploy": function (ctx, event) {
                      Logger.info("[INSPECTOR][TASK] Trying to restore previous data of DynLoaderInspector ... ");
                      let currentInspector = ctx.getInspector("DynamicLoader");
          
                      currentInspector.restore();
          Severity: Major
          Found in inspectors/DynamicLoader/main.js - About 2 hrs to fix

            Function analyzeBlocks has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                analyzeBlocks(pMethod){
                    
                    let blocks =  pMethod.getBasicBlocks();
            
                    if(blocks.length == 0) return null;
            Severity: Major
            Found in src/SmaliVM.js - About 2 hrs to fix

              Function toXml has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  toXml(){
                      let o = new Object();
              
                      o.$ = {};
                      for(let i in this.attributes){
              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 sendIntent has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  sendIntent(data, callbacks=null, pIntentFilter=null, force=false){
                      let msg = {stdout:null, stderr:null};
                      let pkg='', cmd='am start ';
                      let act = null, cat=null;
                      let cb = null;
              Severity: Minor
              Found in src/Device.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 findCyclicRef has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

              function findCyclicRef(obj,fullPath=[],endPath=[],cycle=0){
                  let path = fullPath, end=endPath, k=0;
                  if(cycle>cycleMax){
                      //console.log("[E] Max cycle : "+path.join('.'));
                      return false;
              Severity: Minor
              Found in src/BackupManager.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 setup has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  setup(pDeviceID = null, pReturnString =  true){
                      let cmd=null;
              
                      if(pReturnString)
                          cmd = this.path;
              Severity: Minor
              Found in src/AdbWrapper.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 callgraph_from has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

              GraphMaker.prototype.callgraph_from = function(obj, n=1, m=2){
                  let tree={ 
                      fqcn:obj.signature(), 
                      tags: obj.tags,
                      //internal:obj.hasTag(AnalysisHelper.TAG.Discover.Internal), 
              Severity: Minor
              Found in src/Graph.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 sendIntent has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  sendIntent(data, callbacks=null, pIntentFilter=null, force=false){
                      let msg = {stdout:null, stderr:null};
                      let pkg='', cmd='am start ';
                      let act = null, cat=null;
                      let cb = null;
              Severity: Major
              Found in src/Device.js - About 2 hrs to fix

                File Simplifier.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                'use strict';
                
                const CONST = require("./CoreConst.js");
                const CLASS = require("./CoreClass.js");
                const SmaliVM = require("./SmaliVM.js");
                Severity: Minor
                Found in src/Simplifier.js - About 2 hrs to fix

                  Function hookRoutine has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          var hookRoutine = co.wrap(function *() {
                              let session = null, pid=null, applications=null, bridge=null;
                              
                              let device = null;
                  
                  
                  Severity: Major
                  Found in src/HookManager.js - About 2 hrs to fix

                    Function start has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        start( pMethod, pThis, pArguments=null, pClearHeap=false){
                            let opt = null, margs=null, arr=null;
                    
                            // clean StackMemory 
                            this.stack.clear();
                    Severity: Major
                    Found in src/SmaliVM.js - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language