-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: issue when multiple forks happen
Given the nasl script: ``` set_kb_item(name: "port", value: 1); set_kb_item(name: "port", value: 2); set_kb_item(name: "port", value: 3); set_kb_item(name: "port", value: 4); set_kb_item(name: "port", value: 5); set_kb_item(name: "host", value: "a"); set_kb_item(name: "host", value: "b"); p = get_kb_item("port"); h = get_kb_item("host"); display(h, ":", p); ``` it should print every combination of host and port. This is done by dropping the requirement that only root processes are allowed to fork.
- Loading branch information
1 parent
e6abbc2
commit 9c42ee9
Showing
2 changed files
with
58 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
set_kb_item(name: "port", value: 1); | ||
set_kb_item(name: "port", value: 2); | ||
set_kb_item(name: "port", value: 3); | ||
set_kb_item(name: "port", value: 4); | ||
set_kb_item(name: "port", value: 5); | ||
|
||
set_kb_item(name: "host", value: "a"); | ||
set_kb_item(name: "host", value: "b"); | ||
|
||
p = get_kb_item("port"); | ||
h = get_kb_item("host"); | ||
|
||
display(h, ":", p); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters