Underc0de - La Casa de los Informáticos

Programación Scripting => Python => Mensaje iniciado por: BigBear en Julio 03, 2011, 09:35:32 PM

Título: [Python] HTTP Console By Doddy H
Publicado por: BigBear en Julio 03, 2011, 09:35:32 PM
Bueno , este es un simple programa en python hecho en tk que permite mandar
peticiones webs a un servidor en concreto

Código (python) [Seleccionar]

#!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()


Título: Re:[Python] HTTP Console By Doddy H
Publicado por: fortil en Agosto 02, 2011, 01:58:59 PM
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
Título: Re:[Python] HTTP Console By Doddy H
Publicado por: JaAViEr en Agosto 02, 2011, 07:54:08 PM
Bien, yo hice uno que permite obtener y editar cookies. Otro día podríamos pasar este code a QT4 si no te molesta.
Título: Re:[Python] HTTP Console By Doddy H
Publicado por: fortil en Agosto 03, 2011, 08:13:24 PM
JaAViEr podrias postear tú programa?

grax
Título: Re:[Python] HTTP Console By Doddy H
Publicado por: JaAViEr en Agosto 04, 2011, 12:21:50 AM
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.