elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  como poder escuchar puerto 80 mediante socket en python
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: como poder escuchar puerto 80 mediante socket en python  (Leído 2,096 veces)
ganondolf

Desconectado Desconectado

Mensajes: 45


Ver Perfil
como poder escuchar puerto 80 mediante socket en python
« en: 25 Septiembre 2014, 20:39 pm »

alguien sabe como poder escuchar el puerto 80 mediante socket con python, ya que de manera comun, no hay resultados.

Código
  1. import socket
  2.  
  3. # create an INET, STREAMing socket
  4. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  5. # now connect to the web server on port 80 - the normal http port
  6. s.connect(("localhost", 80))
  7. # create an INET, STREAMing socket
  8. serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  9. # bind the socket to a public host, and a well-known port
  10. serversocket.bind((socket.gethostname(), 80))
  11. # become a server socket
  12. serversocket.listen(5)
  13. while True:
  14.    # accept connections from outside
  15.    (clientsocket, address) = serversocket.accept()
  16.    # now do something with the clientsocket
  17.    # in this case, we'll pretend this is a threaded server
  18.    ct = client_thread(clientsocket)
  19.    ct.run()


« Última modificación: 25 Septiembre 2014, 22:10 pm por Eleкtro » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
como escuchar lo que envia del puerto 5432
Programación General
manuelle_edf 1 4,384 Último mensaje 27 Mayo 2011, 07:22 am
por Di~OsK
[CONSULTA] Escuchar puerto VB.NET
.NET (C#, VB.NET, ASP)
sebasdfgh 5 8,887 Último mensaje 28 Mayo 2011, 20:59 pm
por [D4N93R]
Escuchar puerto en c
Programación C/C++
txenfsm 0 2,398 Último mensaje 10 Enero 2012, 14:08 pm
por txenfsm
¿Pueden dos procesos/aplicaciones escuchar por el mismo puerto? « 1 2 »
Redes
opportunity 12 14,593 Último mensaje 2 Noviembre 2012, 09:13 am
por opportunity
Como poder leer una tabla .xls y extraer informacion python
Scripting
SERGIO_@PRENDE 2 2,214 Último mensaje 24 Junio 2022, 23:45 pm
por l337*
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines