mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
9f83d66f99
commit
20f92a68e0
2 changed files with 4 additions and 6 deletions
|
@ -97,17 +97,15 @@ func (t *Endpoint) SetNetwork(netw string) {
|
|||
t.SetBits(uint32(bits))
|
||||
}
|
||||
|
||||
func (t *Endpoint) SetIPv6Network(netw string) {
|
||||
func (t *Endpoint) SetIPv6(netw string) {
|
||||
parts := strings.SplitN(netw, "/", 2)
|
||||
address := parts[0]
|
||||
bits, _ := strconv.Atoi(parts[1])
|
||||
// bits, _ := strconv.Atoi(parts[1])
|
||||
|
||||
t.IPv6 = net.ParseIP(address)
|
||||
if t.IPv6 != nil {
|
||||
t.Ip6Address = t.IPv6.String()
|
||||
}
|
||||
|
||||
t.SetBits(uint32(bits))
|
||||
}
|
||||
|
||||
func (t *Endpoint) SetIP(ip string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue