Enhancing smbclient with --grepable option

Stoian Ivanov sdr at bultra.com
Fri Dec 19 09:14:50 GMT 2003


   Hi All,
Attached is a little patch about source/client/client.c adding a new
option -g (--grepable) so the smbclient produce more grepable/cutable output
to -L switch. Now it is possible to do something like

smbclient -L $host -N -I $host_ip -g  | grep "^Disk|" |cut -d"|" -f2

to produce "bare" output of host's disk shares. If there is an interest  i
could submit nmap/smbclient based shell scripts for dumping of all SMB
shared files on given netowork

p.s. patch is against /client.c/1.254/Wed Nov  5 17:18:46 2003// with both
original and changed files included
p.p.s hope this could be useful
p.p.p.s this is my first patch submit, pls beare with me :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.c.patch.tgz
Type: application/x-compressed
Size: 37222 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20031219/acb77a04/client.c.patch.bin


More information about the samba-technical mailing list