Showing 446 of 948 total issues
Function toJsonObject
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
toJsonObject(exclude=[]){
let o = new Object();
for(let i in this){
if(exclude.indexOf(i)>-1) continue;
if(this[i]==null) 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 hook.reflect.method.get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
"hook.reflect.method.get": function (ctx, event) {
Logger.info("[INSPECTOR][TASK] DynLoaderInspector search Method ");
//console.log(event);
if (event == null || event.data == null || event.data.data == null) 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 SecurityScanner
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SecurityScanner(SearchApi,context)
{
this.finder = SearchApi;
this.context = context;
Function makeArgsHelper
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Hook.prototype.makeArgsHelper = function(args_arr){
if(args_arr.length ==0) return null;
let raw_name = null;
let helper = {
// Value to pass to the "overload()" method of Frida
Function findTargetBasicBlocks
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function findTargetBasicBlocks(method, gotoLabel){
//console.log("Searching block at :goto_"+gotoLabel);
let targetBBs = null, found=false, offset=0, duplicate=false;
if( method.instr != null && method.instr.length > 0){
for(let i=0; i<method.instr.length ; i++){
Function useProductionMode
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
useProductionMode(){
const projectDependentPath = [
'/api/hook',
'/api/probe',
'/api/find',
Function toJsonObject
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
toJsonObject( pOverride = {}, pExcludeList={}){
let json = new Object();
for(let i in this){
if(pExcludeList[i] === false) continue;
Function installServer
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
static async installServer( pDevice, pOptions = {}){
let ver, xzpath, path, arch, tmp;
// retrieve frida version
Function buildCommand
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
buildCommand(){
let str = '';
console.log(this);
- 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 checkIfEligible
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function checkIfEligible(method){
let notElgible = [
CONST.INSTR_TYPE.IF,
CONST.INSTR_TYPE.SWITCH,
- 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 synchronizePlatform
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
async synchronizePlatform( pName){
let pm = PlatformManager.getInstance(), res=false;
// select platform
switch(pName){
Function verify
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
verify(){
let verif={ length:0, msg:{} };
for(let i in this){
switch(i)
Function scan
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
async scan(){
let dev=[], wrapper=null, activeDev = 0, latestDefault=null;
latestDefault = this.getDefault();
Function makeTree
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Analyzer.prototype.makeTree = function(bblocks){
let last = {};
for(let i=0; i<bblocks.length; i++){
bblocks[i].offset = i;
if(bblocks[i].stack.length > 0){
Function __checkDeepField
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
__checkDeepField(object,search, offset=0){
let ref=object, i=offset;
if(object == null) return false;
Function hook.reflect.method.get
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
"hook.reflect.method.get": function (ctx, event) {
Logger.info("[INSPECTOR][TASK] DynLoaderInspector search Method ");
//console.log(event);
if (event == null || event.data == null || event.data.data == null) return false;
Function getBinding
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.getBinding = function(bind,clsFqcn){
let cls=null, ef=null, x=null, hash=null;
if(clsFqcn === undefined)
clsFqcn = bind.fqcn;
Function fromString
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
static fromString( pType, pArrayStr){
const RE = new RegExp('[\s\t]*\[[\s\t]*(?<ctn>.*)[\s\t]*\][\s\t]*');
let m = RE.exec(pArrayStr);
if(m == null){
throw new VM_Exception('VM002','Unable to parse bytearray parameter: invalid format');
Function getImmediateValue
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
getImmediateValue(pSymbol, pSeparator="", pForce=false){
let v="";
switch(pSymbol.type)
{
case DTYPE.IMM_STRING:
Function deploy
has 33 lines of code (exceeds 25 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