Fix resolve function

Hello!
I have fixing resolve function, then we get ip address from users.
Same I write ports FreeBSD for this software. You can find it there: https://github.com/svagner/freebsd_ports/tree/master/security

Thanks