show device on IPv6 LL addresses

This commit is contained in:
van Hauser 2017-07-06 21:29:59 +02:00
parent 044bab0c2c
commit 6445689545
2 changed files with 5 additions and 1 deletions

View file

@ -1216,6 +1216,10 @@ char *hydra_address2string(char *address) {
if (address[0] == 16) {
memcpy(&target6.sin6_addr, &address[1], 16);
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;
} else
#endif

View file

@ -3564,9 +3564,9 @@ int32_t main(int32_t argc, char *argv[]) {
ipv4 = NULL;
#ifdef AF_INET6
ipv6 = NULL;
#endif
if ((device = index(hydra_targets[i]->target, '%')) != NULL)
*device++ = 0;
#endif
if (getaddrinfo(hydra_targets[i]->target, NULL, &hints, &res) != 0) {
if (use_proxy == 0) {
if (verbose)