elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Tutorial básico de Quickjs


  Mostrar Temas
Páginas: [1] 2 3 4 5
1  Programación / Scripting / [wxPython] RTH Text Converter! - by xassiz en: 1 Junio 2010, 15:21 pm
RTH Text Converter



Bueno, os traigo esta herramienta que he programado.


Funciones:
Código:
-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
  1. #!/usr/bin/env python
  2. #RTH Text Converter - by xassiz
  3.  
  4. import wx,base64,md5,urllib,sys,binascii
  5.  
  6. class Frame(wx.Frame):
  7.    def __init__(self):
  8.        wx.Frame.__init__(self, None, -1, title='RTH Text Converter  -  by xassiz', pos=wx.DefaultPosition,
  9.            size=wx.Size(450, 450), style=wx.DEFAULT_FRAME_STYLE^(wx.RESIZE_BORDER|wx. MAXIMIZE_BOX))
  10.        self.panel = wx.Panel(self, id=1, pos=(0, 0), size=(300, 520))
  11.        wx.StaticText(self.panel, label='Texto:', pos=wx.Point(8,18), size=wx.Size(33,13), style=0)
  12.        wx.StaticText(self.panel, label='Salida:', pos=wx.Point(8,152), size=wx.Size(33,13), style=0)
  13.        ascii = wx.Button(self.panel, label='ASCII', pos=wx.Point(50,288), size=wx.Size(75,23), style=0)
  14.        hexa = wx.Button(self.panel, label='HEX', pos=wx.Point(125,288), size=wx.Size(75,23), style=0)
  15.        base_64 = wx.Button(self.panel, label='Base64', pos=wx.Point(200,288), size=wx.Size(75,23), style=0)
  16.        md5_ = wx.Button(self.panel, label='MD5', pos=wx.Point(275,288), size=wx.Size(75,23), style=0)
  17.        url_encode = wx.Button(self.panel, label='URL', pos=wx.Point(350,288), size=wx.Size(75,23), style=0)
  18.        borrar = wx.Button(self.panel, label='Borrar', pos=wx.Point(265,345), size=wx.Size(80,46), style=0)
  19. about = wx.Button(self.panel, label='About', pos=wx.Point(345,345), size=wx.Size(80,46), style=0)
  20.        self.cifrar = wx.RadioButton(self.panel, label='cifrar', pos=wx.Point(50,345), size=wx.Size(80,23), style=0)
  21.        self.descifrar = wx.RadioButton(self.panel, label='descifrar', pos=wx.Point(50,370), size=wx.Size(80,23), style=0)
  22.        self.accion = "enc"
  23.        self.txtNormal = wx.TextCtrl(self.panel, pos=wx.Point(48,18), size=wx.Size(375, 120), style=0, value='')
  24.        self.txtConvertido = wx.TextCtrl(self.panel, pos=wx.Point(48,152), size=wx.Size(375,120), style=0, value='')
  25.        self.Bind(wx.EVT_BUTTON, self.ascii, ascii)
  26.        self.Bind(wx.EVT_BUTTON, self.hexa, hexa)
  27.        self.Bind(wx.EVT_BUTTON, self.base_64, base_64)
  28.        self.Bind(wx.EVT_BUTTON, self.md5_, md5_)
  29.        self.Bind(wx.EVT_BUTTON, self.url_encode, url_encode)
  30.        self.Bind(wx.EVT_BUTTON, self.borrar, borrar)
  31.        self.Bind(wx.EVT_BUTTON, self.about, about)
  32.        self.Bind(wx.EVT_RADIOBUTTON, self.accion_enc, self.cifrar)
  33.        self.Bind(wx.EVT_RADIOBUTTON, self.accion_des, self.descifrar)
  34.  
  35.    def ascii(self, event):
  36.        textoNormal = self.txtNormal.GetValue()
  37.        if self.accion == "enc":
  38.            ascii = ''
  39.            for x in textoNormal:
  40.                ascii = ascii + str(ord(x)) + ","
  41.            ascii = ascii[:-1]
  42.            self.txtConvertido.SetValue(ascii)
  43.        elif self.accion == "des":
  44.            normal = ''
  45.            textoNormal = textoNormal.replace(","," ")
  46.            textoNormal = textoNormal.replace("."," ")
  47.            for x in textoNormal.split():
  48.                normal = normal + chr(int(x))
  49.            self.txtConvertido.SetValue(normal)
  50.  
  51.    def hexa(self, event):
  52.        textoNormal = self.txtNormal.GetValue()
  53.        if self.accion == "enc":
  54.            hexa = ''
  55.            for x in textoNormal:
  56.                hexa = hexa + hex(ord(x))
  57.            hexa = "0x%s" % hexa.replace("0x","")
  58.            self.txtConvertido.SetValue(hexa)
  59.        elif self.accion == "des":
  60.            normal = textoNormal.replace('0x','')
  61.            normal = binascii.unhexlify(normal)
  62.            self.txtConvertido.SetValue(normal.replace("'",""))
  63.  
  64.    def base_64(self, event):
  65.        textNormal = self.txtNormal.GetValue()
  66.        if self.accion == "enc":
  67.            self.txtConvertido.SetValue(base64.encodestring(textNormal))
  68.        else:
  69.            self.txtConvertido.SetValue(base64.decodestring(textNormal))
  70.  
  71.    def md5_(self, event):
  72.        textNormal = self.txtNormal.GetValue()
  73.        if self.accion == "enc":
  74.            textConvertido = md5.new()
  75.            textConvertido.update(textNormal)
  76.            textConvertido = repr(textConvertido.hexdigest())
  77.            self.txtConvertido.SetValue(textConvertido.replace("'",""))
  78.        elif self.accion == "des":
  79.            x=urllib.urlopen("http://www.md5-lookup.com/livesearch.php?q=%s"%textNormal).read()
  80.            if 'No results found' in x:
  81.                self.txtConvertido.SetValue("No se encontraron resultados")
  82.            elif len(textNormal) != 32:
  83.                self.txtConvertido.SetValue("No es un MD5")
  84.            else:
  85.                x=x.split("\n")
  86.                x=x[16].replace('  <td width="250">','')
  87.                self.txtConvertido.SetValue(x.replace('</td>',''))
  88.  
  89.    def url_encode(self, event):
  90.        textNormal = self.txtNormal.GetValue()
  91.        if self.accion == "enc":
  92.            textConvertido = urllib.urlencode({'xassiz':textNormal})
  93.            self.txtConvertido.SetValue(textConvertido.replace("xassiz=",""))
  94.        elif self.accion == "des":
  95.            self.txtConvertido.SetValue(urllib.unquote_plus(textNormal))
  96.  
  97.    def borrar(self, event):
  98.        self.txtNormal.SetValue('')
  99.        self.txtConvertido.SetValue('')
  100.  
  101.    def about(self, event):
  102. wx.MessageBox("Autor: xassiz","RTH Text Converter")
  103. wx.MessageBox("Dedicado a http://foro.rthacker.NET","RTH Text Converter")
  104.  
  105.    def accion_enc(self, event):
  106.        self.accion = "enc"
  107.    def accion_des(self, event):
  108.        self.accion = "des"
  109.  
  110.  
  111. class App(wx.App):
  112.    def OnInit(self):
  113.        frame = Frame()
  114.        frame.Show()
  115.        self.SetTopWindow(frame)
  116.        return True
  117.  
  118. if __name__ == '__main__':
  119.    app = App()
  120.    app.MainLoop()
  121.  

