[Python] HTTP Console By Doddy H

Iniciado por BigBear, Julio 03, 2011, 09:35:32 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Julio 03, 2011, 09:35:32 PM Ultima modificación: Julio 07, 2011, 07:03:40 PM por Sthefano02
Bueno , este es un simple programa en python hecho en tk que permite mandar
peticiones webs a un servidor en concreto

Código: python

#!usr/bin/python
#Console (C) Doddy Hackman 2011

from Tkinter import *
import socket

global x,socket

def execa() :


s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((str(host.get()),80))
s.send(cmd.get()+"\r\n")
data = s.recv(666)
s.close()
panel.insert(END,repr(data))

   

window = Tk()
window.title("HTTP Console (C) Doddy Hackman 2011")

window.maxsize(width="400",height="350")
window.minsize(width="400",height="350")

window.configure(background="black")
window.configure(cursor="tcross")

host = StringVar()
cmd = StringVar()

panel = Text(window,width=30,height=15,bg="black",fg="red")

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

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

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

Button(text="Cargar",bg="black",fg="red",activebackground="red",command=execa).grid(row=8,column=9)


Label(window,bg="black").grid(row=19)
panel.grid(row=20,column=5)


window.mainloop()



Hola Doddy

muy bueno, pero nosé a que comandos o que cosas se pueden hacer (soy nuevo),  es decir si queiro ver una pagina web, como lo haria? porgo el nombre del servidor y luego? o no se puede interactuar coon ella?.

grax

Bien, yo hice uno que permite obtener y editar cookies. Otro día podríamos pasar este code a QT4 si no te molesta.
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

JaAViEr podrias postear tú programa?

grax

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
JaAViEr podrias postear tú programa?

grax
Luego lo busco en el /home

Saludos.
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login