add support for amazon linux checks
--- /tmp/gather-package-list.nasl 2015-02-25 09:02:12.000000000 +0100
+++ /var/lib/openvas/plugins/gather-package-list.nasl 2015-08-17
19:47:45.944796165 +0200
@@ -133,6 +133,9 @@
"RHENT_6", "cpe:/o:redhat:enterprise_linux:6",
"RHENT_7", "cpe:/o:redhat:enterprise_linux:7",
+ # Amazon Linux
+ "AMAZON", "cpe:/o:amazon:linux",
+
# Mandriva/Mandrake
"MNDK_7.2", "cpe:/o:mandrakesoft:mandrake_linux:7.2",
"MNDK_8.0", "cpe:/o:mandrakesoft:mandrake_linux:8.0",
@@ -835,6 +838,17 @@
exit(0);
}
+# Amazon linux
+rls = ssh_cmd(socket:sock, cmd:"cat /etc/system-release");
+
+if("Amazon Linux AMI release" >< rls) {
+ buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf
'%{NAME}~%{VERSION}~%{RELEASE};\n'");
+ 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 Amazon Linux"));
+ register_detected_os(os:"Amazon", oskey:"AMAZON");
+ exit(0);
+}
+
# Hmmm...is it Ubuntu?
rls = ssh_cmd(socket:sock, cmd:"cat /etc/lsb-release");
if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=4.10"><rls) {
br,
Eero
_______________________________________________
Openvas-plugins mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-plugins