Saludos
2  Programación / PHP / [Solucionado] Duda con variables en: 13 Mayo 2010, 22:45 pm
Bueno, tengo un problema ;D

En batch lo llaman polimetría no se si hay algo de PHP acerca de esto..


Bueno, el caso es que quiero indicar el nombre de una variable con otra variable.

Ejemplo:

Código
  1. <?php
  2.  
  3. $variable = "decir";
  4.  
  5. ?>
  6.  

Y quiero crear otra variable que se llame "decirhola"..

Citar
<?php

$variable = "decir";
$$variablehola = "hola";

echo $decirhola;

?>


Espero entendais!

Saludos
3  Programación / Scripting / [Batch] Crackme v8 - by xassiz en: 20 Abril 2010, 20:37 pm
Bueno, os presento mi octavo crackme:
Código:
@echo off&title CrackMe 8 - by xassiz
@setlocal enabledelayedexpansion
f%windir:~-3,1%r /f "t%windir:~-3,1%ken%windir:~-1%=*" %%x in (%~0) do @(!w%windir:~4,1%nd%windir:~4,1%r:~-1!et/a n=!n!+1&&%windir:~4,1%f !n! equ 2 (set x=%%x))
%x:~0,4% .=cadavezmehagomasviejo@miscrackmessonmasfacilesxD
%.:~21,1%%.:~-48,2%%~2%.:~-5,1%:%%.!! %~1
%x:~0,1%%x:~-7,2%u%.:~-3,1%%.:~-17,1%
%x:~0,1%%x:~2,1%%x:~-8,1%%x:~-3,1%t
:.:%$$.%if "%var%"=="!windiR!" (echo.Correcto!) else (echo.Incorrecto!)
%.:~-27,1%%.:~-3,1%%.:~-4,1%t %.:~16,1%%.:~1,1%%.:~26,1%=%~1
%x:~0,1%%windir:~4,1%f !%.:~4,1%%.:~3,1%r!==!%x:~-1%! (%x:~2,1%%x:~6,1%h%x:~-2,1%.B%.:~-6,1%%.:~-4,1%%x:~-1%) %x:~10,1%%x:~-14,1%%.:~-3,1%%.:~-4,1% (%.:~5,1%%.:~0,1%h%.:~20,1%.M%.:~1,1%l)

