Expect sometimes matches the pattern before a line is fully printed to
TTY. As a result, the address returned may not be accurate. This commit
fixes this issue by matching line breaks.
When initializing, we should use randomly generated network parameters
instead of default ones, to eliminate the possibility of unintentional
use of default credentials.