Hi,
> > * scripts/gather-package-list.nasl changed dependencies to
> > ssh_authorization.nasl, added SuSE 11, Ubuntu 8.04
>
> so far IMHO this script was maintained by Thomas.
i'm sorry for changing this without asking here befor. It was not in my
opinion to break some dependencies. Right now i try to use the
gather-package-list for some scripts and it was not working with this not
existing ssh_settings.nasl.
>
> Thomas: do the changes break your keeping-in-sync-with-own-NASL-scripts?
> What can we do to help your process?
I've made also some additional changes to the script for recognizing SuSE
Distros. I've found that SuSE is named openSUSE since 10.2 and so the script
did not found actual versions. I have removed all one by one checks for the
Suse versions and added a global check. The result is of course the same and
this change should not break any dependencies.
The first changed rows are only cosmetics, removed some trailing whitespace...
If this change is ok, please let me know. Then i will commit it.
=== Schnipp ===
--- scripts/gather-package-list.nasl (Revision 917)
+++ scripts/gather-package-list.nasl (Arbeitskopie)
@@ -10,12 +10,12 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -25,10 +25,10 @@
{
script_id(50282);
script_version("$");
-
+
name["english"] = "Determine OS and list of installed packages via SSH
login";
script_name(english:name["english"]);
-
+
desc["english"] = "
This script will, if given a userid/password or
key to the remote system, login to that system,
@@ -38,12 +38,12 @@
Risk factor : None";
script_description(english:desc["english"]);
-
+
summary["english"] = "Determine OS and list of installed packages via SSH
login";
script_summary(english:summary["english"]);
-
+
script_category(ACT_GATHER_INFO);
-
+
script_copyright(english:"Copyright (c) 2008 E-Soft Inc.
http://www.securityspace.com");
family["english"] = "Misc.";
script_family(english:family["english"]);
@@ -579,93 +579,18 @@
}
# How about SuSe?
# SuSE Linux 9.x (i586)
-# SUSE LINUX 11
+# SUSE LINUX 11.0
-rls = ssh_cmd(socket:sock, cmd:"cat /etc/SuSE-release");
-if("SUSE LINUX 11 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE11");
+rls = toupper(ssh_cmd(socket:sock, cmd:"cat /etc/SuSE-release"));
-if("SUSE LINUX 11 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE11");
+if("SUSE"><rls) {
+ ver = eregmatch(pattern:"VERSION = ([0-9\.]+)", string:rls);
+ ver[max_index(ver)] = " ";
+ set_kb_item(name: "ssh/login/release", value: "SUSE"+ver[1]);
buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 11"));
+ security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux "+ver[1]));
exit(0);
}
-if("SUSE LINUX 10.3 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE10.3");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 10.3"));
- exit(0);
-}
-if("SUSE LINUX 10.2 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE10.2");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 10.2"));
- exit(0);
-}
-if("SUSE LINUX 10.1 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE10.1");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 10.1"));
- exit(0);
-}
-if("SuSE Linux 9.3 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE9.3");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 9.3"));
- exit(0);
-}
-if("SuSE Linux 9.2 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE9.2");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 9.2"));
- exit(0);
-}
-if("SuSE Linux 9.1 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE9.1");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 9.1"));
- exit(0);
-}
-if("SuSE Linux 9.0 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE9.0");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 9.0"));
- exit(0);
-}
-if("SuSE Linux 8.2 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE8.2");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 8.2"));
- exit(0);
-}
-if("SuSE Linux 8.1 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE8.1");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 8.1"));
- exit(0);
-}
-if("SuSE Linux 8.0 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE8.0");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 8.0"));
- exit(0);
-}
-if("SuSE Linux 7.3 "><rls) {
- set_kb_item(name: "ssh/login/release", value: "SUSE7.3");
- buf = ssh_cmd(socket:sock,
cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};'");
- set_kb_item(name: "ssh/login/rpms", value: ";" + buf);
- security_note(port:port, data:string("We are able to login and detect
that you are running SuSE Linux 7.3"));
- exit(0);
-}
# How about Trustix?
rls = ssh_cmd(socket:sock, cmd:"cat /etc/release");
=== Schnapp ===
--
Gruss
Carsten Koch-Mauthe
http://www.dn-systems.de mail: [EMAIL PROTECTED]
DN-Systems Enterprise Internet Solutions GmbH
Hornemannstr. 11 31137 Hildesheim, Germany
Tel. +49-5121-28989-0 Fax. +49-5121-28989-11
21 Sunrise Ct, S.San Francisco, CA 94080, USA
Tel. +1-650-472-2512 Mob. +1-650-430-1219
Handelsregister HRB-3213 Amtsgericht Hildesheim
Geschäftsführer Lukas Grunwald
_______________________________________________
Openvas-devel mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-devel