mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-14 02:27:31 -07:00
show device on IPv6 LL addresses
This commit is contained in:
parent
044bab0c2c
commit
6445689545
2 changed files with 5 additions and 1 deletions
|
@ -1216,6 +1216,10 @@ char *hydra_address2string(char *address) {
|
||||||
if (address[0] == 16) {
|
if (address[0] == 16) {
|
||||||
memcpy(&target6.sin6_addr, &address[1], 16);
|
memcpy(&target6.sin6_addr, &address[1], 16);
|
||||||
inet_ntop(AF_INET6, &target6.sin6_addr, ipstring, sizeof(ipstring));
|
inet_ntop(AF_INET6, &target6.sin6_addr, ipstring, sizeof(ipstring));
|
||||||
|
if (hydra_targets[i]->ip[17] != 0) {
|
||||||
|
strcat(ipstring, "%");
|
||||||
|
strcat(ipstring, hydra_targets[i]->ip[17]);
|
||||||
|
}
|
||||||
return ipstring;
|
return ipstring;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
|
2
hydra.c
2
hydra.c
|
@ -3564,9 +3564,9 @@ int32_t main(int32_t argc, char *argv[]) {
|
||||||
ipv4 = NULL;
|
ipv4 = NULL;
|
||||||
#ifdef AF_INET6
|
#ifdef AF_INET6
|
||||||
ipv6 = NULL;
|
ipv6 = NULL;
|
||||||
|
#endif
|
||||||
if ((device = index(hydra_targets[i]->target, '%')) != NULL)
|
if ((device = index(hydra_targets[i]->target, '%')) != NULL)
|
||||||
*device++ = 0;
|
*device++ = 0;
|
||||||
#endif
|
|
||||||
if (getaddrinfo(hydra_targets[i]->target, NULL, &hints, &res) != 0) {
|
if (getaddrinfo(hydra_targets[i]->target, NULL, &hints, &res) != 0) {
|
||||||
if (use_proxy == 0) {
|
if (use_proxy == 0) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue