File: control.nasl

package info (click to toggle)
openvas-scanner 23.38.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 22,468 kB
  • sloc: ansic: 41,621; xml: 6,251; pascal: 3,723; yacc: 1,250; sh: 1,068; makefile: 333; sql: 282; javascript: 12
file content (36 lines) | stat: -rw-r--r-- 712 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# SPDX-FileCopyrightText: 2023 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

function append(a, i, b) {
  a[i] = b;
  return a;
}

a = 1;
a++;
++a;
a = a * 2;
set_kb_item(name: "important/a", value: a);
for (i = 1; i < 5; i++)
  if (a % i == 0)
    display("result: " + (get_kb_item("important/a") + i));
  else
    display("nope");
b = 5;
while (b) {
  local_var c;
  c = (b -= 1);
  display(c);
}
b = append(a: b, i: 1, b: 42);
foreach d(b) 
  display(d);
d = 1;
repeat {
  d -= 1;
  display('hello '+ d); 
} until d == 0;
exit(d);