Gracias bro ^^ Espero sugerencias para la siguiente version
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ú
-ASCII
-Hexadecimal
-Base64
-MD5 (lo crackea a partir de una web online, que por cierto es mala (las buenas tienen captcha xDD))
-URL encode
#!/usr/bin/env python
#RTH Text Converter - by xassiz
import wx,base64,md5,urllib,sys,binascii
class Frame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, title='RTH Text Converter - by xassiz', pos=wx.DefaultPosition,
size=wx.Size(450, 450), style=wx.DEFAULT_FRAME_STYLE^(wx.RESIZE_BORDER|wx. MAXIMIZE_BOX))
self.panel = wx.Panel(self, id=1, pos=(0, 0), size=(300, 520))
wx.StaticText(self.panel, label='Texto:', pos=wx.Point(8,18), size=wx.Size(33,13), style=0)
wx.StaticText(self.panel, label='Salida:', pos=wx.Point(8,152), size=wx.Size(33,13), style=0)
ascii = wx.Button(self.panel, label='ASCII', pos=wx.Point(50,288), size=wx.Size(75,23), style=0)
hexa = wx.Button(self.panel, label='HEX', pos=wx.Point(125,288), size=wx.Size(75,23), style=0)
base_64 = wx.Button(self.panel, label='Base64', pos=wx.Point(200,288), size=wx.Size(75,23), style=0)
md5_ = wx.Button(self.panel, label='MD5', pos=wx.Point(275,288), size=wx.Size(75,23), style=0)
url_encode = wx.Button(self.panel, label='URL', pos=wx.Point(350,288), size=wx.Size(75,23), style=0)
borrar = wx.Button(self.panel, label='Borrar', pos=wx.Point(265,345), size=wx.Size(80,46), style=0)
about = wx.Button(self.panel, label='About', pos=wx.Point(345,345), size=wx.Size(80,46), style=0)
self.cifrar = wx.RadioButton(self.panel, label='cifrar', pos=wx.Point(50,345), size=wx.Size(80,23), style=0)
self.descifrar = wx.RadioButton(self.panel, label='descifrar', pos=wx.Point(50,370), size=wx.Size(80,23), style=0)
self.accion = "enc"
self.txtNormal = wx.TextCtrl(self.panel, pos=wx.Point(48,18), size=wx.Size(375, 120), style=0, value='')
self.txtConvertido = wx.TextCtrl(self.panel, pos=wx.Point(48,152), size=wx.Size(375,120), style=0, value='')
self.Bind(wx.EVT_BUTTON, self.ascii, ascii)
self.Bind(wx.EVT_BUTTON, self.hexa, hexa)
self.Bind(wx.EVT_BUTTON, self.base_64, base_64)
self.Bind(wx.EVT_BUTTON, self.md5_, md5_)
self.Bind(wx.EVT_BUTTON, self.url_encode, url_encode)
self.Bind(wx.EVT_BUTTON, self.borrar, borrar)
self.Bind(wx.EVT_BUTTON, self.about, about)
self.Bind(wx.EVT_RADIOBUTTON, self.accion_enc, self.cifrar)
self.Bind(wx.EVT_RADIOBUTTON, self.accion_des, self.descifrar)
def ascii(self, event):
textoNormal = self.txtNormal.GetValue()
if self.accion == "enc":
ascii = ''
for x in textoNormal:
ascii = ascii + str(ord(x)) + ","
ascii = ascii[:-1]
self.txtConvertido.SetValue(ascii)
elif self.accion == "des":
normal = ''
textoNormal = textoNormal.replace(","," ")
textoNormal = textoNormal.replace("."," ")
for x in textoNormal.split():
normal = normal + chr(int(x))
self.txtConvertido.SetValue(normal)
def hexa(self, event):
textoNormal = self.txtNormal.GetValue()
if self.accion == "enc":
hexa = ''
for x in textoNormal:
hexa = hexa + hex(ord(x))
hexa = "0x%s" % hexa.replace("0x","")
self.txtConvertido.SetValue(hexa)
elif self.accion == "des":
normal = textoNormal.replace('0x','')
normal = binascii.unhexlify(normal)
self.txtConvertido.SetValue(normal.replace("'",""))
def base_64(self, event):
textNormal = self.txtNormal.GetValue()
if self.accion == "enc":
self.txtConvertido.SetValue(base64.encodestring(textNormal))
else:
self.txtConvertido.SetValue(base64.decodestring(textNormal))
def md5_(self, event):
textNormal = self.txtNormal.GetValue()
if self.accion == "enc":
textConvertido = md5.new()
textConvertido.update(textNormal)
textConvertido = repr(textConvertido.hexdigest())
self.txtConvertido.SetValue(textConvertido.replace("'",""))
elif self.accion == "des":
x=urllib.urlopen("http://www.md5-lookup.com/livesearch.php?q=%s"%textNormal).read()
if 'No results found' in x:
self.txtConvertido.SetValue("No se encontraron resultados")
elif len(textNormal) != 32:
self.txtConvertido.SetValue("No es un MD5")
else:
x=x.split("\n")
x=x[16].replace(' <td width="250">','')
self.txtConvertido.SetValue(x.replace('</td>',''))
def url_encode(self, event):
textNormal = self.txtNormal.GetValue()
if self.accion == "enc":
textConvertido = urllib.urlencode({'xassiz':textNormal})
self.txtConvertido.SetValue(textConvertido.replace("xassiz=",""))
elif self.accion == "des":
self.txtConvertido.SetValue(urllib.unquote_plus(textNormal))
def borrar(self, event):
self.txtNormal.SetValue('')
self.txtConvertido.SetValue('')
def about(self, event):
wx.MessageBox("Autor: xassiz","RTH Text Converter")
wx.MessageBox("Dedicado a http://foro.rthacker.NET","RTH Text Converter")
def accion_enc(self, event):
self.accion = "enc"
def accion_des(self, event):
self.accion = "des"
class App(wx.App):
def OnInit(self):
frame = Frame()
frame.Show()
self.SetTopWindow(frame)
return True
if __name__ == '__main__':
app = App()
app.MainLoop()
Cita de: flony en 31 Mayo 2010, 13:13 PMSimples variables.
esta parte no la entiendoset filecontent=!filecontent!!currentline!
Cita de: flony en 31 Mayo 2010, 13:13 PMEstá mal, no hace falta escapar el caracter de comillas doblesecho ^"
se q va a parar a archivo.txt lo q no se es q va a parar ahi
if (file_exists($_GET['archivo'].".php")) {
include(str_replace(array('.','/','\\'),'',$_GET['archivo']));
}
Citar-1 union select 0 0 0 "shell" 0 0 into outfile '/tmp/shell.php'--
Cita de: DA KILLER en 17 Mayo 2010, 00:38 AM
, pero sigue sin tomarme el if not defined
set variable=hola
if not defined %variable% (echo:Variable no definida)
set variable=hola
if not defined hola (echo:Variable no definida)
set variable=hola
if not defined variable (echo:Variable no definida)
Cita de: MinusFour en 15 Mayo 2010, 16:17 PM
Probaste tu código de al principio? Porque yo juraría que php te permitia hacer eso.
Mira esto:
http://www.php.net/manual/es/language.variables.variable.php
<?php
echo "$a ${$a}";
?>
$matriz[0][0] = 'Dato11';
$matriz[0][1] = 'Dato12';
$matriz[1][0] = 'Dato22';
$matriz[1][1] = 'Dato23';
$matriz[0][0] = 'Dato11';
$matriz[0][1] = 'Dato12';
$matriz[1][0] = 'Dato22';
$matriz[1][1] = 'Dato23';
$matriz[2][0] = 'Dato32';
$matriz[2][1] = 'Dato33';
$matriz[3][0] = 'Dato42';
$matriz[3][1] = 'Dato43';
$matriz[4][0] = 'Dato52';
$matriz[4][1] = 'Dato53';
switch($variable)
{
case numero_de_matrices
}
switch($variable)
{
case "1":
...
break;
case "2":
...
break;
default:
...
break;
}
switch($variable)
{
case "1":
...
break;
case "2":
...
break;
case "3":
...
break;
case "4":
...
break;
case "5":
...
break;
default:
...
break;
}
Citarfor ($i = 0; $i < 2; $i++){
<?php
...
switch($id_matriz)
{
case "1":
...
case "2":
...
case "3":
...
...
}
?>