#!/usr/bin/python

import socket

ip = raw_input("Digite o IP ")
porta = input("Digite a porta ")

s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)

if s.connect_ex((ip,porta)):
	print "Porta Fechada"
else:
	print "Porta Aberta"
