How do i exit from a stdou.read() if the command that I executed enter in input mode?
Example:
p = subprocess.Popen('smbclient <IP>', stdout=subprocess.PIPE, shell=True)
if the command connect to the IP it will enter in the input mode for the smb but i only want to check if it connect or not