FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

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

    parse(src){
        let ls=src.split(EOL), ln=null, sml=null, obj=null;
    
        //console.log(ls);
        for(let l=0; l<ls.length; l++){
Severity: Major
Found in src/SmaliParser.js - About 2 hrs to fix

    Function analyzeBlocks has 54 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/Simplifier.js - About 2 hrs to fix

      Function merge has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          merge( pDevice){
              for(let i in pDevice){
                  switch(i){
                      case 'enrolled':
                          if(pDevice.enrolled)
      Severity: Major
      Found in src/Device.js - About 2 hrs to fix

        Function importManifest has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            async importManifest(path){
                let codeAnal = this.context.getAnalyzer();
                let self = this;
                let data = null;
        
        
        Severity: Major
        Found in src/AndroidAppAnalyzer.js - About 2 hrs to fix

          Function toJsonObject has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Class.prototype.toJsonObject = function(filter){
              let obj = new Object(), m=null;
              for(let i in this){
                  if(["_","$"].indexOf(i[0])==-1 
                      && (typeof this[i] != 'array')
          Severity: Major
          Found in src/CoreClass.js - About 2 hrs to fix

            Function verify has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
            Open

                verify(){
                    let verif={ length:0, msg:{} };
                    for(let i in this){
            
                        switch(i)
            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 toJsonObject has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
            Open

                toJsonObject(){
                    let o = new Object();
                    o.visibility = this.visibility;
                
                    
            Severity: Minor
            Found in src/AccessFlags.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 MethodReference has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function MethodReference(cfg){
                this.fqcn = null;
                this.name = null;
                this.args = null;
                this.ret = null;
            Severity: Major
            Found in src/CoreClass.js - About 2 hrs to fix

              Function analyzeBlocks has 52 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/Decompiler.js - About 2 hrs to fix

                Function hook.dex.classloader.new has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        "hook.dex.classloader.new": function (ctx, event) {
                            // 1. save gathered bytecode to a file
                            // 2. disassemble this file 
                            // 3. Analyze & update graph
                            // 4. Workspace cleanup
                Severity: Major
                Found in inspectors/DynamicLoader/main.js - About 2 hrs to fix

                  Function toJsonObject has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Field.prototype.toJsonObject = function(fields=null,exclude=null){
                      let obj = new Object();
                      /*if(fields.length>0){
                          for(let i in fields){
                              if(this[fields[i]] != null && (typeof this[fields[i]] == "object")){
                  Severity: Major
                  Found in src/CoreClass.js - About 2 hrs to fix

                    Function parse has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      parse() {
                        const xmlHeader = this.readChunkHeader();
                        if (xmlHeader.chunkType !== ChunkType.XML) {
                          throw new Error('Invalid XML header');
                        }
                    Severity: Minor
                    Found in src/libs/BinaryXmlParser.js - About 2 hrs to fix

                      Function buildCustomScript has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Hook.prototype.buildCustomScript = function(method){
                          if(method instanceof CLASS.MissingReference){
                              console.log(Chalk.bold.yellow("TODO : implement MissingReference probing"));
                              this.enable = false;
                              return null;
                      Severity: Minor
                      Found in src/HookManager.js - About 2 hrs to fix

                        Function writeInvoke has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            writeInvoke( pMethodRef, pParamsReg){
                                let v = null, rThis=null, vThis=0, rArg=null, vArg=null;
                        
                                if(pParamsReg.length > 0){
                                    rThis = this.vm.getRegisterName(pParamsReg[0]);
                        Severity: Minor
                        Found in src/SmaliVM.js - About 1 hr to fix

                          Function newDispatcher has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              newDispatcher( pHome){
                                  let $ = this;
                          
                                  return function (req, res) {
                                      //console.log(req.path);
                          Severity: Minor
                          Found in src/WebServer.js - About 1 hr to fix

                            Function enroll has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                async enroll( pDevice, pOtions = {}){
                            
                            
                            
                                    let device = null, success=false, pf=null, pm=PlatformManager.getInstance();
                            Severity: Minor
                            Found in src/DeviceManager.js - About 1 hr to fix

                              Function scan has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  scan(path){
                                      let db = this.db;
                                      let detector = this.detector;
                                      let ctr = 0, file=null, ctx=this.context;
                                      //Logger.info("[DATA ANALYZER] Start scan of : ",path);
                              Severity: Minor
                              Found in src/DataAnalyzer.js - About 1 hr to fix

                                Function compare has 48 lines of code (exceeds 25 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 1 hr to fix

                                  Function SearchAPI has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function SearchAPI(data){
                                      
                                      // AnalyzerDatabase (specialize InMemoryDb)
                                      var _db = this._db = data;
                                      this._queryCache = [];
                                  Severity: Minor
                                  Found in src/Finder.js - About 1 hr 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 15 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      toJsonObject(include=null){
                                          let o = new Object();
                                          for(let i in this){
                                  
                                              if(include instanceof Array && include.indexOf(i)==-1) continue;
                                  Severity: Minor
                                  Found in src/CoreClass.js - About 1 hr 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language