evilsocket / shellz

shellz is a small utility to manage your ssh, telnet, kubernetes, winrm, web or any custom shell in a single place.
Other
569 stars 66 forks source link

IPv6 support #9

Closed djerfy closed 6 years ago

djerfy commented 6 years ago

Possible to support access IPv6, currently error:

war error while creating session for shell server1: dial tcp: address xxxx:xxxx:xxxx:xxxx::x:22: too many colons in address
war error while creating session for shell server2: dial tcp: address xxxx:xxxx:xxxx:xxxx::x:22: too many colons in address
war error while creating session for shell server3: dial tcp: address xxxx:xxxx:xxxx:xxxx::x:22: too many colons in address

I force access in IPv4 but it would be great for the addition. Thx

evilsocket commented 6 years ago

As per doc, what if in the JSON file, you change:

...
"host": "the-ipv6"
...

to

...
"host": "[the-ipv6]"
...

?

djerfy commented 6 years ago

Yes it works with that but I use DNS directly (resolv IPv4 or IPv6)

evilsocket commented 6 years ago

what? i didn't understand, what's in your .json file, the ipv6 address or an hostname that resolves to an ipv6 address?

djerfy commented 6 years ago

an hostname that resolves to an ipv4/ipv6

evilsocket commented 6 years ago

mmm investigating

evilsocket commented 6 years ago

it seems a weird behaviour of go itself, check here https://twitter.com/evilsocket/status/1049624146529972224

evilsocket commented 6 years ago

@djerfy did you map that hostname to an ipv6 link-local address?

djerfy commented 6 years ago

@djerfy did you map that hostname to an ipv6 link-local address?

no not an link-local but on a public ipv6

evilsocket commented 6 years ago

@djerfy would you compile form sources (README helps) and test if this commit fixed the issue?

djerfy commented 6 years ago

@djerfy would you compile form sources (README helps) and test if this commit fixed the issue?

yes it's good for me 👍 (verified via tcpdump)

evilsocket commented 6 years ago

@djerfy there's something it's not clear to me, i double checked and this commit should not have fixed your specific issue, is there any : character in the hostname you're using?

djerfy commented 6 years ago

@djerfy there's something it's not clear to me, i double checked and this commit should not have fixed your specific issue, is there any : character in the hostname you're using?

no just - but it does not trouble

evilsocket commented 6 years ago

so i don't understand how the fix solved your issue ... if there's no :, net.JoinHostPort is equivalent to the fmt.Sprintf i was using ...

schermata da 2018-10-09 15-01-32

djerfy commented 6 years ago

I don't know but I reinstall v1.3.0 (from src) and I have this problem. I do not know how, but it's fixed.

evilsocket commented 6 years ago

i think that while i compiled the binary you used initially with go 1.10, you used go 1.11 to compile from sources, that is what fixed the issue i think :D