[862] | 1 | '\" t
|
---|
| 2 | .\" Title: log2pcap
|
---|
| 3 | .\" Author: [see the "AUTHOR" section]
|
---|
| 4 | .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
|
---|
| 5 | .\" Date: 09/18/2013
|
---|
| 6 | .\" Manual: User Commands
|
---|
| 7 | .\" Source: Samba 3.6
|
---|
| 8 | .\" Language: English
|
---|
| 9 | .\"
|
---|
| 10 | .TH "LOG2PCAP" "1" "09/18/2013" "Samba 3\&.6" "User Commands"
|
---|
| 11 | .\" -----------------------------------------------------------------
|
---|
| 12 | .\" * Define some portability stuff
|
---|
| 13 | .\" -----------------------------------------------------------------
|
---|
| 14 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
---|
| 15 | .\" http://bugs.debian.org/507673
|
---|
| 16 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
---|
| 17 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
---|
| 18 | .ie \n(.g .ds Aq \(aq
|
---|
| 19 | .el .ds Aq '
|
---|
| 20 | .\" -----------------------------------------------------------------
|
---|
| 21 | .\" * set default formatting
|
---|
| 22 | .\" -----------------------------------------------------------------
|
---|
| 23 | .\" disable hyphenation
|
---|
| 24 | .nh
|
---|
| 25 | .\" disable justification (adjust text to left margin only)
|
---|
| 26 | .ad l
|
---|
| 27 | .\" -----------------------------------------------------------------
|
---|
| 28 | .\" * MAIN CONTENT STARTS HERE *
|
---|
| 29 | .\" -----------------------------------------------------------------
|
---|
| 30 | .SH "NAME"
|
---|
| 31 | log2pcap \- Extract network traces from Samba log files
|
---|
| 32 | .SH "SYNOPSIS"
|
---|
| 33 | .HP \w'\ 'u
|
---|
| 34 | log2pcap [\-h] [\-q] [logfile] [pcap_file]
|
---|
| 35 | .SH "DESCRIPTION"
|
---|
| 36 | .PP
|
---|
| 37 | This tool is part of the
|
---|
| 38 | \fBsamba\fR(7)
|
---|
| 39 | suite\&.
|
---|
| 40 | .PP
|
---|
| 41 | log2pcap
|
---|
| 42 | reads in a samba log file and generates a pcap file (readable by most sniffers, such as ethereal or tcpdump) based on the packet dumps in the log file\&.
|
---|
| 43 | .PP
|
---|
| 44 | The log file must have a
|
---|
| 45 | \fIlog level\fR
|
---|
| 46 | of at least
|
---|
| 47 | \fB5\fR
|
---|
| 48 | to get the SMB header/parameters right,
|
---|
| 49 | \fB10\fR
|
---|
| 50 | to get the first 512 data bytes of the packet and
|
---|
| 51 | \fB50\fR
|
---|
| 52 | to get the whole packet\&.
|
---|
| 53 | .SH "OPTIONS"
|
---|
| 54 | .PP
|
---|
| 55 | \-h
|
---|
| 56 | .RS 4
|
---|
| 57 | If this parameter is specified the output file will be a hex dump, in a format that is readable by the
|
---|
| 58 | text2pcap
|
---|
| 59 | utility\&.
|
---|
| 60 | .RE
|
---|
| 61 | .PP
|
---|
| 62 | \-q
|
---|
| 63 | .RS 4
|
---|
| 64 | Be quiet\&. No warning messages about missing or incomplete data will be given\&.
|
---|
| 65 | .RE
|
---|
| 66 | .PP
|
---|
| 67 | logfile
|
---|
| 68 | .RS 4
|
---|
| 69 | Samba log file\&. log2pcap will try to read the log from stdin if the log file is not specified\&.
|
---|
| 70 | .RE
|
---|
| 71 | .PP
|
---|
| 72 | pcap_file
|
---|
| 73 | .RS 4
|
---|
| 74 | Name of the output file to write the pcap (or hexdump) data to\&. If this argument is not specified, output data will be written to stdout\&.
|
---|
| 75 | .RE
|
---|
| 76 | .PP
|
---|
| 77 | \-h|\-\-help
|
---|
| 78 | .RS 4
|
---|
| 79 | Print a summary of command line options\&.
|
---|
| 80 | .RE
|
---|
| 81 | .SH "EXAMPLES"
|
---|
| 82 | .PP
|
---|
| 83 | Extract all network traffic from all samba log files:
|
---|
| 84 | .PP
|
---|
| 85 | .if n \{\
|
---|
| 86 | .RS 4
|
---|
| 87 | .\}
|
---|
| 88 | .nf
|
---|
| 89 | $ log2pcap < /var/log/* > trace\&.pcap
|
---|
| 90 |
|
---|
| 91 | .fi
|
---|
| 92 | .if n \{\
|
---|
| 93 | .RE
|
---|
| 94 | .\}
|
---|
| 95 | .PP
|
---|
| 96 | Convert to pcap using text2pcap:
|
---|
| 97 | .PP
|
---|
| 98 | .if n \{\
|
---|
| 99 | .RS 4
|
---|
| 100 | .\}
|
---|
| 101 | .nf
|
---|
| 102 | $ log2pcap \-h samba\&.log | text2pcap \-T 139,139 \- trace\&.pcap
|
---|
| 103 |
|
---|
| 104 | .fi
|
---|
| 105 | .if n \{\
|
---|
| 106 | .RE
|
---|
| 107 | .\}
|
---|
| 108 | .SH "VERSION"
|
---|
| 109 | .PP
|
---|
| 110 | This man page is correct for version 3 of the Samba suite\&.
|
---|
| 111 | .SH "BUGS"
|
---|
| 112 | .PP
|
---|
| 113 | Only SMB data is extracted from the samba logs, no LDAP, NetBIOS lookup or other data\&.
|
---|
| 114 | .PP
|
---|
| 115 | The generated TCP and IP headers don\*(Aqt contain a valid checksum\&.
|
---|
| 116 | .SH "SEE ALSO"
|
---|
| 117 | .PP
|
---|
| 118 | \fBtext2pcap\fR(1),
|
---|
| 119 | \fBethereal\fR(1)
|
---|
| 120 | .SH "AUTHOR"
|
---|
| 121 | .PP
|
---|
| 122 | The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
|
---|
| 123 | .PP
|
---|
| 124 | This manpage was written by Jelmer Vernooij\&.
|
---|