title: Failed to resolve IP Address nmap on Kali Linux
body: <p>I wrote a bash script for a simple scanner. It asks the user for the first and last IP addresses as well as the port number then stores them into variables. It then uses nmap to scan the range of ip addresses for open MySQL ports.</p>
  
  <p>Here is my code</p>
  
  <pre><code>#!/bin/bash
  
  echo "What is the first IP address?"
  
  read firstIP
  
  echo "What is the last IP address?"
  
  read lastIP
  
  echo "What port number do you want to scan?"
  
  read port
  
  nmap -sT $firstIP-$lastIP -p $port &gt;/dev/null -oG MySQLscan
  
  cat MySQLscan | grep open MySQLscan2
  
  cat MySQlscan2
  </code></pre>
  
  <p>For the first prompt, I entered 192.168.181.0. For the second prompt, I entered 192.168.181.255. For the port number, I entered 3306. However, the result I got was:</p>
  
  <blockquote>
    <p>Failed to resolve "192.168.181.0-192.168.181.255"</p>
    
    <p>WARNING: No targets were specified, so 0 hosts scanned.</p>
  </blockquote>
  
  <p>Why is it failing to resolve the IP addresses?</p>