fix: fixed and refactored network.FindInterface because it was shit

This commit is contained in:
evilsocket 2018-02-24 18:13:20 +01:00
commit f0158342d6
2 changed files with 94 additions and 78 deletions

View file

@ -87,6 +87,15 @@ func NewEndpointWithAlias(ip, mac, alias string) *Endpoint {
return e
}
func (t *Endpoint) SetIP(ip string) {
addr := net.ParseIP(ip)
t.IP = addr
t.IpAddress = ip
t.IpAddressUint32 = ip2int(addr)
}
func (t *Endpoint) Name() string {
return t.Hostname
}