[package]
name = "legba"
description = "A fast multi protocol credential bruteforcer/sprayer/enumerator."
keywords = ["authentication", "bruteforce", "wordlist"]
version = "1.3.0"
authors = ["Simone Margaritelli <evilsocket@gmail.com>"]
license = "GPL-3.0"
edition = "2024"
readme = "README.md"
repository = "https://github.com/evilsocket/legba"
homepage = "https://github.com/evilsocket/legba"


[dependencies]
lazy_static = "1.4.0"

ahash = "0.8.3"
ansi_term = "0.12.1"
async-channel = "2.5.0"
async-trait = "0.1.73"
chrono = { version = "0.4.31", features = ["serde"] }
clap = { version = "4.4.4", features = ["derive"] }
clap_complete = "4.4.6"
ctrlc = "3.4.1"
indexmap = { version = "2.0.1", features = ["serde"] }
log = "0.4.20"
num_cpus = "1.16.0"
rlimit = "0.10.1"
serde = { version = "1.0.188", features = ["serde_derive"] }
serde_json = "1.0.107"
tokio = { version = "1.36.0", features = ["full"] }
itertools = "0.14.0"
rand = "0.9.0"
env_logger = "0.11.8"
memory-stats = "1.1.0"
human_bytes = "0.4.3"
hex = "0.4.3"
glob = "0.3.1"
cidr-utils = "0.6.1"
regex = { version = "1.9.5" }
url = { version = "2.5.4", optional = true }
reqwest = { version = "0.12.23", features = [
    "multipart",
    "socks",
    "cookies",
    "rustls-tls",
], optional = true }
base64 = { version = "0.22.1", optional = true }
ntlmclient = { version = "0.2.0", optional = true }
trust-dns-resolver = { version = "0.23.0", optional = true }
dns-lookup = { version = "2.0.4", optional = true }
async-ssh2-tokio = { version = "0.8.14", optional = true }
russh = { version = "0.51.1", optional = true }
sqlx = { version = "0.8.6", features = [
    "runtime-tokio",
    "tls-native-tls",
    "all-databases",
], optional = true }
async_ftp = { version = "6.0.0", optional = true }
async-smtp = { version = "0.10.2", optional = true }
async-pop = { version = "1.0.2", optional = true, default-features = false, features = [
    "runtime-tokio",
] }
async-native-tls = { version = "0.5.0", default-features = false, features = [
    "runtime-tokio",
] }
async-imap = { version = "0.11.1", default-features = false, features = [
    "runtime-tokio",
], optional = true }
mini-telnet = { version = "0.1.8", optional = true }
ldap3 = { version = "0.11.3", optional = true }
kerberos_crypto = { version = "0.3.6", optional = true }
kerberos_asn1 = { version = "0.2.1", optional = true }
kerberos_constants = { version = "0.0.10", optional = true }
vnc-rs = { version = "0.5.1", optional = true }
mongodb = { version = "3.2.4", optional = true }
sibyl = { version = "0.6.16", optional = true, features = [
    "tokio",
    "nonblocking",
] }
rdp-rs = { version = "0.1.0", optional = true }
scylla = { version = "1.3.1", optional = true }
rumqttc = { version = "0.24.0", optional = true }
csv = "1.3.0"
smb = { version = "0.9.0", optional = true }
fast-socks5 = { version = "0.10.0", optional = true }
shell-words = "1.1.0"
serde_yaml = "0.9.30"
actix-web = "4.8.0"
uuid = "1.10.0"
strip-ansi-escapes = "0.2.0"
actix-cors = "0.7.0"
x509-parser = "0.17.0"
lazy-regex = "3.2.0"
rmcp = { version = "0.6.0", features = ["server", "transport-sse-server", "transport-io"] }
random-string = "1.1.0"
dashmap = "6.1.0"
include_dir = "0.7.4"
evalexpr = { version = "12.0.2", features = ["regex"] }
snmp2 = { version = "0.4.8", features = ["tokio", "v3"], optional = true }

# force vendored openssl for every dependency
openssl = { version = '0.10', features = ["vendored"] }
openssl-sys = { version = '0.9', features = ["vendored"] }

# https://github.com/cross-rs/cross/issues/400#issuecomment-2487764365
[build-dependencies]
openssl = { version = '0.10', features = ["vendored"] }
openssl-sys = { version = '0.9', features = ["vendored"] }

[target.'cfg(unix)'.dependencies]
nix = { version = "0.29.0", features = ["signal"] }

[dev-dependencies]
tempfile = "3.8.0"
tokio-test = "0.4.3"
httpmock = "0.7.0"

[features]
default = [
    "http",
    "dns",
    "ssh",
    "mssql",
    "mqtt",
    "sql",
    "ftp",
    "smtp",
    "pop3",
    "imap",
    "irc",
    "telnet",
    "ldap",
    "kerberos",
    "vnc",
    "mongodb",
    "rdp",
    # "oracle", optional as it requires libclntsh that's a pain to install and configure
    "stomp",
    "amqp",
    "redis",
    "scylla",
    "port_scanner",
    "samba",
    "socks5",
    "snmp",
]
http = ["dep:url", "dep:reqwest", "dep:base64", "dep:ntlmclient"]
dns = ["dep:trust-dns-resolver", "dep:dns-lookup"]
ssh = ["dep:async-ssh2-tokio", "dep:russh"]
sql = ["dep:sqlx"]
mssql = []
mqtt = ["dep:rumqttc"]
ftp = ["dep:async_ftp"]
smtp = ["dep:async-smtp"]
pop3 = ["dep:async-pop"]
imap = ["dep:async-imap"]
irc = []
telnet = ["dep:mini-telnet"]
ldap = ["dep:ldap3"]
kerberos = [
    "dep:kerberos_crypto",
    "dep:kerberos_asn1",
    "dep:kerberos_constants",
]
vnc = ["dep:vnc-rs"]
mongodb = ["dep:mongodb"]
oracle = ["dep:sibyl"]
rdp = ["dep:rdp-rs"]
stomp = []
amqp = []
redis = []
scylla = ["dep:scylla"]
port_scanner = ["dep:reqwest"]
samba = ["dep:smb"]
socks5 = ["dep:fast-socks5"]
snmp = ["dep:snmp2"]

[profile.release]
lto = true        # Enable link-time optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations
panic = 'abort'   # Abort on panic
strip = true      # Strip symbols from binary

[profile.deb]
inherits = "release"
debug = false

[package.metadata.deb]
maintainer = "Simone Margaritelli <evilsocket@gmail.com>"
license-file = ["LICENSE", "0"]
section = "net"
priority = "optional"
assets = [
  ["target/release/legba", "usr/bin/", "755"],
  ["LICENSE", "usr/share/doc/legba/", "644"],
  ["README.md", "usr/share/doc/legba/README", "644"]
]
extended-description = """\
Legba is a multiprotocol credentials bruteforcer / password sprayer and enumerator 
built with Rust and the Tokio asynchronous runtime in order to achieve better 
performances and stability while consuming less resources than similar tools.
"""