IP_PICKER
IP_PICKER - Ask the user to interactively enter an IP via the UI
When to use it
Whenever an IP address is needed, IP_PICKER supplies a custom keyboard optimized for IPv4 entry. Providing a default IP address allows saved values to be presented to the user for faster selection.
Syntax
IP_PICKER [text prompt] [default ip]
text prompt
Text prompt to show the user. Prompts should be kept short enough to display on the device screen.
default ip
Default IP address.
The IP picker dialog
The IP picker editor
A default IP should typically be provided. To prompt the user with no default, use a blank quoted string: "".
Results
IP_PICKER will wait until the user has made a selection, pausing the payload.
IP_PICKER exits with a return code of 0 if the user continues, and non-zero if the user cancels.
IP_PICKER returns the IP as the output.
Examples
__userip=$(IP_PICKER "Target IP" "1.2.3.4") || exit 0
__userip=$(IP_PICKER "No default IP" "") || exit 0
Remember to enclose the prompt text in quotes!