# $Id: Portfile 70324 2010-08-06 01:49:21Z ryandesign@macports.org $

PortSystem              1.0

name                    tcpxtract
version                 1.0.1
categories              net security
platforms               darwin
maintainers             yahoo.fr:jul_bsd openmaintainer

description             tool for extracting files from network traffic based \
                        on file signatures

long_description        ${name} is a ${description}. Extracting files based \
                        on file type headers and footers (sometimes called \
                        \"carving\") is an age old data recovery technique. \
                        Tools like Foremost employ this technique to recover \
                        files from arbitrary data streams. Tcpxtract uses \
                        this technique specifically for the application of \
                        intercepting files transmitted across a network. \
                        Other tools that fill a similar need are driftnet \
                        and EtherPEG. driftnet and EtherPEG are tools for \
                        monitoring and extracting graphic files on a network \
                        and are commonly used by network administrators to \
                        police the Internet activity of their users. The \
                        major limitations of driftnet and EtherPEG are that \
                        they only support three filetypes with no easy way \
                        of adding more. The search technique they use is \
                        also not scalable and does not search across packet \
                        boundaries.

homepage                http://tcpxtract.sourceforge.net/
master_sites            sourceforge

checksums               md5     1d8fe172d4590c33a157798e08dc0ccd \
                        sha1    48fce86ac87e5467cb671236a7247474f69bac9d \
                        rmd160  0577bdaa1ab57457c805fb49376aa305ae4d9457

depends_lib             port:libpcap

configure.args-append   --mandir=${prefix}/share/man

post-destroot {
    move ${destroot}${prefix}/etc/tcpxtract.conf ${destroot}${prefix}/etc/tcpxtract.conf.sample
}

post-activate {
    if {![file exists ${prefix}/etc/tcpxtract.conf]} {
        copy ${prefix}/etc/tcpxtract.conf.sample ${prefix}/etc/tcpxtract.conf
    }
}

notes "
To configure ${name}, edit ${prefix}/etc/${name}.conf
"
