SourceForge Logo
NAME
    Win32::NBTStat - object-oriented wrapper around the Windows "nbtstat"
    command.

SYNOPSIS
      use Win32::NBTStat;

      $foo = new Win32::NBTStat( ip => '10.0.0.42' );

      print "MAC address: ", $foo->mac, "\n";
  
      print "Computer name: ", $foo->computername, "\n";

      print "Domain or workgroup: ", $foo->domain, "\n";
  
      print "Logged in user: ", $foo->username, "\n";

      print "NetBIOS table analysis: \n", $foo->FormatTable;

DESCRIPTION
    An object-oriented wrapper around the Windows "nbtstat" command.

    Given an IP address or computer name, this class will run the nbtstat
    command and analyze the results to determine various useful information
    about the target machine.

    The main use for this thing is for portscanning your own LAN.

AUTHOR
    Jeff Robertson <jeff_robertson@yahoo.com>

COPYRIGHT
    Copyright (c) 2001 Jeff Robertson. All rights reserved. This program is
    free software; you can redistribute it and/or modify it under the same
    terms as Perl itself.

REFERENCE
  METHODS

    new
        Constructs a new instance. The system is looked up either by its
        name or its IP address, depending on the parameters.

                new Win32::NBTStat( ip => '10.0.0.42' );

        looks up the machine using the supplied IP address.

                new Win32::NBTStat( name => 'foobox' );

        looks up the machine by name, presumably using WINS.

    computername
        Returns the NetBIOS computer name (not neccessarily the DNS name) of
        the target machine, if found.

    domain
        Returns the Windows Workgroup or NT Domain of the target machine, if
        found.

    username
        Returns the Windows username of the user who is currently logged
        into the target machine, if the machine was found and anyone is
        logged in.

    mac 
        Returns the MAC address of the target machine, if found. Will
        probably not be available or meaningful if the target machine is not
        directly connected to the same network as yours.

    table
        Returns a parsed version of the target machines NetBIOS table, if
        found.

        The table is an referece to an array-of-arrays. Each "row" of the
        table is an array containing the following items:

        0.  A registered NetBIOS name string.

        1.  The 2-digit hex suffix that is used to indicate what the name is
            for.

        2.  A type that identifies the name as 'UNIQUE' or 'GROUP'.

        3.  A guess about which NT service probably registered the name.

        4.  A guess about what the name represents.

    FormatTable
        Formats the information returned by table() as a printable string.