|
|
@ -2,15 +2,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
# Display help message
|
|
|
|
# Display help message
|
|
|
|
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
|
|
|
|
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
|
|
|
|
echo "Usage: $(basename $0) <input_string>"
|
|
|
|
echo "usage: $(basename $0) <input_string>"
|
|
|
|
echo "Outputs a randomly generated IP address and port number based on the MD5 hash of the input string."
|
|
|
|
echo "Outputs a randomly generated IP address and port number based on the MD5 hash of the input string."
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Check that input string is provided
|
|
|
|
# Check that input string is provided
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "Error: input string not provided."
|
|
|
|
echo "error: input string not provided."
|
|
|
|
echo "Usage: $(basename $0) <input_string>"
|
|
|
|
echo "usage: $(basename $0) <input_string>"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|