#!/usr/bin/perl -w # Script to deliver the IP address or get name based on WINS data use strict; my $command = "nmblookup \'$ARGV[0]\#03\'"; my @contents = `$command`; while (<@contents>) { if ($_ =~ /\d+\.\d+\.\d+\.\d+/) { m/(\d+\.\d+\.\d+\.\d+)/; print $1 unless ($1 eq '10.0.255.255'); } }
In reply to Updated simple code
by Kickstart
in thread Samba, Linux, Winbind, UTMP, usernames and IP addresses
by Kickstart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |