title: My ping sweep program is not working. What am I doing wrong?
body: <p>I have written a ping sweep program in Python3.</p>
  
  <pre><code>import os
  import platform
  from datetime import datetime
  
  net = input('Enter the network address: ')
  
  net1 = net.split('.')
  
  a = '.'
  
  net2 = net1[0] + a + net1[1] + a + net1[2] + a
  
  st1 = int(input('Enter the starting number: '))
  
  en1 = int(input('Enter the last number: '))
  
  en1 += en1
  
  oper = platform.system()
  
  if(oper == 'Windows'):
      ping1 = 'ping -n 1 '
  elif(oper == 'Linux'):
      ping1 = 'ping -c 1 '
  else:
      ping1 = 'ping -c 1 '
  
  starttime = datetime.now()
  print('Scanning in process...')
  
  for ip in range(st1, en1):
      addr = net2 + str(ip)
      command = ping1 + addr
      response = os.popen(command)
      for line in response.readlines():
          if (line.count('TTL')):
              print(addr, ' ---&gt; Live')
              break
  
  endtime = datetime.now()
  totaltime = endtime-starttime
  print('Scanning was completed in ', totaltime)
  </code></pre>
  
  <p>Whenever I put in the required inputs it only prints out "Scanning in process" and stays like that until I exit the program. I am on Linux Mint using this on the command line, what is wrong with my code?</p>