#!/opt/vdops/bin/perl # This scripts reads a text file containing a WINS database dump and # inserts the results into Soma # The text dump was created as follows # c:\temp\netsh wins server 10.5.72.20 show database servers={10.5.72.20,10.5.92.20,10.5.122.27,10.5.192.20} file=c:\temp\wins.txt # # ***You have Read and Write access to the server ad0.company.com*** # # ... ... # # Total No of records retrieved for the server 10.5.42.20 : 7052 # # # Total No of records displayed : 7052 # # Command completed successfully. # c:\temp # # Load modules use strict; use warnings; use Perl6::Say; use lib '/home/soma/lib'; use FHCRC::VDOPS::SomaCrud; use FHCRC::VDOPS::SomaData; use FHCRC::VDOPS::Utilities; use FHCRC::VDOPS::WINSTools; # Declare local variables my $name_ref; # Threads and debugs $debug = 0; # Notify operator log_it("Beginning $0"); say "Beginning $0" if $job eq 'interactive'; # Build data structure $name_ref = extract_wins_names($wins_file); %netBiosName = %$name_ref; # Insert results iu_hosts_netbios(); # Notify operator log_it("Ending $0"); say "Ending $0" if $job eq 'interactive';