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);
Function initInstaller
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
initInstaller(){
if(gAdmZip == null){
gAdmZip = require('adm-zip');
}
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;
- Read upRead up
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;
- Read upRead up
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
- Read upRead up
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;
- Read upRead up
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
- Read upRead up
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");
Util
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
const Util = {
ALPHA: 'abcdefghijklmnopqrstuvwxyz',
ALPHANUM: 'abcdefghijklmnopqrstuvwxyz0123456789',
FLAG_CR: FLAG_CR,
FLAG_WS: FLAG_WS,
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();
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;
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){
- Read upRead up
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;
- Read upRead up
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;
- Read upRead up
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;
- Read upRead up
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),
- Read upRead up
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;
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");
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;
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();