inspectors/DynamicLoader/main.js
File main.js
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const Fs = require("fs");
const Path = require("path")
const HOOK = require("../../src/HookManager.js");
const CLASS = require("../../src/CoreClass.js");
Function dxc.fullscan.post_deploy
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 hook.dex.classloader.new
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Function hook.reflect.method.get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
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 hook.reflect.method.get
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;