Respuestas por MP!


Resolvieron:

  • Guerrerohgp
4  Programación / Scripting / <Python> Regexp? Dudas con peticiones web en: 12 Abril 2010, 23:00 pm
Bueno, vuelvo con dudas en Python! :-\


Veamos, yo hago una petición a una web con urllib algo así:

Código
  1. #!/usr/bin/env python
  2.  
  3. import urllib
  4.  
  5. peticion = urllib.urlopen("http://www.web.com").read()
  6.  

Y en el código de esa web quiero buscar unas URL con una estructura así:

Citar
Donde "XXXX" son números

Que en HTML aparecerían así:
Código
  1. <a href="http://www.web.com/codigo.php?variable=XXXX">
  2.  

Para eso hago algo así:
Código
  1. if '<a href="http://www.web.com/codigo.php?variable=' in peticion:
  2. print "Contiene esas URL"
  3. else:
  4. print "No contiene ese tipo de URL"
  5.  

Bien, esto funciona. Pero ahora es cuando quiero guardar el número de esos link en una variable o en un array para poder operar con ellos (ya que en la web puede haber más de uno).

He intentado hacer algo con regexp y [0-9] pero no consigo hacer nada >.<""


Alguna idea?
5  Programación / Scripting / [Python] Duda separar string {Solucionado} en: 2 Abril 2010, 15:19 pm
Hola, bueno tengo una duda.

Yo tengo una string:

Código:
algo=algo

y quiero eliminar lo que está luego del signo "=".

Para eso supongo que se tendría que separar, entonces hago un replace y cambio del igual por un espacio y estan separados, pero ahora como cojo solamente la primera parte?


Saludos ;)

PD: aprovecho para preguntar, existe algun software para generar Tkinter en python como Boa contructor con wxpython?
6  Programación / Scripting / [VBScript] se podría hacer click?? en: 28 Marzo 2010, 23:57 pm
En VBScript podemos mover el mouse:

Código:
Set Excel=CreateObject("Excel.Application")
Posicion=Excel.ExecuteExcel4Macro("CALL(""user32"",""SetCursorPos"", ""JJJJ"", ""X"", ""Y"")")
set Excel=Nothing

Pero podemos hacer click?
7  Programación / Scripting / Agenda - by xassiz en: 12 Marzo 2010, 22:02 pm
xD

Bueno, tenia que apuntar los examenes de esta semana que se me juntaron muchos :P entonces hice este script rapido.

A diferencia de otras "agendas" que vi, este es un codigo mas corto y no crea archivos adicionales :P


Aqui el codigo:

Código
  1. @echo off
  2. title Agenda - by xassiz
  3. setlocal enabledelayedexpansion
  4.  
  5. :menu
  6. cls
  7. echo:    ^| MENU ^|
  8. echo: 1. Ver Agenda
  9. echo: 2. Agregar Tarea
  10. echo: 3. Salir
  11. set "op="
  12. set/p "op=>> "
  13. if not defined op (goto:menu)
  14. if ["%op%"]==["1"] (goto:Show)
  15. if ["%op%"]==["2"] (goto:Add)
  16. if ["%op%"]==["3"] (exit)
  17. goto:menu
  18.  
  19. :Show
  20. cls
  21. for /f "tokens=*" %%x in (%~0) do (
  22. set "line=%%x"
  23. if ["!line:~0,10!"]==["::AGENDA::"] (
  24. set "line=!line:~10!"
  25. echo:!line!
  26. )
  27. )
  28. goto:menu
  29.  
  30. :Add
  31. cls
  32. set "fecha="
  33. set/p "fecha=- Fecha (dd/mm/aaaa): "
  34. if not defined fecha (goto:Add)
  35. set "tarea="
  36. set/p "tarea=- Tarea: "
  37. if not defined tarea (goto:Add)
  38. for %%y in ("fecha","tarea") do (
  39. for %%z in ("^","&","<",">","|") do (set "%%~y=!% style="color: #448888;">%~y:%%~z=^%%~z!")
  40. )
  41. echo:::AGENDA::%fecha% - %tarea% >> %~0
  42. goto:menu
  43.  
  44.  
  45.  


Saludos!  ::) ;)
8  Programación / Scripting / [Duda Python+TK] Sobre variables y funciones en: 25 Febrero 2010, 16:52 pm
A ver, tengo un problema.

Yo hice un "downloader" por consola y ahora estoy aprendiendo Tkinter y lo quería pasar.

Lo que pasa es que cuando ejecuto el button y me ejecuta la funcion las variables del textbox no me funcionan allá..

Probe haciendo un global pero no funciona, os dejo el code:

Código
  1. #!/usr/bin/env python
  2. #Downloader - by xassiz
  3.  
  4. from Tkinter import *
  5. import re, sys, urllib
  6.  
  7. def descargar():
  8. xassiz = urllib.urlopen(url)
  9. x4ss1z = open(doc,'wb')
  10. xa55iz = xassiz.read()
  11. x4ss1z.write(xa55iz)
  12. xassiz.close()
  13. x4ss1z.close()
  14.  
  15. form = Tk()
  16. form.title('Downloader - by xassiz')
  17. form.minsize(350,75)
  18.  
  19. Nombre = Label(form, text="Downloader")
  20. url = StringVar()
  21. urlTxtBox = Entry(form, textvariable=url, width=60)
  22. doc = StringVar()
  23. docTxtBox = Entry(form, textvariable=doc, width=60)
  24. BotonDescargar = Button(form, text="Descargar", command=descargar, width=20)
  25.  
  26. Nombre.grid()
  27. urlTxtBox.grid()
  28. docTxtBox.grid()
  29. BotonDescargar.grid()
  30.  
  31. form.mainloop()
  32.  

El primer textbox recojo la URL y en el segundo el nombre del nuevo archivo.


Saludos! ;)
9  Programación / Scripting / [Python] Ecuaciones de Segundo Grado - by xassiz en: 16 Febrero 2010, 17:20 pm
Bueno, pues tenía muchos deberes de mates, así que hice este programilla para acabar antes xDD

Código
  1. #!/usr/bin/python
  2. #Ecuaciones 2 Grado - by xassiz
  3.  
  4. import math
  5.  
  6. print "\n ----------------------------"
  7. print "\n #    Ecuaciones 2 Grado    #"
  8. print "\n #        by xassiz         #"
  9. print "\n ----------------------------\n"
  10.  
  11. try:
  12. a = input("\n a = ")
  13. b = input("\n b = ")
  14. c = input("\n c = ")
  15.  
  16. xmas = (-b + math.sqrt(b**2 - 4*a*c))/(2*a)
  17. xmenos = (-b - math.sqrt(b**2 - 4*a*c))/(2*a)
  18.  
  19. print "\n\a x (+) = "+str(xmas)+"\n"
  20. print "\n\a x (-) = "+str(xmenos)+"\n"
  21.  
  22. raw_input()
  23.  
  24. except:
  25. print "\n\a Sin Solucion"
  26. raw_input()
10  Seguridad Informática / Nivel Web / [Tool] xassiz PanelFinder - by xassiz en: 24 Diciembre 2009, 19:43 pm
xassiz PanelFinder   -   by xassiz





Pues simple, un Admin Page Finder en perl ::)


Código
  1. #!/usr/bin/perl
  2.  
  3. use LWP::UserAgent;
  4.  
  5. if (!$ARGV[0]) {
  6.  
  7.  
  8.  
  9.  
  10.           xassiz PanelFinder
  11.  
  12. db    db d8888b. d88888b
  13. `8b  d8' 88  `8D 88'    
  14.  `8bd8'  88oodD' 88ooo  
  15.  .dPYb.  88~~~   88~~~  
  16. .8P  Y8. 88      88      
  17. YP    YP 88      YP
  18.  
  19.  
  20.            [+] Modo de uso:
  21.  
  22.   perl XPF.pl http://www.target.com
  23.  
  24.     -------------------------------
  25.  
  26.             Coded by xassiz
  27.  
  28.  
  29. );
  30.  
  31. exit 1;
  32.  
  33. }
  34.  
  35. print q (
  36.  
  37.  
  38. db    db d8888b. d88888b
  39. `8b  d8' 88  `8D 88'    
  40.  `8bd8'  88oodD' 88ooo  
  41.  .dPYb.  88~~~   88~~~  
  42. .8P  Y8. 88      88      
  43. YP    YP 88      YP
  44.  
  45. );
  46.  
  47. $target = $ARGV[0];
  48.  
  49. print("\n [?] Analizando: $target \n");
  50.  
  51. @paneles=('admin/','ADMIN/','paneldecontrol/','login/','adm/','cms/',
  52. 'admon/','ADMON/','administrador/','administrator/','admin/login.php',
  53. 'ADMIN/login.php','admin/home.php','admin/controlpanel.html','admin/controlpanel.php','admin.php',
  54. 'admin.html','admin/cp.php','admin/cp.html','cp.php','cp.html','controlpanel/','panelc/',
  55. 'administrator/index.php','administrator/login.html','administrator/login.php','administrator/account.html',
  56. 'administrator/account.php','administrator.php','administrator.html','login.php','login.html',
  57. 'modelsearch/login.php','moderator.php','moderator.html','moderator/login.php','moderator/login.html',
  58. 'moderator/admin.php','moderator/admin.html','moderator/','account.php','account.html','controlpanel/',
  59. 'admin/index.asp','admin/login.asp','admin/home.asp','admin/controlpanel.asp','admin.asp','admin/cp.asp',
  60. 'cp.asp','administrator/index.asp','administrator/login.asp','administrator/account.asp','administrator.asp',
  61. 'login.asp','modelsearch/login.asp','moderator.asp','moderator/login.asp','moderator/admin.asp','account.asp',
  62. 'controlpanel.asp','admincontrol.asp','adminpanel.asp','fileadmin/','fileadmin.php','fileadmin.asp',
  63. 'fileadmin.html','administration/','administration.php','administration.html','sysadmin.php','sysadmin.html',
  64. 'phpmyadmin/','myadmin/','sysadmin.asp','sysadmin/','ur-admin.asp','ur-admin.php','ur-admin.html','ur-admin/',
  65. 'Server.php','Server.html','Server.asp','Server/','wp-admin/','administr8.php','administr8.html',
  66. 'administr8/','administr8.asp','webadmin/','webadmin.php','webadmin.asp','webadmin.html','administratie/',
  67. 'admins/','admins.php','admins.asp','admins.html','administrivia/','Database_Administration/','WebAdmin/',
  68. 'sysadmins/','admin1/','system-administration/','administrators/','pgadmin/','directadmin/',
  69. 'staradmin/','ServerAdministrator/','SysAdmin/','administer/','sys-admin/','typo3/',
  70. 'panel/','cpanel/','cPanel/','cpanel_file/','platz_login/','rcLogin/','blogindex/',
  71. 'formslogin/','autologin/','support_login/','meta_login/','manuallogin/','simpleLogin/',
  72. 'loginflat/','utility_login/','showlogin/','memlogin/','members/','login-redirect/','sub-login/',
  73. 'wp-login/','login1/','dir-login/','login_db/','xlogin/','smblogin/','customer_login/',
  74. 'login-us/','acct_login/','admin_area/','bigadmin/','project-admins/','phppgadmin/','pureadmin/',
  75. 'sql-admin/','radmind/','openvpnadmin/','wizmysqladmin/','vadmind/','ezsqliteadmin/',
  76. 'hpwebjetadmin/','newsadmin/','adminpro/','Lotus_Domino_Admin/','bbadmin/','vmailadmin/',
  77. 'Indy_admin/','ccp14admin/','irc-macadmin/','banneradmin/','sshadmin/','phpldapadmin/','macadmin/',
  78. 'administratoraccounts/','admin4_account/','admin4_colon/','radmind-1/','Super-Admin/','AdminTools/',
  79. 'cmsadmin/','SysAdmin2/','globes_admin/','cadmins/','phpSQLiteAdmin/','navSiteAdmin/','server_admin_small/',
  80. 'logo_sysadmin/','server/','database_administration/','ADMIN/login.html','system_administration/','ss_vms_admin_sm/');
  81.  
  82. foreach $finder( @paneles) {
  83. $buscador = LWP::UserAgent->new() or die;
  84. $busqueda = $buscador->get($target."/".$finder);
  85.  
  86. if ($busqueda->content =~ /username/ || $busqueda->content =~ /Username/ || $busqueda->content =~ /UserName/ ||
  87. $busqueda->content =~ /usuario/ || $busqueda->content =~ /Usuario/ ||
  88. $busqueda->content =~ /user/ || $busqueda->content =~ /User/ ||
  89. $busqueda->content =~ /password/ || $busqueda->content =~ /Password/ ||
  90. $busqueda->content =~ /contraseña/ || $busqueda->content =~ /Contraseña/ ||
  91. $busqueda->content =~ /senha/ || $busqueda->content =~ /Senha/ ||
  92. $busqueda->content =~ /pass/ || $busqueda->content =~ /Pass/ ||
  93. $busqueda->content =~ /pwd/ || $busqueda->content =~ /Pwd/
  94. ) {
  95. print("\n [+] Encontrado: $target/$finder \n\a");
  96. }
  97. }
  98.  
  99. exit 1;
  100.  

Espero que os guste ;)


bytes
Páginas: [1] 2 3 4 5
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines