.. bug in last patch: typo: cpe:/o missing ..

--
Eero

--- gather-package-list.nasl 2015-10-05 20:23:31.100357877 +0200

+++ /root/gather-package-list.nasl 2015-10-05 20:48:33.523465031 +0200

@@ -184,6 +184,12 @@

     "CentOS6", "cpe:/o:centos:centos:6",

     "CentOS7", "cpe:/o:centos:centos:7",



+    # Oracle Linux

+

+    "OracleLinux5", "cpe:/o:oraclelinux:oraclelinux:5",

+    "OracleLinux6,  "cpe:/o:oraclelinux:oraclelinux:6",

+    "OracleLinux7,  "cpe:/o:oraclelinux:oraclelinux:7",

+

     # Ubuntu

     "UBUNTU4.1",      "cpe:/o:canonical:ubuntu_linux:4.10",

     "UBUNTU5.04",     "cpe:/o:canonical:ubuntu_linux:5.04",

@@ -562,6 +568,37 @@

   exit( 0 );

 }



+# oraclelinux is almost like rhel .. but ..

+

+rls = ssh_cmd(socket:sock, cmd:"rpm -qf /etc/redhat-release");

+

+if( "oraclelinux-release-5" >< rls )

+{

+    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf
'%{NAME}~%{VERSION}~%{RELEASE};'");

+    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);

+    log_message(port:port, data:string("We are able to login and detect
that you are running OracleLinux release 5"));

+    register_detected_os(os:"OracleLinux release 5", oskey:"OracleLinux5");

+    exit(0);

+}

+

+if( "oraclelinux-release-6" >< rls )

+{

+    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf
'%{NAME}~%{VERSION}~%{RELEASE};'");

+    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);

+    log_message(port:port, data:string("We are able to login and detect
that you are running OracleLinux release 6"));

+    register_detected_os(os:"OracleLinux release 6", oskey:"OracleLinux6");

+    exit(0);

+}

+

+if( "oraclelinux-release-7" >< rls )

+{

+    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf
'%{NAME}~%{VERSION}~%{RELEASE};'");

+    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);

+    log_message(port:port, data:string("We are able to login and detect
that you are running OracleLinux release 7"));

+    register_detected_os(os:"OracleLinux release 7", oskey:"OracleLinux7");

+    exit(0);

+}

+

 # Ok...let's first check if this is a RedHat/Fedora Core/Mandrake release

 rls = ssh_cmd(socket:sock, cmd:"cat /etc/redhat-release");


2015-10-05 21:27 GMT+03:00 Eero Volotinen <[email protected]>:

> this patch adds support for oracle linux detection. oracle must be
> detected before RHEL as it's produces similar /etc/redhat-release output
>
>
> local security checks for oracle linux will follow soon..
>
>
> br,
>
>
> --
>
> Eero
>
>
> --- gather-package-list.nasl 2015-10-05 20:23:31.100357877 +0200
>
> +++ /root/gather-package-list.nasl 2015-10-05 20:15:14.106322431 +0200
>
> @@ -184,6 +184,12 @@
>
>      "CentOS6", "cpe:/o:centos:centos:6",
>
>      "CentOS7", "cpe:/o:centos:centos:7",
>
>
>
> +    # Oracle Linux
>
> +
>
> +    "OracleLinux5", "cpe:/oraclelinux:oraclelinux:5",
>
> +    "OracleLinux6,  "cpe:/oraclelinux:oraclelinux:6",
>
> +    "OracleLinux7,  "cpe:/oraclelinux:oraclelinux:7",
>
> +
>
>      # Ubuntu
>
>      "UBUNTU4.1",      "cpe:/o:canonical:ubuntu_linux:4.10",
>
>      "UBUNTU5.04",     "cpe:/o:canonical:ubuntu_linux:5.04",
>
> @@ -562,6 +568,37 @@
>
>    exit( 0 );
>
>  }
>
>
>
> +# oraclelinux is almost like rhel .. but ..
>
> +
>
> +rls = ssh_cmd(socket:sock, cmd:"rpm -qf /etc/redhat-release");
>
> +
>
> +if( "oraclelinux-release-5" >< rls )
>
> +{
>
> +    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf
> '%{NAME}~%{VERSION}~%{RELEASE};'");
>
> +    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
>
> +    log_message(port:port, data:string("We are able to login and detect
> that you are running OracleLinux release 5"));
>
> +    register_detected_os(os:"OracleLinux release 5",
> oskey:"OracleLinux5");
>
> +    exit(0);
>
> +}
>
> +
>
> +if( "oraclelinux-release-6" >< rls )
>
> +{
>
> +    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf
> '%{NAME}~%{VERSION}~%{RELEASE};'");
>
> +    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
>
> +    log_message(port:port, data:string("We are able to login and detect
> that you are running OracleLinux release 6"));
>
> +    register_detected_os(os:"OracleLinux release 6",
> oskey:"OracleLinux6");
>
> +    exit(0);
>
> +}
>
> +
>
> +if( "oraclelinux-release-7" >< rls )
>
> +{
>
> +    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf
> '%{NAME}~%{VERSION}~%{RELEASE};'");
>
> +    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
>
> +    log_message(port:port, data:string("We are able to login and detect
> that you are running OracleLinux release 7"));
>
> +    register_detected_os(os:"OracleLinux release 7",
> oskey:"OracleLinux7");
>
> +    exit(0);
>
> +}
>
> +
>
>  # Ok...let's first check if this is a RedHat/Fedora Core/Mandrake release
>
>  rls = ssh_cmd(socket:sock, cmd:"cat /etc/redhat-release");
>
>
>
>
_______________________________________________
Openvas-plugins mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-plugins

Reply via email to