# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           openssl 1.0

name                medusa
version             2.2
revision            0
checksums           rmd160  bcbc6337ca54eeec4441252d29ae18cf15283927 \
                    sha256  28bdcbdbc08b904a0e680cc42419c387b5baf86e27dd31e7f6651733ae1f3061 \
                    size    399836

categories          security net
license             {GPL-2 OpenSSLException}
maintainers         {wohner.eu:normen @Gminfly} openmaintainer

description         speedy, massively parallel, modular, login brute-forcer

long_description    Medusa is intended to be a speedy, massively parallel, \
                    modular, login brute-forcer. The goal is to support as \
                    many services which allow remote authentication as possible. \
                    The author considers following items as some of the key \
                    features of this application. Thread-based parallel testing: \
                    Brute-force testing can be performed against multiple hosts, \
                    users or passwords concurrently. Flexible user input: Target \
                    information (host/user/password) can be specified in a variety \
                    of ways. For example, each item can be either a single entry \
                    or a file containing multiple entries. Additionally, a \
                    combination file format allows the user to refine their target \
                    listing. Modular design: Each service module exists as an \
                    independent .mod file. This means that no modifications are \
                    necessary to the core application in order to extend the \
                    supported list of services for brute-forcing.

homepage            http://www.foofus.net/~jmk/medusa/medusa.html
master_sites        http://www.foofus.net/~jmk/tools/

openssl.branch      1.0

depends_lib-append  port:libssh2

patchfiles          configure.ac.patch

# We patch configure.ac.
use_autoreconf      yes

# --enable-untested
configure.args      --enable-module-rdp=no \
                    --enable-module-svn=no \
                    --enable-module-postgres=no \
                    --with-ssl=[openssl::install_area]

# All modules end up linked with libsvn_client-1.0.dylib, even if the svn
# module was not requested.
default_variants +subversion
if {![variant_isset subversion]} {
    variant_set subversion
}

variant subversion description "Build the Subversion module" {
    depends_lib-append port:subversion
    configure.args-replace \
                    --enable-module-svn=no \
                    --enable-module-svn=yes
}

# FIXME check building afpfs-ng, ncp

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     ${name}-(.*?)[quotemeta ${extract.suffix}]