Sorin Coroian
Posts: 954
Joined: 9.Feb.2003
Status: offline
|
The script below will create a new node within its vulnerability. There are two new instructions: SetDescription, which change the default description text, and AddListItem, which will create a node and sub-items in that node. The script works only under Alternative credentials. The result in Scan Results window and filters will be like this:
Bios information for scanned computer BIOS info: Manufacturer: Award Software International, Inc. Serial Number: BIOS Version: 6.00 PG
Function Main Dim SocketObject As Object Dim objLocator As Object Dim objWMIService As Object Dim objBIOS As Object Dim ip, compip, compname, user, passwd As String
result = false cr = Chr(13) + Chr(10) compip = GetParameter("ComputerIP") user = GetParameter("User") passwd = GetParameter("Password") 'Socket.SetTimeout 1000,1000 ip = Socket.DnsLookup(Socket.ReverseDnsLookup("127.0.0.1")) If ip = compip Then user = "" 'currently logged on user mode for localhost passwd = "" End If Set objLocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = objLocator.ConnectServer (compip, "root\cimv2", user , passwd ) If objWMIService is Nothing Then echo ("Unable to create WMI Object") Else Set colBIOS = objWMIService.ExecQuery ("SELECT * FROM Win32_BIOS") For Each objBIOS In colBIOS echo("Bios information for scanned computer:" & cr) echo("Manufacturer: " & objBIOS.Manufacturer & cr) echo("Serial number: " & objBIOS.SerialNumber & cr) echo("BIOS Version: " & objBIOS.SMBIOSBIOSVersion) SetDescription("Bios information for scanned computer") AddListItem("","BIOS info:") AddListItem("BIOS info:","Manufacturer: " & objBIOS.Manufacturer) AddListItem("BIOS info:","Serial Number: " & objBIOS.SerialNumber) AddListItem("BIOS info:","BIOS Version: " & objBIOS.SMBIOSBIOSVersion) Next result = true End If main = result End Function
Sorin
|