Hola que tal!!Pues el titulo es claro, qui dejo el code de un escaner de puertos usando TKinter...Bien aqui el code:
#!/usr/bin/python
# -*- coding: cp1252 -*-
#SIMPLE ESCANER DE PUERTOS EN PYTHON - [Z]tuX
from Tkinter import *
import socket

def escanear():
port = Port.get()
host = Host.get()
ZtuX = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
ZtuX.connect((host,port))
Show = Label(App, text ="[+]Puerto %s Abierto :D" %(port), bg="black",fg ="white")
Show.grid(row= 20, column = 5)
except:
Show = Label(App, text ="[+]Puerto %s Cerrado :("%(port), bg="black",fg ="white")
Show.grid(row= 20, column = 5)

App = Tk()
#Aqui se encuentra el Titulo de la ventana, Background y tamaño
App.title("Escaner de Puertos by [Z]tuX")
App.maxsize(width="300",height="120")
App.minsize(width="300",height="120")
App.configure(background="black")

#Declaramos 2 variables, una de tipo String y otra tipo Integer
Host = StringVar()
Port = IntVar()

Label(App,bg="black").grid(row=3)

Label(App,text="Host: ",bg="black",fg="red").grid(row=4,column=4)
entry = Entry(App,width=35,textvariable=Host,bg="black",fg="red").grid(row=4,column=5)

Label(App,text="Port: ",bg="black",fg="red").grid(row=8,column=4)
entry = Entry(App,width=35,textvariable=Port,bg="black",fg="red").grid(row=8,column=5)

Button(text="Escanear",bg="black",fg="red",activebackground="red",command=escanear).grid(row=15,column=5)
Label(App,bg="black").grid(row=20)
App.mainloop()

CAPTURA DE COMO LUCE:


Saludo[OS]
edit post

Comments

0 Response to 'Escaner de Puertos [Tkinter] | Python'

Publicar un comentario