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 Thu Mar 28, 2024 7:03 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Sun Dec 16, 2007 5:34 am 
Offline
Contributor

Joined: Fri Sep 28, 2007 12:07 am
Posts: 189
I have modified search.php to include searching of all other items. now any items discovered by nmap audits are no searchable:

Open search.php:

Replace lines 191-197 which should be:

[code]
$sql = "SELECT DISTINCT other_network_name, other_id, other_ip_address, other_mac_address, other_description FROM other WHERE ";
$sql .= "other_mac_address LIKE '%$search%'";

$result = mysql_query($sql, $db);
if ($myrow = mysql_fetch_array($result)){
do {
if (strpos(strtoupper($myrow["other_mac_address"]), $search) !== false){$search_field = "Device MAC Address"; $search_result = $myrow["other_mac_address"];}
[/code]

With:

[code]
$sql = "SELECT DISTINCT other_network_name, other_id, other_ip_address, other_mac_address, other_description FROM other WHERE ";
$sql .= "other_mac_address LIKE '%$search%' OR ";
$sql .= "other_ip_address LIKE '%$search%' OR ";
$sql .= "other_network_name LIKE '%$search%' OR ";
$sql .= "other_description LIKE '%$search%'";

$result = mysql_query($sql, $db);
if ($myrow = mysql_fetch_array($result)){
do {
if (strpos(strtoupper($myrow["other_mac_address"]), $search) !== false){$search_field = "Device MAC Address"; $search_result = $myrow["other_mac_address"];}
if (strpos(strtoupper($myrow["other_ip_address"]), $search) !== false){$search_field = "Device IP Address"; $search_result = $myrow["other_ip_address"];}
if (strpos(strtoupper($myrow["other_network_name"]), $search) !== false){$search_field = "Device Name"; $search_result = $myrow["other_network_name"];}
if (strpos(strtoupper($myrow["other_description"]), $search) !== false){$search_field = "Device Description"; $search_result = $myrow["other_description"];}
[/code]

This now includes searching over Other, MAC address, IP address, Network Name, and Description. This is helpful for searching for routers, switches, firewalls etc, that audit.vbs does not pick up.

Let me know if there are any questions/concerns.

Jason

_________________
OA Deployment:
Windows 2003 with XAMPP install
80 Windows Servers
250 Windows workstations (mixed XP and 2000)
5 MACs
Multiple printers, switches, routers, firewalls, and other servers (ESX, AIX etc.)


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 16, 2007 7:27 am 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
Jason, searching for other_ip_address is already existent (look at the '// Search for IP address into "other" table' section, some rows ahead), but I like the searching for other_description.

_________________
Edoardo


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 17, 2007 4:26 am 
Offline
Contributor

Joined: Fri Sep 28, 2007 12:07 am
Posts: 189
Fine for IP address, but I wasn't able to search for "other device name" or "other description".

thanks

Jason

_________________
OA Deployment:
Windows 2003 with XAMPP install
80 Windows Servers
250 Windows workstations (mixed XP and 2000)
5 MACs
Multiple printers, switches, routers, firewalls, and other servers (ESX, AIX etc.)


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.  [ 3 posts ] 

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:  
Powered by phpBB® Forum Software © phpBB Group