FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function makeFnHashcode has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    makeFnHashcode: function(modif,cls,name,args,ret){
Severity: Minor
Found in src/SmaliParser.js - About 35 mins to fix

    Function parseIPv4 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        parseIPv4: function( pAddress, pHasPortNumber=false){
            const IPv4 = '(?<a>25[0–5]|2[0–4][0–9]|1[0-9]{2}|[0-9]{1,2})\.(?<b>25[0–5]|2[0–4][0–9]|1[0-9]{2}|[0-9]{1,2})\.(?<c>25[0–5]|2[0–4][0–9]|1[0-9]{2}|[0-9]{1,2})\.(?<d>25[0–5]|2[0–4][0–9]|1[0-9]{2}|[0-9]{1,2})';
            const PORT ='(?<port>[0-9]{1,5})' 
    
            if(pAddress == null) return { valid:false };
    Severity: Minor
    Found in src/Utils.js - About 35 mins 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 setAttributes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        setAttributes(attr){
            let n="";
            for(let i in attr){
                if(i.startsWith(ANDROID_PREFIX)){
                    n = i.substr(ANDROID_PREFIX_LEN);
    Severity: Minor
    Found in src/AndroidAppComponents.js - About 35 mins 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 setAttributes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        setAttributes(attr){
            let n="";
            for(let i in attr){
                if(i.startsWith(ANDROID_PREFIX)){
                    n = i.substr(ANDROID_PREFIX_LEN);
    Severity: Minor
    Found in src/AndroidAppComponents.js - About 35 mins 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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        toJsonObject(){
            let o = new Object();
    
            o.name = this.name;
            o.label = this.label;
    Severity: Minor
    Found in src/AndroidAppComponents.js - About 35 mins 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 searchType has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        searchType(cmp,format){
            let coll = new DataCollection();
            coll.context = this.context;
            
            for(let i=0; i<this.files.length; i++)
    Severity: Minor
    Found in src/DataAnalyzer.js - About 35 mins 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 findOffsetByLabel has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        findOffsetByLabel( pStack, pLabel, pType){
            for(let i=0; i<pStack.length; i++){
                if(pStack[i].t=='b'){
                    //console.log(pStack[i].i.getGotoLabel(), pLabel);
                    if(pType == CONST.INSTR_TYPE.IF && pStack[i].i.getCondLabel()==pLabel){
    Severity: Minor
    Found in src/SmaliVM.js - About 35 mins 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 setAttributes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        setAttributes(attr){
            let n="";
            for(let i in attr){
                if(i.startsWith(ANDROID_PREFIX)){
                    n = i.substr(ANDROID_PREFIX_LEN);
    Severity: Minor
    Found in src/AndroidAppComponents.js - About 35 mins 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 setclass has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        setclass: function(src,raw_src){
            let instr = new CLASS.Instruction(); 
            let m = (new RegExp(Core.PATTERN.CONST_CLASS_INSTR)).exec(raw_src);
            
            //console.log(m,raw_src);
    Severity: Minor
    Found in src/Opcode.js - About 35 mins 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 trim has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        trim: function(str){
            if(! str instanceof String) console.error("trim() : the argument must be a string");
    
            while(str[0]!=undefined && (str[0]=="\t"||str[0]==" ")) 
                str=str.substr(1);
    Severity: Minor
    Found in src/Utils.js - About 35 mins 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 print has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        print(){
            if(this.value instanceof VM_ClassInstance){
                return `type:${DTYPE_STRING[this.type]}, value:(ClassInstance)${this.value.parent.name}, code:${this.code}`;
            }
            else if(this.value instanceof CLASS.Class){
    Severity: Minor
    Found in src/SmaliVM.js - About 35 mins 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 field has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        field: function(db, fieldRef){
    
            let field = db.fields.getEntry(fieldRef.signature());
    
            if(field instanceof CLASS.Field){
    Severity: Minor
    Found in src/Analyzer.js - About 35 mins 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 type has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        type(src){
            let i=0,l=-1,types=[],s=src,fqn=null,isArray=false;
    
            while(i<src.length){
                if(src[i]==LEX.TOKEN.ARRAY){
    Severity: Minor
    Found in src/SmaliParser.js - About 35 mins 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 type has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

            type: function(src){
                let i=0,l=-1,types=[],s=src,fqn=null,isArray=false,m=null;
                
                while(i<src.length){
                    if(src[i]==CONST.LEX.TOKEN.ARRAY){
    Severity: Minor
    Found in src/CoreParser.js - About 35 mins 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 getField has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    Class.prototype.getField = function(pattern){
        let res0 = [], res1=[], rx={}, match=null;
        for(let i in pattern){
            rx[i] = new RegExp(pattern[i]);
        }
    Severity: Minor
    Found in src/CoreClass.js - About 35 mins 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 installServer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        static async installServer( pDevice, pOptions = {}){
            let ver, xzpath, path, arch, tmp;
    
    
            // retrieve frida version
    Severity: Minor
    Found in src/FridaHelper.js - About 35 mins 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 makeRetHelper has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    Hook.prototype.makeRetHelper = function(ret){
        if(ret == null) return null;
    
        let helper = {
            // Format string for the logger
    Severity: Minor
    Found in src/HookManager.js - About 35 mins 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 startServer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        static async startServer( pDevice, pOptions = { path:null, privileged:true }){
            if(pDevice == null) 
                throw new Error("[FRIDA HELPER] Unknow device. Device not connected not enrolled ?");
            if( (pDevice.getFridaServerPath() == null) && (pOptions.path == null))  
                throw new Error("[FRIDA HELPER] Path of Frida server is unknow");
    Severity: Minor
    Found in src/FridaHelper.js - About 35 mins 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

    Avoid too many return statements within this function.
    Open

                    return codePoint;
    Severity: Major
    Found in src/UTF8.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return BTYPE_DTYPE[pType.name];
      Severity: Major
      Found in src/SmaliVM.js - About 30 mins to fix
        Severity
        Category
        Status
        Source
        Language