Skip to content

Commit

Permalink
Add header to newly detected files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehforsch committed Jan 9, 2025
1 parent d9e16f4 commit 39f1171
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 8 deletions.
4 changes: 4 additions & 0 deletions nasl/nasl_krb5.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

#include "nasl_krb5.h"

#include "../misc/openvas-krb5.h"
Expand Down
4 changes: 4 additions & 0 deletions nasl/nasl_krb5.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

#include "nasl_lex_ctxt.h"
#include "nasl_tree.h"

Expand Down
4 changes: 4 additions & 0 deletions rust/examples/feed/nasl/1.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

if (description)
{
script_oid("0.0.0.0.0.0.0.0.0.1");
Expand Down
4 changes: 4 additions & 0 deletions rust/examples/feed/nasl/2.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

if (description)
{
script_oid("0.0.0.0.0.0.0.0.0.2");
Expand Down
4 changes: 4 additions & 0 deletions rust/examples/feed/nasl/error_message.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

if (description)
{
script_oid("0.0.0.0.0.0.0.0.0.5");
Expand Down
4 changes: 4 additions & 0 deletions rust/examples/feed/nasl/http2_get.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

if (description)
{
script_oid("0.0.0.0.0.0.0.0.0.6");
Expand Down
4 changes: 4 additions & 0 deletions rust/examples/feed/nasl/log_message.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

if (description)
{
script_oid("0.0.0.0.0.0.0.0.0.3");
Expand Down
4 changes: 4 additions & 0 deletions rust/examples/feed/nasl/security_message.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

if (description)
{
script_oid("0.0.0.0.0.0.0.0.0.4");
Expand Down
12 changes: 6 additions & 6 deletions rust/examples/feed/nasl/sha256sums
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
1685505110659defb2d310f54950128fa5cc8867f89ff35cb647228e091e87e9 ./1.nasl
88924cd3cbec2b070afd45fcd4aabd9096763379eb816c200b3dc4abfae96b08 ./2.nasl
85e4c46356ab18d34de67efd6c3b778d61e2de858d334ce17cc3ca8d0ee62c69 ./error_message.nasl
97669d7129c6a92197bfd414c610feb89eeaa0be7fe1b3d7b2c25fa49b16fa8c ./2.nasl
8f349ff124775d38be5242c97caa8a8568e66de4a334599a549e1f0f444fc8ee ./1.nasl
2cd9f921dd86b4170f4499e0e7d2aae393b7a014976a72dc81d28b4fa7e1dd5f ./http2_get.nasl
4837adf4f6ff07b1378ca6deb3d468621242e89d2349a21c0744b294c35af4cf ./security_message.nasl
85902178e00a8a25b4559936504685ed41a2815c7f16e23f8926b515711d8239 ./log_message.nasl
2e21d3f6973e02e74ebc10dcc4ca77e7fbe414d6a8b985b2e0cda0111199a6aa ./plugin_feed_info.inc
35c0de9dcf2cdf84d3f7731a9ca036bb6ad97bbbbc595bb3c0c90094c1e8577e ./log_message.nasl
82b8531619fc6518c31f04b29207b702098357b2bd7538642d063488447d5b2e ./security_message.nasl
231eda974fc891bc72dd53a9923cfeb1c39d6284e59ec7bf3dd941e48678f07e ./error_message.nasl
c22fd805b4cee8b230bf1b00a6ebfd0c44770784eacc89edef18edcac2c77a31 ./http2_get.nasl
4 changes: 4 additions & 0 deletions rust/examples/get_kb_item.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

set_kb_item(name: "test", value: 1);
set_kb_item(name: "test", value: 2);
set_kb_item(name: "test", value: 3);
Expand Down
4 changes: 4 additions & 0 deletions rust/examples/gss.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

#display('do more hate-driven-development');
#result = krb5_gss_init();
#if (krb5_is_failure(result)) {
Expand Down
4 changes: 4 additions & 0 deletions rust/examples/ssh_netconf.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

## This script uses a non-interactive (non pty) shell to elevate privileges
## in an ssh session.

Expand Down
4 changes: 4 additions & 0 deletions rust/examples/wmi-exec.nasl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

login = string( get_kb_item( "KRB5/login_filled/0" ) );
password = string( get_kb_item( "KRB5/password_filled/0" ) );
realm = string( get_kb_item( "KRB5/realm_filled/0" ) );
Expand Down
4 changes: 4 additions & 0 deletions rust/tests/data/crash-prefix-recursion.nasl
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

[3 [-p0[[S[[[[[[[[z4[[a[[[[,[[[[[[[[[[[z4[[a[[[,[[[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[[[a[[[[,[[[[[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[[[[[,[[[[[[[[[[[[[[[[a[[[[,[[[[[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[[[[[,[[[[[[[[[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[,[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[[[a[[[[,[[[[[[[[[Q[[[[[[[[[[[[[[[a[[[[,[[[[[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[,[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[[[a[[[[,[[[[[[[[s[[[[[[[[[[[[[[[[[a[[[[,[[[[[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[,[[[[[[[[[[[[[[s[[[[[[[[[[[[[[[[[a[[[[,[[[[[[[[[Q[[[[[[[[[[[[[[[[[[[%[[[[[[[[[[
4 changes: 4 additions & 0 deletions rust/tests/data/crash-recursion-depth.nasl
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

i~f&((((((((((((((((((((((((((((((((+(((((((((((re(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((~f&((((((((((((((((((((((((((((((((+(((((((((((re(((((((((((((((((((((((((((((((((((((((((((((((((((((~f&((((((((((((((((((((((((((((((((+(((((((((((re((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((~f&((((((((((((((((((((((((((((((((+(((((((((((re(((((((((((,i
4 changes: 2 additions & 2 deletions rust/tests/nasl_syntax_missing_input_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn validate_recursion_depth_to_prevent_stackoverflow() {
// Reported by @sepehrdaddev, VSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:L/SA:H
// Crash due to depth limit on recursion.
let code = include_str!("data/crash-recursion-depth.nasl");
assert_eq!(code.len(), 587);
assert_eq!(code.len(), 708);
let result = scannerlib::nasl::syntax::parse(code).collect::<Vec<_>>();

assert_eq!(
Expand All @@ -17,7 +17,7 @@ fn validate_recursion_depth_to_prevent_stackoverflow() {
);

let code = include_str!("data/crash-prefix-recursion.nasl");
assert_eq!(code.len(), 515);
assert_eq!(code.len(), 636);
let result = scannerlib::nasl::syntax::parse(code).collect::<Vec<_>>();
assert_eq!(
result.iter().filter_map(|x| x.as_ref().ok()).count(),
Expand Down

0 comments on commit 39f1171

Please sign in to comment.