Skip to content

Commit 76234c5

Browse files
committed
Fix: kb items for scannerctl
There was a missmatch, when using a hostname instead of an IP address as a target. The kb items were written to the IP address, where as they were read using the original target string.
1 parent a9dc3ab commit 76234c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/src/nasl/utils/scan_ctx.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ impl<'a> ScanCtx<'a> {
439439
KbContextKey(
440440
(
441441
self.scan.clone(),
442-
storage::Target(self.target.original_target_str().to_string()),
442+
storage::Target(self.target.ip_addr().to_string()),
443443
),
444444
key,
445445
)
@@ -464,7 +464,7 @@ impl<'a> ScanCtx<'a> {
464464
.retrieve(&GetKbContextKey(
465465
(
466466
self.scan.clone(),
467-
storage::Target(self.target.original_target_str().into()),
467+
storage::Target(self.target.ip_addr().to_string()),
468468
),
469469
key.clone(),
470470
))?

0 commit comments

Comments
 (0)