Jump to content

Problem with Perl module, SmbClientParser-2.6


Guest Leviathan
 Share

Recommended Posts

Guest Leviathan

Hi,

I'm trying to use SmbClientParser to implement a simple SMB crawler. After a lot of effort, I still could not get it to work. Here is my small test script:

#!/usr/bin/perl

use POSIX;
use Filesys::SmbClientParser;
use DBI();
use Socket;
use Sys::Hostname;
use strict;

my $host;

my $smb = new Filesys::SmbClientParser
 (undef,
  (
   user     => '',
   password => ''
  ));
  
 $smb->Debug('1'); 
 
 $smb->Host('localhost');
  
 my @l = $smb->GetShr;
 foreach (@l) {print $_->{name},"\n";}

 

All i got for the output is the default usage of smbclient

 ==> SmbClientParser::command /usr/bin/smbclient     -d1-L '\\localhost'  -D "/"
Usage: [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER]
       [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST]
       [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan]
       [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES]
       [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL]
       [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE]
       [-V|--version] [-O|--socket-options SOCKETOPTIONS]
       [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP]
       [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos]
       [-A|--authentication-file FILE] [-S|--signing on|off|required]
       [-P|--machine-pass] service <password>

 

I'm using Samba 3.0.2a on Mandrake Linux 10. Any help would be very much appreciated. Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...