[Openvas-commits] r5459 - in trunk/openvas-plugins: . scripts
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Oct 9 13:06:04 CEST 2009
Author: mime
Date: 2009-10-09 13:06:01 +0200 (Fri, 09 Oct 2009)
New Revision: 5459
Modified:
trunk/openvas-plugins/ChangeLog
trunk/openvas-plugins/scripts/js.scob.trojan.nasl
Log:
Removed smb_file_funcs.inc as a dependencie
Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog 2009-10-09 10:33:31 UTC (rev 5458)
+++ trunk/openvas-plugins/ChangeLog 2009-10-09 11:06:01 UTC (rev 5459)
@@ -1,5 +1,11 @@
2009-10-09 Michael Meyer <michael.meyer at intevation.de>
+ * scripts/js.scob.trojan.nasl:
+ Modified so that it don't need smb_file_funcs.inc
+ anymore.
+
+2009-10-09 Michael Meyer <michael.meyer at intevation.de>
+
* scripts/secpod_ms08-067_900056.nasl:
Now the right Bugfix.
Modified: trunk/openvas-plugins/scripts/js.scob.trojan.nasl
===================================================================
--- trunk/openvas-plugins/scripts/js.scob.trojan.nasl 2009-10-09 10:33:31 UTC (rev 5458)
+++ trunk/openvas-plugins/scripts/js.scob.trojan.nasl 2009-10-09 11:06:01 UTC (rev 5459)
@@ -55,25 +55,30 @@
include("smb_nt.inc");
-include("smb_file_funcs.inc");
+include("secpod_smb_func.inc");
-
rootfile = registry_get_sz(key:"SOFTWARE\Microsoft\Windows NT\CurrentVersion", item:"SystemRoot");
if (! rootfile)
exit(0);
-file[0] = string(rootfile, "\\system32\\kk32.dll");
-file[1] = string(rootfile, "\\system32\\Surf.dat");
+files[0] = string(rootfile, "\\system32\\kk32.dll");
+files[1] = string(rootfile, "\\system32\\Surf.dat");
-for (mu=0; file[mu]; mu++)
+foreach file (files)
{
- myread = smb_file_read(file:file[mu], count:4, offset:0);
- if (! egrep(string:myread, pattern:"^ERROR"))
- security_hole(port);
+ share = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:file);
+ file = ereg_replace(pattern:"[A-Z]:(.*)", replace:"\1", string:file);
+ myread = read_file(file:file, share:share, offset:0,count:4);
+ if (myread) {
+ security_hole(port);
+ exit(0);
+ }
}
+exit(0);
+
More information about the Openvas-commits
mailing list