FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function toXml has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    toXml(){
        let o = new Object();

        o.$ = {};
        for(let i in this.attributes){
Severity: Major
Found in src/AndroidAppComponents.js - About 3 hrs to fix

    AdbWrapper has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class AdbWrapper
    {
        static USB_TRANSPORT = 'U';
        static TCP_TRANSPORT = 'T';
        
    Severity: Minor
    Found in src/AdbWrapper.js - About 3 hrs to fix

      Function fromXml has 87 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function readTypedValue has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          readTypedValue() {
            const typedValue = {
              value: null,
              type: null,
              rawType: null
        Severity: Major
        Found in src/libs/BinaryXmlParser.js - About 3 hrs to fix

          Function _getTestFn has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              _getTestFn(dataModel, pattern, caseSensitive, lazy=false){
                  
                  //if(lazy===true) console.debug("LAZY mode detected !");
          
                  if(pattern==undefined || pattern.length==0){
          Severity: Minor
          Found in src/Finder.js - About 3 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 makeHookFor has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Symbol has 28 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Symbol
            {
                static SKIPPED = true;
            
                constructor(pVisibility, pType, pValue, pCode=null, pSkipped=false){
            Severity: Minor
            Found in src/SmaliVM.js - About 3 hrs to fix

              Function import has 83 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  import(pData){
                      let index = null, o=null, hook=null, qflag=0;
              
                      if(pData.classes.size > 0){
                          index = this._db.getIndex("classes");
              Severity: Major
              Found in inspectors/Saver/SaveManager.js - About 3 hrs to fix

                Function VM has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                function VM() {
                    this._reg= [];
                    this._regSize= 0;
                    this._local= [];
                    this._localSize= 0;
                Severity: Minor
                Found in src/VM.js - About 3 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 81 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

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

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

                    Function getMethod has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Class.prototype.getMethod = function(pattern, pExactMatch=0){
                        let res0 = [], res1=[], rx={}, match=null;
                        if(pExactMatch != CONST.EXACT_MATCH){
                            for(let i in pattern){
                                rx[i] = new RegExp(pattern[i]);
                    Severity: Minor
                    Found in src/CoreClass.js - About 3 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 _getTestFn has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _getTestFn(dataModel, pattern, caseSensitive, lazy=false){
                            
                            //if(lazy===true) console.debug("LAZY mode detected !");
                    
                            if(pattern==undefined || pattern.length==0){
                    Severity: Major
                    Found in src/Finder.js - About 3 hrs to fix

                      Function enroll has a Cognitive Complexity of 21 (exceeds 5 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 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 getMethodFromClass has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                      Open

                          getMethodFromClass( pClass, pName, pArgs){
                              let ok = null, arg=null;
                              let meths = pClass.getMethod({ name:pName }, CONST.EXACT_MATCH);
                      
                              if(meths.length==0) return null;
                      Severity: Minor
                      Found in src/SmaliVM.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 makeHookFor has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Hook.prototype.makeHookFor = 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

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

                          modifier(src){
                              if(src instanceof String) src=src.split(LEX.TOKEN.SPACE);
                              let mod = new Accessor.AccessFlags() , next=true;
                      
                              //if(src.length<2) return ERR_PARSE;
                      Severity: Major
                      Found in src/SmaliParser.js - About 2 hrs to fix

                        Function moveBasicBlock has 72 lines of code (exceeds 25 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: Major
                        Found in inspectors/BytecodeCleaner/service/main.js - About 2 hrs to fix

                          Function writeIndirectInvoke has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              writeIndirectInvoke( pInvokerObjRef, pInvokerArgRef, pInvokedMethod, pObj, pArgs){
                                  let irObj=null, irArg=null, ivObj=null, ivArg=null,  v = null, rThis=null, vThis=0, rArg=null, vArg=null;
                          
                                  irObj = this.vm.getRegisterName(pInvokerObjRef);
                                  ivObj = this.vm.stack.getLocalSymbol(irObj); 
                          Severity: Major
                          Found in src/SmaliVM.js - About 2 hrs to fix

                            BinaryXmlParser has 25 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class BinaryXmlParser {
                              constructor(buffer) {
                                this.buffer = buffer;
                                this.cursor = 0;
                                this.strings = [];
                            Severity: Minor
                            Found in src/libs/BinaryXmlParser.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language