Cool thanks for the mods!
Another thing I noticed is that if you make use of the exists command, you can eliminate this loop
foreach my $software (keys %bad_stuff) { if($subkey =~ $bad_stuff{$software}) { next if($installed_software{$machine.$software}++); print "Machine $machine could have $software installed\n"; } }
So it would be something like:
foreach my $subkey ($user_key->SubKeyNames,$software_key->SubKeyNames) + { if ( exists $bad_stuff{$subkey} ) { print "Machine $computer could have $subkey installed\n"; } }
Finally, one other thing concerning the getservers option:
GetServers("", $domain, SV_TYPE_ALL, \%machines) or die "GetServers failed: $!\n";This will pick up samba servers which will error off since they don't have a registry.
If make use of SV_TYPE_SERVER_UNIX you could build an exclusion section to keep them out. Otherwise, you add to the run time as it tries to open a non-existent registry. I had to do that as I have about 20 of them. There are other issues such as a network appliance box but not everybody has those. I can post code if you are intersted. I figured you like to play so I didn't ;-)
In reply to Re: Scan Win32 Machines in domain for P2P software
by Marza
in thread Scan Win32 Machines in domain for P2P software
by davis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |