Menú

Mostrar Mensajes

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ú

Mensajes - xassiz_

#11
Gracias bro ^^ Espero sugerencias para la siguiente version
#12
RTH Text Converter



Bueno, os traigo esta herramienta que he programado.


Funciones:

-ASCII
-Hexadecimal
-Base64
-MD5 (lo crackea a partir de una web online, que por cierto es mala (las buenas tienen captcha xDD))
-URL encode


Espero que os guste, más bien, que os sea de utilidad xDD

A mi por lo menos me es útil para algunas cosas.. bueno, aquí el código:

Código (python) [Seleccionar]

#!/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()


Saludos
#13
Cita de: flony en 31 Mayo 2010, 13:13 PM
esta parte no la entiendo
set filecontent=!filecontent!!currentline!
Simples variables.

Cita de: flony en 31 Mayo 2010, 13:13 PM
echo ^" se q va a parar a archivo.txt lo q no se es q va a parar ahi
Está mal, no hace falta escapar el caracter de comillas dobles
#14
PHP / Re: Ereg_Replace y Include
24 Mayo 2010, 18:38 PM
Código (php) [Seleccionar]
if (file_exists($_GET['archivo'].".php")) {
include(str_replace(array('.','/','\\'),'',$_GET['archivo']));
}
#15
Te veo muy exigente con esas mayúsculas..

Citar-1 union select 0 0 0 "shell" 0 0 into outfile '/tmp/shell.php'--
#16
Cita de: DA KILLER en 17 Mayo 2010, 00:38 AM
, pero sigue sin tomarme el if not defined

La estructura de if not defined es "if not defined variable"

set variable=hola
if not defined %variable% (echo:Variable no definida)


Así estás haciendo tú, el cmd lo interpreta así:

set variable=hola
if not defined hola (echo:Variable no definida)


A que me refiero? Que no la tienes que expandir:

set variable=hola
if not defined variable (echo:Variable no definida)
#17
Para lo de los caracteres especiales te servirá mi script:

http://foro.elhacker.net/scripting/fbat_pequeno_filtro_by_xassiz-t265981.0.html
#18
PHP / Re: Duda con variables
16 Mayo 2010, 14:00 PM
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

Código (php) [Seleccionar]


<?php
echo "$a ${$a}";
?>




No sabía esto! T.T

Bueno, ahora ya esta el problema arreglado, gracias!
#19
PHP / Re: Duda con variables
15 Mayo 2010, 13:28 PM
Supongamos que yo no se el numero de matrices hay, puede haber dos
Código (php) [Seleccionar]

$matriz[0][0] = 'Dato11';
$matriz[0][1] = 'Dato12';
$matriz[1][0] = 'Dato22';
$matriz[1][1] = 'Dato23';

cinco..
Código (php) [Seleccionar]

$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';


O los que sean, no lo sé!


Bueno, el caso es que quiero hacer un switch que sea

Código (php) [Seleccionar]

switch($variable)
{
case numero_de_matrices
}


Por ejemplo si hay 2 matrices hacer:
Código (php) [Seleccionar]

switch($variable)
{
case "1":
...
break;
case "2":
...
break;
default:
...
break;
}



Y si por ejemplo hay cinco..
Código (php) [Seleccionar]

switch($variable)
{
case "1":
...
break;
case "2":
...
break;
case "3":
...
break;
case "4":
...
break;
case "5":
...
break;
default:
...
break;
}


Do you understand me?





EDITO:

Ya lo arregle con un IF sin utilizar switch, me quedó mucho mejor, ahora solo me falta saber cual va a ser este valor del for:
Citarfor ($i = 0; $i < 2; $i++){

Como cuento en un array con dos dimensiones?
#20
PHP / Re: Duda con variables
15 Mayo 2010, 01:07 AM
Vale muchas gracias, me sirvió.

La cosa se complica ahora que quiero hacer un switch asi:
Código (php) [Seleccionar]

<?php

...

switch(
$id_matriz)
{
case "1":
...
case "2":
...
case "3":
...

...
}

?>



Donde en cada case se repite el mismo proceso.

Pero al poner un for dentro del switch da error de sintaxis xDD