Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does doActiveScan for each param of each request will make it more "distributed"? #5

Open
osxtest opened this issue Jan 2, 2023 · 0 comments

Comments

@osxtest
Copy link

osxtest commented Jan 2, 2023

Hi @albinowax

I notice that we will create a scan task for a request and its all eligible params according to the config.

IScanQueueItem scanItem = callbacks.doActiveScan(host, service.getPort(), using_https, itemToScanNext.getRequest(), next.offsets);

So I was thinking if we could create scan task for each param of each request, e.g.

if (!BurpExtender.scanned.contains(param_id)) {
insertionPoints.add(new int[]{param.getValueStart(),param.getValueEnd()});
BurpExtender.scanned.add(param_id);
}

		if (!BurpExtender.scanned.contains(param_id)) {
-			insertionPoints.add(new int[]{param.getValueStart(),param.getValueEnd()});
+			List<int[]> insertionPoint = new ArrayList<>();
+			insertionPoint.add(new int[]{param.getValueStart(), param.getValueEnd()});
+			if (scanItemsByHost.containsKey(host)) {
+				scanItemsByHost.get(host).add(new WorkTarget(request, insertionPoint));
+			} else {
+				ArrayDeque<WorkTarget> newQueue = new ArrayDeque<>();
+				newQueue.add(new WorkTarget(request, insertionPoint));
+				scanItemsByHost.put(host, newQueue);
+			}
			BurpExtender.scanned.add(param_id);
		}
	}

-	if (insertionPoints.isEmpty()) {
-		continue;
-	}
-
-	if (scanItemsByHost.containsKey(host)) {
-		scanItemsByHost.get(host).add(new WorkTarget(request, insertionPoints));
-	} else {
-		ArrayDeque<WorkTarget> newQueue = new ArrayDeque<>();
-		newQueue.add(new WorkTarget(request, insertionPoints));
-		scanItemsByHost.put(host, newQueue);
-	}

By doing this, we will create more scan tasks, and hopefully will make it more "distributed".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant