FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function execute has a Cognitive Complexity of 453 (exceeds 5 allowed). Consider refactoring.
Open

    execute( pInstrStack, pInstrOffset){
        let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, regZ=null, label=null, oper=null, tmp=[];
        let state = { code:[], jump:null, ret:null, inv:null};
        let regs = {};
        let indent = "    ".repeat(this.depth);
Severity: Minor
Found in src/SmaliVM.js - About 1 wk 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 SmaliVM.js has 3031 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

const CLASS = require("./CoreClass.js");
const CONST = require("./CoreConst.js");
const OPCODE = require('./Opcode.js').OPCODE;
Severity: Major
Found in src/SmaliVM.js - About 1 wk to fix

    Function initRoutes has 1442 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        initRoutes() {
            let $ = this;
    
            this.controller = this.newDispatcher("index.html");
    
    
    Severity: Major
    Found in src/WebServer.js - About 1 wk to fix

      File CoreClass.js has 2248 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var CONST = require("./CoreConst.js");
      const NodeCompare = require("./NodeCompare.js");
      const Accessor = require('./AccessFlags');
      
      const EOL =  require('os').EOL ;
      Severity: Major
      Found in src/CoreClass.js - About 6 days to fix

        Function execute has 1158 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            execute( pInstrStack, pInstrOffset){
                let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, regZ=null, label=null, oper=null, tmp=[];
                let state = { code:[], jump:null, ret:null, inv:null};
                let regs = {};
                let indent = "    ".repeat(this.depth);
        Severity: Major
        Found in src/SmaliVM.js - About 5 days to fix

          File Syscalls.js has 1964 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          const CLASS = require('./CoreClass.js');
          
          const SYSCALLS = [
          
              new CLASS.Syscall({
          Severity: Major
          Found in src/Syscalls.js - About 5 days to fix

            Function simplifyBasicBlock has a Cognitive Complexity of 249 (exceeds 5 allowed). Consider refactoring.
            Open

                simplifyBasicBlock(pBlock, pDepth=0){
                    let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
                    let indent = "    ".repeat(pDepth);
            
                    ops = pBlock.getInstructions();  ;  
            Severity: Minor
            Found in src/Decompiler.js - About 5 days 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 WebServer.js has 1641 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            const Express = require("express");
            const fs = require("fs");
            const MIME = require("mime-types");
            const Chalk = require("chalk");
            const VM = require("vm");
            Severity: Major
            Found in src/WebServer.js - About 4 days to fix

              File AndroidAppComponents.js has 1529 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              const Logger = require('./Logger.js')();
              const _md5_ = require('md5');
              
              const ANDROID_PREFIX = "android:";
              const ANDROID_PREFIX_LEN = 8;
              Severity: Major
              Found in src/AndroidAppComponents.js - About 4 days to fix

                Function decompileBasicBlock has a Cognitive Complexity of 196 (exceeds 5 allowed). Consider refactoring.
                Open

                    decompileBasicBlock(pBlock, pDepth=0){
                        let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
                        let indent = "    ".repeat(pDepth);
                
                        ops = pBlock.getInstructions();  ;  
                Severity: Minor
                Found in src/Decompiler.js - About 4 days 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 Decompiler.js has 1334 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                'use strict';
                
                const CLASS = require("./CoreClass.js");
                const CONST = require("./CoreConst.js");
                const OPCODE = require('./Opcode.js').OPCODE;
                Severity: Major
                Found in src/Decompiler.js - About 3 days to fix

                  File HookManager.js has 1251 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  var FRIDA = null; 
                  const co = require("co");
                  const fs = require("fs");
                  const md5 = require("md5");
                  const Chalk = require("chalk");
                  Severity: Major
                  Found in src/HookManager.js - About 3 days to fix

                    Function save has a Cognitive Complexity of 134 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function save(data,file){
                        let tab={}, src={}, block=null;
                    
                    
                        for(let i in data.classes){
                    Severity: Minor
                    Found in src/BackupManager.js - About 2 days 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 moveBasicBlock has a Cognitive Complexity of 121 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function moveBasicBlock(method, bblocks, gotoLabel){
                        //console.log("Moving basic blocks "+bblocks.offset+"(len:"+bblocks.blk.length+") at instr goto_"+gotoLabel);
                        let bbs = [], flag=false, lastWasGoto=false, endbb=0, tmp=null;
                        // find cut point
                        if( method.instr != null && method.instr.length > 0){
                    Severity: Minor
                    Found in inspectors/BytecodeCleaner/service/main.js - About 2 days 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 run has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
                    Open

                        run( pStack, pDepth=0){
                            let i=0, f=0, dec=null, msg=null, ctxRST=null, bbs=null, mode=SINGLE_MODE ;
                            let indent = "    ".repeat(this.depth);
                    
                            // add emulated method to callstack;
                    Severity: Minor
                    Found in src/SmaliVM.js - About 2 days 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 simplifyBasicBlock has 446 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        simplifyBasicBlock(pBlock, pDepth=0){
                            let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
                            let indent = "    ".repeat(pDepth);
                    
                            ops = pBlock.getInstructions();  ;  
                    Severity: Major
                    Found in src/Decompiler.js - About 2 days to fix

                      File main.js has 883 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      const Inspector = require("../../src/Inspector.js");
                      const InspectorFactory = require("../../src/InspectorFactory");
                      const Android = require("../../src/AndroidAppComponents.js");
                      
                      // ===== INIT =====
                      Severity: Major
                      Found in inspectors/PermissionAnalyser/main.js - About 2 days to fix

                        File Opcode.js has 865 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        var CONST = require("./CoreConst.js");
                        var Core = require("./CoreParser.js");
                        const CLASS = require("./CoreClass.js");
                        var ut = require("./Utils.js");
                        
                        
                        Severity: Major
                        Found in src/Opcode.js - About 2 days to fix

                          Function method has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                          Open

                              method(src, raw_src, src_line){
                                  if(this.state != SML_METH) return null;
                                  
                                  let sml=src, hdl=null, catchStmt=null, tmp=null;
                          
                          
                          Severity: Minor
                          Found in src/SmaliParser.js - About 1 day 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 Analyzer.js has 808 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          // global
                          var fs = require("fs");
                          var Chalk = require("chalk");
                          
                          var ut = require("./Utils.js");
                          Severity: Major
                          Found in src/Analyzer.js - About 1 day to fix
                            Severity
                            Category
                            Status
                            Source
                            Language