Reduce dependencies in make.network.randomIPv6

This commit is contained in:
pyoor 2017-05-31 15:58:01 -04:00
parent 7f68b11902
commit be4fef5d86

View file

@ -48,9 +48,13 @@ make.network = {
random.pick([random.number(255), make.number.any]) random.pick([random.number(255), make.number.any])
}, },
randomIPv6: function () { randomIPv6: function () {
return '[' + make.strings.stringFromBlocks([':', function () { let parts = []
return make.strings.digitsHex(random.range(1, 4))
}]) + ']' for (let i=0; i<8; i++) {
parts.push(random.hex(4))
}
return parts.join(':')
}, },
goodHostnames: function () { goodHostnames: function () {
return [ return [