Fix get_ports.sh script
There were two errors:
-
get_random() function was returning random number with leading zeros that could lead the shell to interpret the number as octal value instead of decimal
-
The calculation of the port was off, it was adding the whole range and not just the min port to the base.