You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins/dns.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ DNS subdomain enumeration.
7
7
|`--dns-resolvers <DNS_RESOLVERS>`| Comma separatd list of DNS resolvers to use instead of the system one. |
8
8
|`--dns-port <DNS_PORT>`| Resolver(s) port [default: `53`]|
9
9
|`--dns-attempts <DNS_ATTEMPTS>`| Number of retries after lookup failure before giving up [default: `1`]|
10
+
|`--dns-ip-lookup`| Perform ip to hostname lookup. |
11
+
|`--dns-max-positives <DNS_MAX_POSITIVES>`| If more than this amount of sequential DNS resolutions point to the same IP, add that IP to an ignore list [default: `10`]|
12
+
|`--dns-no-https`| Do not fetch HTTPS certificates for new domains. |
Copy file name to clipboardExpand all lines: docs/usage.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ For plugins that accept a single payload, like subdomain enumeration:
19
19
20
20
```bash
21
21
legba dns \
22
-
--payload /path/to/subdomains.txt \
22
+
--payloads /path/to/subdomains.txt \
23
23
--target example.com
24
24
```
25
25
@@ -36,6 +36,7 @@ The `--target/-T` argument supports one or multiple targets expressed as one of
36
36
*`--target 192.168.1.1-10`, `--target 192.168.1.1-10:22` IP range (with or without port).
37
37
*`--target 192.168.1.0/24`, `--target 192.168.1.0/24:22` CIDR (with or without port).
38
38
*`--target 10.0.0.1, 172.0.0.1:2222, @other-targets.txt, 192.168.1.1-10` any comma separated combination of them.
39
+
* IPv6 CIDR is also supported, with port specified as `:[port]`, e.g. `--target 2001:db8::/126:[443]`.
39
40
40
41
## Providing Credentials
41
42
@@ -52,12 +53,16 @@ For instance:
52
53
53
54
*`legba <plugin name> --username admin --password data/passwords.txt` will always use `admin` as username while loading the passwords from a wordlist.
54
55
*`legba <plugin name> --username data/users.txt --password data/passwords.txt` will load both from wordlists and use all combinations.
55
-
*`legba <plugin name> --username admin` will always use `admin` as username and attempt all permutations of the default printable ASCII charset between 4 and 8 characters (this is the default behaviour when a value is not passed).
56
+
*`legba <plugin name> --username admin` will always use `admin` as username and attempt all permutations of the default alphanumeric lowercase charset between 3 and 5 characters (this is the default behaviour when a value is not passed).
56
57
*`legba <plugin name> --username data/users.txt --password '@/some/path/*.key'` will load users from a wordlist while testing all key files inside `/some/path`.
57
58
*`legba <plugin name> --username data/users.txt --password '#4-5:abcdef'` will load users from a wordlist while testing all permutations of the charaters `abcdef` 4 and 5 characters long.
58
59
*`legba <plugin name> --username data/users.txt --password '[10-999]'` will load users from a wordlist while testing all numbers from 10 to 999.
59
60
*`legba <plugin name> --username data/users.txt --password '[1, 2, 3, 4]'` will load users from a wordlist while testing the numbers 1, 2, 3 and 4.
60
61
62
+
Notes:
63
+
- Multiple expressions can be combined with commas (e.g., `1,[3-5],9`) and will be expanded in order.
64
+
- In passwords, `{user}` is replaced with the current username (e.g., `--password '{user}123'`).
65
+
61
66
### Iteration Logic
62
67
63
68
Iteration over these credentials can be controlled by the `-I, --iterate-by <ITERATE_BY>` argument. The `-I user` (the default) will iterate like this:
@@ -95,20 +100,20 @@ Another option is using the `-C, --combinations <FILENAME>` argument, this will
95
100
|`-L, --list-plugins`|| List all available protocol plugins and exit. |
96
101
|`-R, --recipe <RECIPE>`|| Load a recipe from this YAML file. |
97
102
|`-T, --target <TARGET>`|| Single target host, url or IP address, IP range, CIDR, @filename or comma separated combination of them. |
98
-
|`-U, --payloads, --username <USERNAME>`|`#4-8`| Constant, filename, glob expression as `@/some/path/*.txt`, permutations as `#min-max:charset` / `#min-max` or range as `[min-max`] / `[n, n, n]`. |
99
-
|`-P, --key, --password <PASSWORD>`|`#4-8`| Constant, filename, glob expression as `@/some/path/*.txt`, permutations as `#min-max:charset` / `#min-max` or range as `[min-max`] / `[n, n, n]`. |
103
+
|`-U, --payloads, --username <USERNAME>`|`#3-5`| Constant, filename, glob expression as `@/some/path/*.txt`, permutations as `#min-max:charset` / `#min-max` (default charset `abcdefghijklmnopqrstuvwxyz0123456789`) or range as `[min-max`] / `[n, n, n]`. |
104
+
|`-P, --key, --password <PASSWORD>`|`#3-5`| Constant, filename, glob expression as `@/some/path/*.txt`, permutations as `#min-max:charset` / `#min-max` (default charset `abcdefghijklmnopqrstuvwxyz0123456789`) or range as `[min-max`] / `[n, n, n]`. |
100
105
|`-C, --combinations <COMBINATIONS>`|| Load `username:password` combinations from this file. |
101
106
|`--separator <SEPARATOR>`|`:`| Separator if using the --combinations/-C argument. |
102
107
|`-I, --iterate-by <ITERATE_BY>`|`user`| Whether to iterate by user or by password [possible values: `user`, `password`]|
103
108
|`-S, --session <FILENAME>`|| Save and restore session information from this file. |
104
109
|`-O, --output <OUTPUT>`|| Save results to this file. |
105
110
|`--output-format <FORMAT>`|`text`| Output file format [possible values: text, csv, jsonl]|
106
-
|`--timeout <TIMEOUT>`|`10000`| Connection timeout in milliseconds. |
107
-
|`--retries <RETRIES>`|`5`| Number of attempts if a request fails. |
111
+
|`--timeout <TIMEOUT>`|`1000`| Connection timeout in milliseconds. |
112
+
|`--retries <RETRIES>`|`1`| Number of attempts if a request fails. |
108
113
|`--retry-time <TIME>`|`1000`| Delay in milliseconds to wait before a retry. |
109
114
|`--single-match`|| Exit after the first positive match is found. |
110
115
|`--ulimit <ULIMIT>`|`10000`| Value for ulimit (max open file descriptors). |
111
-
|`--concurrency <VALUE>`|`10`| Number of concurrent workers. |
116
+
|`--concurrency <VALUE>`|logical CPUs| Number of concurrent workers. |
112
117
|`--rate-limit <LIMIT>`|`0`| Limit the number of requests per second. |
113
118
|`-W, --wait <WAIT>`|`0`| Wait time in milliseconds per login attempt. |
114
119
|`--jitter-min <VALUE>`|`0`| Minimum number of milliseconds for random request jittering. |
@@ -124,7 +129,7 @@ For the full list of arguments including plugin specific ones run `legba --help`
124
129
125
130
The `--session` option allows saving and restoring session state, which is useful for resuming interrupted scans. When a session file is specified, legba will:
126
131
127
-
* Save the current progress to the file every second during execution
132
+
* Save the current progress to the file every `report_time` milliseconds (default 5000 ms) during execution
128
133
* Automatically restore from the file if it exists when starting
129
134
* Preserve the position in the credential space, allowing you to continue exactly where you left off
130
135
* Save all discovered credentials to the session file
0 commit comments