Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Sat Apr 20, 2024 10:00 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Thu Aug 17, 2006 5:12 am 
Offline
Newbie

Joined: Wed Aug 16, 2006 4:23 am
Posts: 19
I had a problem wih the Dell servers showing serial number so I added this to the vbs script:
[code]Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure",,48)
For Each objSMBIOS in colSMBIOS
bios_asset_tag = objSMBIOS.SerialNumber
Next

Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each objItem in colItems
Descrip = clean(objItem.Description)
Manufacturer = clean(objItem.Manufacturer)
SerialNumber = clean(objItem.SerialNumber)
SMBIOSBIOSVersion = clean(objItem.SMBIOSBIOSVersion)
Version = clean(objItem.Version)
Next

form_input = "bios^^^" & Descrip & "^^^" _
& Manufacturer & "^^^" _
& SerialNumber & "^^^" _
& SMBIOSBIOSVersion & "^^^" _
& Version & "^^^" _
& bios_asset_tag & "^^^"
entry form_input,comment,objTextFile,oAdd,oComment
form_input = ""[/code]

then I added this to the system_summary.php file:

[code]$sql2 = "SELECT * from Bios WHERE bios_uuid = '$pc'";
$result2 = mysql_query($sql2, $db);
if ($myrow2 = mysql_fetch_array($result2))
{
$assettag = $myrow2["bios_asset_tag"];
}
if ($myrow = mysql_fetch_array($result)){
if ($assettag = $myrow["system_id_number"])
{
$serialnum = $myrow["system_id_number"];
}
elseif ($myrow["system_id_number"] = ' ')
{
$serialnum = $myrow2["bios_asset_tag"];
}
else
{
$serialnum = $myrow["system_id_number"];
}[/code]

and then replaced $myrow["system_id_number"] to $serialnum where the page data gets displayed.

Probably a better and cleaner way to do it but I am new to PHP and fairly new to VBScript.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 17, 2006 5:17 am 
Offline
Newbie

Joined: Wed Aug 16, 2006 4:23 am
Posts: 19
[quote="mikeyrb"]I believe I fixed it, at least my 2k server shows up properly now. The issue involved multiple NIC's, or at least multiple IP devices where one did not have an IP address. The changes were made in revision 48 of audit.avbs, and here's a URL to the diffs: [url]http://svn.sourceforge.net/viewvc/open-audit/trunk/scripts/audit.vbs?r1=23&r2=48[/url]

What changes have you made to the VBS? If you think we'd want them, let us know so we can add them to the svn!


SWEEEEEEET! it worked. Thanks. I will be adding a bunch of other detection stuff as I go and will gladly post it up here when I have tested it and I know it works.

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group