|
Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.
Temas - d33k40
Páginas: [1]
1
« en: Miércoles 26 de Mayo de 2010, 04:46 »
Buenas, soy nuevo aquí y me gustaría ir aportando, esta es la segunda versión de este de/criptador de texto en versión GUI con wxPython usando XRC ht tp : / / s 2 . subirimagenes . c o m/p rivadas/1001718pantallazo . png (unir) de-crypter-text.py: import wx from wx import xrc class Prog(wx.App): def OnInit(self): self.res = xrc.XmlResource('recursos.xrc') self.frame = self.res.LoadFrame(None, 'Frame1') self.dialog = self.res.LoadDialog(None, 'Dialog1') self.botonLimpiar = xrc.XRCCTRL(self.frame, 'button1') self.frame.Bind(wx.EVT_BUTTON, self.Limpiar, self.botonLimpiar) self.botonLimpiar2 = xrc.XRCCTRL(self.frame, 'button2') self.frame.Bind(wx.EVT_BUTTON, self.Limpiar2, self.botonLimpiar2) self.botonCryptar = xrc.XRCCTRL(self.frame, 'button4') self.frame.Bind(wx.EVT_BUTTON, self.Cryptar, self.botonCryptar) self.botonDecryptar = xrc.XRCCTRL(self.frame, 'button5') self.frame.Bind(wx.EVT_BUTTON, self.Decryptar, self.botonDecryptar) self.botonAbout = xrc.XRCCTRL(self.frame, 'button3') self.frame.Bind(wx.EVT_BUTTON, self.About, self.botonAbout) self.Texto = xrc.XRCCTRL(self.frame, 'textCtrl1') self.Texto2 = xrc.XRCCTRL(self.frame, 'textCtrl2') self.frame.Show() return True def Limpiar(self, event): self.Texto.Clear() def Limpiar2(self, event): self.Texto2.Clear() def About(self, event): self.dialog.Show() def Cryptar(self, event): li = self.Texto.GetNumberOfLines() le = 0 while le <= li - 1: lin = self.Texto.GetLineText(le) text = lin salir = False v3 = 0 while v3 <= 26: v1 = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " "] v2 = ["1-", "2-", "3-", "4-", "5-", "6-", "7-", "8-", "9-", "10-", "11-", "12-", "13-", "14-", "15-", "16-", "17-", "18-", "19-", "20-", "21-", "22-", "23-", "24-", "25-", "26-", "27-"] text = text.replace(v1[v3], v2[v3]) v3 = v3 + 1 self.Texto2.WriteText(text + "n") le = le + 1 wx.MessageBox("Texto encriptado correctamente") def Decryptar(self, event): li = self.Texto.GetNumberOfLines() le = 0 while le <= li - 1: lin = self.Texto.GetLineText(le) text = lin salir = False v3 = 0 while v3 <= 26: v1 = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " "] v2 = ["1-", "2-", "3-", "4-", "5-", "6-", "7-", "8-", "9-", "10-", "11-", "12-", "13-", "14-", "15-", "16-", "17-", "18-", "19-", "20-", "21-", "22-", "23-", "24-", "25-", "26-", "27-"] text = text.replace(v2[v3], v1[v3]) v3 = v3 + 1 self.Texto2.WriteText(text + "n") le = le + 1 wx.MessageBox("Texto desencriptado correctamente") if __name__ == '__main__': Crypter = Prog() Crypter.MainLoop()
recursos.xrc: (unir el link de la etiqueta resource, no me deja postearlo por los permisos de URL) <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <resource xmlns="http : / / ww w . wxw indow s.or g/wx xrc" version="2. 3.0.1" > <object class="wxFrame" name="Frame1"> <style>wxDEFAULT_FRAME_STYLE|wxSTAY_ON_TOP|wxTAB_TRAVERSAL</style> <size>500,600</size> <bg>#000000</bg> <title>d33k40 De/Crypter Text v2.0</title> <centered>1</centered> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxStaticBitmap" name="bitmap1"> <bitmap>sc.png</bitmap> </object> </object> <object class="sizeritem"> <option>1</option> <flag>wxEXPAND</flag> <border>5</border> <object class="wxBoxSizer"> <orient>wxHORIZONTAL</orient> <object class="sizeritem"> <option>1</option> <flag>wxEXPAND</flag> <border>5</border> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxStaticText" name="staticText1"> <fg>#00ff00</fg> <label>Texto:</label> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxButton" name="button1"> <label>Limpiar</label> <default>0</default> </object> </object> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL</flag> <border>5</border> <object class="wxTextCtrl" name="textCtrl1"> <style>wxHSCROLL|wxTE_MULTILINE</style> <size>400,70</size> <bg>#00ff00</bg> <fg>#000000</fg> <value></value> <maxlength>0</maxlength> </object> </object> </object> </object> <object class="sizeritem"> <option>1</option> <flag>wxEXPAND</flag> <border>5</border> <object class="wxBoxSizer"> <orient>wxHORIZONTAL</orient> <object class="sizeritem"> <option>1</option> <flag>wxEXPAND</flag> <border>5</border> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxStaticText" name="staticText2"> <fg>#00ff00</fg> <label>Salida:</label> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxButton" name="button2"> <label>Limpiar</label> <default>0</default> </object> </object> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL</flag> <border>5</border> <object class="wxTextCtrl" name="textCtrl2"> <style>wxHSCROLL|wxTE_MULTILINE</style> <size>400,70</size> <bg>#00ff00</bg> <fg>#000000</fg> <value></value> <maxlength>0</maxlength> </object> </object> </object> </object> <object class="sizeritem"> <option>1</option> <flag>wxEXPAND|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxBoxSizer"> <orient>wxHORIZONTAL</orient> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag> <border>5</border> <object class="wxButton" name="button3"> <label>About</label> <default>0</default> </object> </object> <object class="spacer"> <option>1</option> <flag>wxEXPAND</flag> <border>5</border> <size>0,0</size> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag> <border>5</border> <object class="wxButton" name="button4"> <label>Crypt!</label> <default>0</default> </object> </object> <object class="spacer"> <option>1</option> <flag>wxEXPAND</flag> <border>5</border> <size>0,0</size> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag> <border>5</border> <object class="wxButton" name="button5"> <label>Decrypt!</label> <default>0</default> </object> </object> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxStaticText" name="staticText4"> <bg>#000000</bg> <fg>#00ff00</fg> <label>Coded by: d33k40</label> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> </object> </object> </object> <object class="wxDialog" name="Dialog1"> <style>wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP</style> <bg>#000000</bg> <title>About</title> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxStaticBitmap" name="bitmap2"> <bitmap>sc.png</bitmap> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <object class="wxStaticText" name="staticText3"> <fg>#00ff00</fg> <label>Coded by: d33k40nnAgradecimientos:n- [Bacardi]n- A la comunidad "Infierno Hacker", todos y cada unonde ellos.</label> </object> </object> <object class="sizeritem"> <option>0</option> <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> </object> </object> </object> </resource>
Pueden cambiar los caracteres a reemplazar por la cadena que quieran, si añaden caracteres, no olviden aumentar el bucle. Saludos
Páginas: [1]
|
|
|