Skip to content

Commit

Permalink
Merge pull request #533 from jjnicola/nasl-kb
Browse files Browse the repository at this point in the history
Fix openvas-nasl. Add kb key/value for all vhosts
  • Loading branch information
jjnicola authored Jun 18, 2020
2 parents 2d9b085 + 6269c33 commit d87fdbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Prevent child deadlock. [#491](https://github.com/greenbone/openvas/pull/491)
- Memleak fixes for kb_item_get_str(). [#502](https://github.com/greenbone/openvas/pull/502)
- Fix denied hosts. [#510](https://github.com/greenbone/openvas/pull/510)
- Fix openvas-nasl. Add kb key/value for all vhosts. [#533](https://github.com/greenbone/openvas/pull/533)

### Removed
- Removed "network scan" mode. This includes removal of NASL API methods "scan_phase()" and "network_targets()". Sending a "network_mode=yes" in a scanner configuration will have no effect anymore. [#493](https://github.com/greenbone/openvas/pull/493)
Expand Down
10 changes: 6 additions & 4 deletions nasl/nasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,16 +383,18 @@ main (int argc, char **argv)
}
if (kb_values)
{
while (*kb_values)
gchar **kb_values_aux = kb_values;
while (*kb_values_aux)
{
gchar **splits = g_strsplit (*kb_values, "=", -1);
gchar **splits = g_strsplit (*kb_values_aux, "=", -1);
if (splits[2] || !splits[1])
{
fprintf (stderr, "Erroneous --kb entry %s\n", *kb_values);
fprintf (stderr, "Erroneous --kb entry %s\n",
*kb_values_aux);
exit (1);
}
kb_item_add_str_unique (kb, splits[0], splits[1], 0);
kb_values++;
kb_values_aux++;
g_strfreev (splits);
}
}
Expand Down

0 comments on commit d87fdbe

Please sign in to comment.