• Publicidad

Joiner

¿Estás desarrollando un proyecto, o piensas hacerlo? Pon aquí tu propuesta, lo más seguro es que alguien esté interesado en ayudarte.

Joiner

Notapor BigBear » 2013-03-02 15:22 @681

Estaba leyendo esta página: http://www.flu-project.com/ocultando-un ... asero.html , y me gustó la idea. Tengo todo pensado pero lo que me falta es saber cómo hacer que el programa exe final pueda mostrar los archivos sin que estos existan. A lo que me refiero es que esos archivos estén dentro del programa exe, lo que aparentemente es lo que hacen todos los stubbs

¿ Alguien se le ocurre algo ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Publicidad

Cargar comando sin consola

Notapor BigBear » 2013-03-02 20:39 @902

Tengo el siguiente código :

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. #system("test.exe");
  2.  
  3. use Win32::Job;
  4.  
  5. ejecutate("test.exe");
  6.  
  7. sub ejecutate {
  8.  
  9.     my $job = Win32::Job->new;
  10.     $job->spawn(
  11.         "cmd",
  12.         qq{cmd /C $_[0]},
  13.         {
  14.             no_window => "true",
  15.             stdout    => "logxfuck.txt",
  16.             stderr    => "logxfuck.txt"
  17.         }
  18.     );
  19.  
  20.     $ok = $job->run("30");
  21.  
  22.  
  23.     unlink("logxfuck.txt");
  24.  
  25.  
  26. }
Coloreado en 0.004 segundos, usando GeSHi 1.0.8.4


Lo que necesito es cargar ese programa llamado test.exe de forma oculta, o sea, que no se vea porque test.exe es una ventana como un programa normal pero para unas pruebas necesito cargar ese programa desde perl de forma oculta. Como ven el código no hace lo que quiero pero es la única forma que conozco.

¿ Alguien conoce alguna forma ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Re: Cargar comando sin consola

Notapor explorer » 2013-03-03 08:39 @402

No uso Windows, pero creo que el problema es que estás ejecutando el test.exe bajo el cmd, que es el que realmente crea la ventana. Deberías ejecutar el test.exe sin el cmd, directamente. Con la opción no_window ya estás indicando que no quieres crear una ventana, sino solo ejecutar el proceso.
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Poner código binario en una variable

Notapor BigBear » 2013-03-03 09:57 @456

Tengo pensado usar un código binario en un hash pero no sé cómo ponerlo en una variable porque aunque use ", ', o q(), no cierra nunca.

¿ Alguien me podría decir cómo se llama y cómo lo puedo poner en una variable sin problemas ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Re: Poner código binario en una variable

Notapor explorer » 2013-03-03 13:53 @620

Debes hacer un programa auxiliar, que lea el archivo binario y lo transforme a código Perl, en el que todos los bytes sean convertidos a otra notación, por ejemplo, la hexadecimal.

Quedaría algo así:

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. my $codigo
  2.     = "\xfe\xde\x0a\xf0"
  3.     . "\x00\x21\x25\xed"
  4.  
  5. # más líneas...
  6.  
  7.     ;
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4

Luego, solo queda copiar y pegar en tu propio código.
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Poner código binario en una variable

Notapor BigBear » 2013-03-03 14:07 @629

Hummm, lo veo difícil. La única solución que conseguí era usarlo en un archivo de texto pero queda muy mal.

¿ No hay otra forma ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Decodificar hex en Python y Perl

Notapor BigBear » 2013-03-03 17:11 @757

Tengo el siguiente código en Python :

Sintáxis: [ Descargar ] [ Ocultar ]
Using python Syntax Highlighting
  1. import sys,os
  2.  
  3. test = "4d5a90000300000004000000ffff0000b800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000e1fba0e00b409cd21b8014ccd21546869732070726f6772616d2063616e6e6f742062652072756e20696e20444f53206d6f64652e0d0d0a2400000000000000504500004c010300b2fb194d0000000000000000e00002010b010800002a000000080000000000000e49000000200000006000000000400000200000000200000400000000000000040000000000000000a000000002000000000000020040850000100000100000000010000010000000000000100000000000000000000000c04800004b000000006000001005000000000000000000000000000000000000008000000c000000484800001c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002e746578740000001429000000200000002a000000020000000000000000000000000000200000602e72737263000000100500000060000000060000002c0000000000000000000000000000400000402e72656c6f6300000c0000000080000000020000003200000000000000000000000000004000004200000000000000000000000000000000f0480000000000004800000002000500f8290000501e000001000000200000068828000070010000000000000000000000000000000000000000000000000000000000000000000000000000000000004a02281000000a02731100000a7d010000042a000b3002001c00000000000000027b01000004036f1200000ade0d267201000070281300000ade002a01100000000000000e0e000d1f0000011b3003002001000001000011027b010000046f1400000a0a066f1500000a130538d400000011056f1600000a74210000010b076f1700000a72490000706f1800000a39b2000000076f1900000a166f1a00000a6f1b00000a281c00000a0c08027b02000004300f7259000070281300000a388300000002087d02000004027b0100000472810000706f1d00000a0d096f1e00000a13062b4111066f1600000a7421000001130411046f1900000a166f1a00000a6f1b00000a6f1f00000a11046f1900000a176f1a00000a6f1b00000a6f1f00000a280f00000611066f2000000a2db6de1511067528000001130711072c0711076f2100000adc11056f2000000a3a20ffffffde1511057528000001130811082c0711086f2100000adcde0d267299000070281300000ade002a414c0000020000008a0000004e000000d800000015000000000000000200000014000000e7000000fb0000001500000000000000000000000000000012010000120100000d0000001f0000011e02281000000a2a133003002d000000020000117e030000042d2072cb000070d003000002282500000a6f2600000a732700000a0a0680030000047e030000042a1a7e040000042a1e0280040000042a1e02281000000a2a133005003e000000030000117e2900000a72fd000070176f2a00000a0a0672590100707267010070282b00000a727b010070282c00000a6f2d00000a066f2e00000a26066f2f00000a2a000013300400630000000400001172930100701b8d230000010a061672a9010070a20617283000000a6f1f00000aa2061872c9010070a20619282b00000aa2061a72df010070a206283100000a281000000672e501007072ed010070282b00000a727b010070282c00000a28100000062a7a032c13027b090000042c0b027b090000046f2100000a0203283200000a2a0000033004004f0000000000000002283300000a02220000c0402200005041733400000a283500000a0217283600000a021f741f33733700000a283800000a02721b020070283900000a02721b0200706f3a00000a0216283b00000a2a0013300400ae0000000500001102283c00000a02280c00000673080000060a7267010070282b00000a7227020070282c00000a731c0000060b0720983a0000283d00000a6f1700000607176f1500000672e50100707255020070282b00000a7227020070282c00000a281000000672e501007072ed010070282b00000a7227020070282c00000a281000000673010000060c066f09000006066f0a00000608727d0200706f02000006086f0300000620983a0000283e00000a2be31e02281000000a2a000013300400c200000006000011733f00000a800a0000047e0a000004176f4000000a7e0a00000414fe0611000006734100000a6f4200000a7e0a0000046f4300000a176f4400000a7e0a0000046f4300000a176f4500000a7e0a0000046f4300000a176f4600000a7e0a0000046f4300000a166f4700000a7e0a0000046f4300000a166f4800000a7e0a0000046f4300000a026f4900000a7e0a0000046f4300000a036f4a00000a7e0a0000046f4b00000a262b060628250000067e0a0000046f4c00000a6f4d00000a250a2de72a000003300400a700000000000000733f00000a800a0000047e0a000004176f4000000a7e0a00000414fe0611000006734100000a6f4200000a7e0a0000046f4300000a176f4400000a7e0a0000046f4300000a176f4500000a7e0a0000046f4300000a176f4600000a7e0a0000046f4300000a166f4700000a7e0a0000046f4300000a166f4800000a7e0a0000046f4300000a026f4900000a7e0a0000046f4300000a036f4a00000a7e0a0000046f4b00000a262a062a6e027b0c0000046f4f00000a2c0c027b0d0000046f4f00000a2a162a66027b0c000004036f5000000a027b0d000004036f5000000a2a32027b0d0000046f5100000a2a36027b0d000004036f5200000a2a32027b0c0000046f5100000a2a36027b0c000004036f5200000a2a1e027b0e0000042a2202037d0e0000042a0000033004009d0000000000000002281000000a027e5300000a7d0b0000040203281b00000602735400000a7d0c000004027b0c000004176f5000000a027b0c00000402fe061d000006735500000a6f5600000a027b0c0000042300000000000024406f5200000a02735400000a7d0d000004027b0d000004176f5000000a027b0d00000402fe061e000006735500000a6f5600000a027b0d0000042300000000004ced406f5200000a2a0000001b3004007700000007000011d00a000001282500000a285700000a6f5800000a0b2b44076f1600000aa5440000010a062813000006200180ffff332b02257b0b000004d00a000001282500000a068c44000001285900000a72b5020070282c00000a7d0b000004076f2000000a2db4de110775280000010c082c06086f2100000adc2a00011000000200150050650011000000003a02027b0e00000417281f0000062a001b3003002b000000080000110304735a00000a0a06027b0b0000046f5b00000a066f5c00000a027e5300000a7d0b000004de030b077a2a000110000000000000272700031f0000015a285e00000a16285f00000a730d000006286000000a2a1a7e0f0000042a567322000006286100000a7409000002800f0000042a1e02286200000a2a3602281000000a736300000a262aaa7e1100000472b902007002286400000a6f6500000a2b05286600000a7e110000046f6700000a1a33ee2a2e736300000a80110000042a000000b4000000cecaefbe01000000910000006c53797374656d2e5265736f75726365732e5265736f757263655265616465722c206d73636f726c69622c2056657273696f6e3d322e302e302e302c2043756c747572653d6e65757472616c2c205075626c69634b6579546f6b656e3d623737613563353631393334653038392353797374656d2e5265736f75726365732e52756e74696d655265736f7572636553657402000000000000000000000050414450414450b4000000b4000000cecaefbe01000000910000006c53797374656d2e5265736f75726365732e5265736f757263655265616465722c206d73636f726c69622c2056657273696f6e3d322e302e302e302c2043756c747572653d6e65757472616c2c205075626c69634b6579546f6b656e3d623737613563353631393334653038392353797374656d2e5265736f75726365732e52756e74696d655265736f7572636553657402000000000000000000000050414450414450b400000042534a4201000100000000000c00000076322e302e35303732370000000005006c000000ec090000237e0000580a00005c0c000023537472696e677300000000b41600002803000023555300dc190000100000002347554944000000ec1900006404000023426c6f620000000000000002000001571da2150901000000fa01330016000001000000490000000a0000001100000026000000170000006700000005000000150000000800000003000000070000000c000000010000000200000001000000050000000200000000000a0001000000000006008d0086000a00a90094000e00c300ae001200e600db00060040012f01060071015c010e0031021b020e00760263020600a20286000a00b70294000e00e502d7020e007703d7020a000e04940006008404720406009b0472040600b80472040600d70472040600f004720406000905720406002405720406003f05720406007705580506008b0558050600990572040600b20572040600cf0563026b00e305000006001206f20506003206f20506005506860006006706860012007106db0012009006db000600ab0698060600da0686001200e806db0012000e07db0006003007860012004007db000600730786000e0097077f070600ae0763020600cb07f2050600e60786000600eb07860006000f0872040e0025081b020e003e081b0206006308530806006c08530806008f0886000a00cd0894000a00ec0894001600110902090a00170994000a00400994001600600902090600ad099c090600d20986000e00ea0963020e00090a63020600b30aa90a0600d30aa90a0600e70a58050e00250bd7020600450b860006004a0b860006005a0b86000600680ba90a0600750ba90a0600800b86000e00d30bae000a00ff0b940000000000010000000000010001000000100012001c000500010001000000100020002a000500030004000000100039001c000500050008000100100049001c00090008000b00000010004f001c0005000a000e000100100057001c0005000b0012008001100061001c0005000f0020000001100069002a000d000f0021000000100072001c000500100024000100f2000a000100f7000e00110050011a0011007d011e005680c1013c005680ce013c005680dc013c00518013023c0001003c02fb0011007e0204010100cd023c000100eb0220010100f4022001010000033c001100e603520151800a043c0011001904cd015020000000008618ff001100010064200000000086000501150001009c200000000086001801110002001422000000008318ff00110002001c220000000093088d01220002005522000000009308a101270002005c22000000009308ad012c0002006422000000008618ff00110003006c22000000008600f00111000300b822000000008600010211000300272300000000c4004702ff00030048230000000081004f0211000400a423000000008618ff00110004005e24000000008618ff0011000400682400000000960082020801040038250000000096008b0208010600eb25000000009100ac020e0108000000000080009120bc0215010a000000000080009120bc021b010b00ed25000000008608050324010c0009260000000086081103ff000c0023260000000086081d0328010d0030260000000086082f032c010d003e26000000008608410328010e004b2600000000860853032c010e005926000000008608650331010f0061260000000086086e0315000f006c26000000008618ff00150010001827000000008100880335011100ac27000000008100990335011300bc27000000008600ad033c0115000428000000009100e1034e0117001b28000000009608f603560117003828000000008618ff00110017002228000000009118cc0b4e0117004028000000008618ff00110017004e280000000096001c04d10117007928000000009118cc0b4e011800000001001302000001002d04000001003304000001003d04000002004504000001003d04000002004504000001004f04000002005604000001005804000001005804000001002d04000001002d04000001002d04000001002d04000001005d04000001004f04000002005604000001004f04000002005604000001000003000002006604000001006d047100ff0015007900ff0015008100ff0015008900ff0015009100ff0015009900ff001500a100ff001500a900ff001500b100ff00ff00b900ff001500c100ff001500c900ff001500d100ff00d601e100ff00dc01e900ff0011000900ff0011002100ff001100210050061500f1005d06d10121007c06e1010901b706e7011101c506ed010901d10631011901e106f1010901ff06f60121011b07fc0109012607310131013807030221004c0708023901b706e70109006107310111016a0724014101470211004901ff002b025101ff0011005901ff0011006101fd0777026101180880022900ff0086027901ff00930289017808a30291018408a80299019b08b0021901a808b4029101af08bb029101b808c1029101c7081100a101d908b0021901a808cc0211004702ff00a901f4081100b101ff00e002b9012809e602b9014e09ed02c901ff00f40211006509fa02a90174091500a9017d091500a9018609ff001100ff001100310193090103d101b40906034100ff0011004100ba09ff00d901ff0014034100df091a034100fb092103e1011c0a2703e1012c0aff00e1013f0aff00e1015a0aff00e101740aff00e101880a1500e101950a15004100a30a24014100c00a2e03f901de0a31010102ff00150059000503240159001103ff005900050b28015900120b2c0119011f0b3c005900ff0011000902ff0014035900390b38031102500b3f031902b706e7011102600b48032902ff003c0131025d0615003102c70811003902ff001100a101930b4e01a101a60b6203a101c80b67034102e00bc6031900ff0011006900ff0011001901a808cf036900ed0b1500a101f60b4e016900140cd5030e0014003f000e0018009a000e001c00ad000e002000c4000e0040006001290043019a022e001b00e4032e002300e4032e007b0042042e003b00e4032e00730039042e001300e4032e002b00db032e003300ea032e000b00db032e004b00e4032e00530002042e0063002c042e006b009a02490043019a0263001b017202630023017202630013013102230113016d032301230172020004eb0272020f028e02c602d2020b03340350035a030300010007000300090007000000400132000000b90137000000b80342010000c00346010000ce0346010000dc034a01000002045b01020005000300010007000500020006000500020014000700010015000700020016000900010017000900010019000b00020018000b0002001a000d0001001b000d00020021000f00fa0a00012500bc02010000012700bc0201000480000001000000000000000000000000001c00000002000000000000000000000001007d0000000000020000000000000000000000010094000000000002000000000000000000000001008600000000000200000000000000000000000100db0000000000020000000000000000000000d7020209000000000000000001000000230c0000b800000001000000460c000000000000003c4d6f64756c653e00666c752e65786500584d4c52656164657200666c75005265736f757263657300666c752e50726f706572746965730070726f63657373526567697374657200466f726d3100636f6e736f6c61004b65794c6f676765720050726f6772616d0053657474696e6773006e617669676174696f6e006d73636f726c69620053797374656d004f626a6563740053797374656d2e57696e646f77732e466f726d7300466f726d0053797374656d2e436f6e66696775726174696f6e004170706c69636174696f6e53657474696e6773426173650053797374656d2e586d6c00586d6c446f63756d656e740078446f630076657273696f6e002e63746f7200636f676572496e737472756363696f6e657300656a65637563696f6e496e737472756363696f6e65730053797374656d2e5265736f7572636573005265736f757263654d616e61676572007265736f757263654d616e0053797374656d2e476c6f62616c697a6174696f6e0043756c74757265496e666f007265736f7572636543756c74757265006765745f5265736f757263654d616e61676572006765745f43756c74757265007365745f43756c747572650043756c747572650072757461526567697374726f0072757461496e66656363696f6e0061706c69636163696f6e496e66656363696f6e0072656769737472617250726f6365736f006f63756c746172456a6563757461626c6500646f6d696e696f0053797374656d2e436f6d706f6e656e744d6f64656c0049436f6e7461696e657200636f6d706f6e656e747300446973706f736500496e697469616c697a65436f6d706f6e656e740053797374656d2e446961676e6f73746963730050726f6365737300636d6400656a65637574617200656a656375746172436f6d616e646f496e7465726e6f004576656e744172677300636d645f457869746564004b657973004765744173796e634b65795374617465006b65796275666665720053797374656d2e54696d6572730054696d657200436865636b4b657900466c7573684275666665720066696c65006765745f456e61626c6564007365745f456e61626c6564006765745f466c757368496e74657276616c007365745f466c757368496e74657276616c006765745f436865636b496e74657276616c007365745f436865636b496e74657276616c006765745f46696c65007365745f46696c6500456c61707365644576656e744172677300436865636b4b65795f456c617073656400466c7573684275666665725f456c617073656400466c7573683246696c6500456e61626c656400466c757368496e74657276616c00436865636b496e74657276616c0046696c65004d61696e0064656661756c74496e7374616e6365006765745f44656661756c740044656661756c74007068700057656242726f77736572007762006d616e6461496e666f726d6163696f6e0076616c756500646973706f73696e6700636f6d616e646f00617267756d656e746f0073656e646572006500764b65790066696c656e616d6500617070656e6400696e666f0053797374656d2e5265666c656374696f6e00417373656d626c795469746c6541747472696275746500417373656d626c794465736372697074696f6e41747472696275746500417373656d626c79436f6e66696775726174696f6e41747472696275746500417373656d626c79436f6d70616e7941747472696275746500417373656d626c7950726f6475637441747472696275746500417373656d626c79436f7079726967687441747472696275746500417373656d626c7954726164656d61726b41747472696275746500417373656d626c7943756c747572654174747269627574650053797374656d2e52756e74696d652e496e7465726f70536572766963657300436f6d56697369626c65417474726962757465004775696441747472696275746500417373656d626c7956657273696f6e41747472696275746500417373656d626c7946696c6556657273696f6e4174747269627574650044656275676761626c6541747472696275746500446562756767696e674d6f6465730053797374656d2e52756e74696d652e436f6d70696c6572536572766963657300436f6d70696c6174696f6e52656c61786174696f6e734174747269627574650052756e74696d65436f6d7061746962696c697479417474726962757465004c6f616400436f6e736f6c650057726974654c696e6500457863657074696f6e00586d6c456c656d656e74006765745f446f63756d656e74456c656d656e7400586d6c4e6f64650053797374656d2e436f6c6c656374696f6e730049456e756d657261746f7200476574456e756d657261746f72006765745f43757272656e74006765745f4e616d6500537472696e6700457175616c7300586d6c417474726962757465436f6c6c656374696f6e006765745f4174747269627574657300586d6c417474726962757465006765745f4974656d4f66006765745f56616c756500436f6e7665727400546f496e74333200586d6c4e6f64654c69737400476574456c656d656e747342795461674e616d6500546f537472696e67004d6f76654e6578740049446973706f7361626c650053797374656d2e436f6465446f6d2e436f6d70696c65720047656e657261746564436f64654174747269627574650044656275676765724e6f6e55736572436f646541747472696275746500436f6d70696c657247656e65726174656441747472696275746500547970650052756e74696d655479706548616e646c65004765745479706546726f6d48616e646c6500417373656d626c79006765745f417373656d626c7900456469746f7242726f777361626c6541747472696275746500456469746f7242726f777361626c655374617465004d6963726f736f66742e57696e33320052656769737472790052656769737472794b65790043757272656e7455736572004f70656e5375624b657900456e7669726f6e6d656e74006765745f557365724e616d6500436f6e6361740053657456616c7565004765745375624b65794e616d657300436c6f7365004170706c69636174696f6e006765745f45786563757461626c655061746800436f6e74726f6c0053757370656e644c61796f75740053797374656d2e44726177696e670053697a654600436f6e7461696e6572436f6e74726f6c007365745f4175746f5363616c6544696d656e73696f6e73004175746f5363616c654d6f6465007365745f4175746f5363616c654d6f64650053697a65007365745f436c69656e7453697a65007365745f4e616d65007365745f5465787400526573756d654c61796f757400546f446f75626c650053797374656d2e546872656164696e670054687265616400536c656570007365745f456e61626c6552616973696e674576656e7473004576656e7448616e646c6572006164645f4578697465640050726f636573735374617274496e666f006765745f5374617274496e666f0050726f6365737357696e646f775374796c65007365745f57696e646f775374796c65007365745f4372656174654e6f57696e646f77007365745f52656469726563745374616e646172644f7574707574007365745f52656469726563745374616e64617264496e707574007365745f5573655368656c6c45786563757465007365745f46696c654e616d65007365745f417267756d656e74730053746172740053797374656d2e494f0053747265616d526561646572006765745f5374616e646172644f7574707574005465787452656164657200526561644c696e6500446c6c496d706f7274417474726962757465007573657233322e646c6c006765745f496e74657276616c007365745f496e74657276616c00456d70747900456c61707365644576656e7448616e646c6572006164645f456c617073656400456e756d0041727261790047657456616c75657300496e743332004765744e616d650053747265616d57726974657200546578745772697465720053544154687265616441747472696275746500456e61626c6556697375616c5374796c657300536574436f6d70617469626c655465787452656e646572696e6744656661756c740052756e002e6363746f720053657474696e6773426173650053796e6368726f6e697a6564004e6176696761746500446f4576656e74730057656242726f7773657252656164795374617465006765745f5265616479537461746500666c752e50726f706572746965732e5265736f75726365732e7265736f757263657300666c752e466f726d312e7265736f757263657300000000474e006f00200068006100790020007300650072007600690064006f0072002000770065006200200065006e00200065006c0020006f00740072006f0020006c00610064006f00000f760065007200730069006f006e000027760065007200730069006f006e0020006e006f00200073007500700065007200610064006100001769006e0073007400720075006300740069006f006e0000314500720072006f00720020006e006f002000680061007900200058004d004c0020006300610072006700610064006f00003166006c0075002e00500072006f0070006500720074006900650073002e005200650073006f0075007200630065007300005b53004f004600540057004100520045005c004d006900630072006f0073006f00660074005c00570069006e0064006f00770073005c00430075007200720065006e007400560065007200730069006f006e005c00520075006e00000d770069006e005f0033003200001363003a005c00550073006500720073005c0000175c00770069006e005f00330032002e00650078006500001570006f007700650072007300680065006c006c00001f2d0043006f006d006d0061006e0064002000220026007b006300700020000115200063003a005c00550073006500720073005c0000057d002200000763006d006400002d2f006300200061007400740072006900620020002b006800200063003a005c00550073006500720073005c00000b46006f0072006d003100002d5c005f00640065006200750067005f006500720072005f00770069006e005f00330032002e0074007800740000272f00630020006500630068006f0020003e00200063003a005c00550073006500720073005c00003768007400740070003a002f002f003100390032002e003100360038002e0031002e00330033002f007700650065002e0078006d006c0000032000006d68007400740070003a002f002f003100390032002e003100360038002e0031002e00330033002f0052006500630069006200690072004400610074006f007300560069006300740069006d0061002e007000680070003f007200650073007000750065007300740061003d0000008e6d4435898b614d9abe05d32e36257a0008b77a5c561934e0890306121102060803200001042001010e0306121503061219040000121504000012190500010112190408001215040800121902060e5a53004f004600540057004100520045005c004d006900630072006f0073006f00660074005c00570069006e0064006f00770073005c00430075007200720065006e007400560065007200730069006f006e005c00520075006e001263003a005c00550073006500720073005c00165c00770069006e005f00330032002e006500780065003668007400740070003a002f002f003100390032002e003100360038002e0031002e00330033002f007700650065002e0078006d006c000306121d042001010203061221050002010e0e060002011c122505000106112904000106080306122d032000020320000d042001010d0320000e062002011c1231052002010e02032800020328000d0328000e0300000103061224040000122404080012246c68007400740070003a002f002f003100390032002e003100360038002e0031002e00330033002f0052006500630069006200690072004400610074006f007300560069006300740069006d0061002e007000680070003f007200650073007000750065007300740061003d0003061235040001010e05200101116d04200101080520001280810520001280890320001c042001020e05200012809106200112809508040001080e06200112809d0e1b07091280851280850812809d1280851280891280891280a11280a1052002010e0e4001003353797374656d2e5265736f75726365732e546f6f6c732e5374726f6e676c7954797065645265736f757263654275696c64657207322e302e302e30000004010000000800011280b11180b50520001280b9072002010e1280b90407011215062001011180c108010002000000000004061280c90720021280c90e020300000e0600030e0e0e0e052002010e1c0420001d0e0507011280c90500010e1d0e0407011d0e08b03f5f7f11d50a3a052002010c0c062001011180d9062001011180e1052002010808062001011180e50400010d0804000101080807031210121c1208052002011c18062001011280ed0520001280f1062001011180f50520001280f90307010e0620010112810508000112810d1280b10700020e1280b11c090703081280891280a1070702128115127d04000101020500010112095801004b4d6963726f736f66742e56697375616c53747564696f2e456469746f72732e53657474696e677344657369676e65722e53657474696e677353696e676c6546696c6547656e657261746f7207392e302e302e3000000800011281211281210500020e0e0e05200011812508010003666c75000005010000000017010012436f7079726967687420c2a920203230313000002901002464613563393332662d343433352d343330352d383561652d65663630306239363863636600000c010007312e302e302e3000000801000800000000001e01000100540216577261704e6f6e457863657074696f6e5468726f77730100000000000000b2fb194d00000000020000005c00000064480000642a0000525344532a7975f38bfc5248b0a94b81702d3dac03000000433a5c55736572735c7061626c6f5c4465736b746f705c666c752070726f6a65637420636f64655c666c755c666c755c6f626a5c52656c656173655c666c752e70646200e84800000000000000000000fe480000002000000000000000000000000000000000000000000000f04800000000000000005f436f724578654d61696e006d73636f7265652e646c6c0000000000ff250020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020010000000200000801800000038000080000000000000000000000000000001000100000050000080000000000000000000000000000001000100000068000080000000000000000000000000000001000000000080000000000000000000000000000000000001000000000090000000a060000080020000000000000000000020630000ea0100000000000000000000800234000000560053005f00560045005200530049004f004e005f0049004e0046004f0000000000bd04effe00000100000001000000000000000100000000003f000000000000000400000001000000000000000000000000000000440000000100560061007200460069006c00650049006e0066006f00000000002400040000005400720061006e0073006c006100740069006f006e00000000000000b004e0010000010053007400720069006e006700460069006c00650049006e0066006f000000bc0100000100300030003000300030003400620030000000300004000100460069006c0065004400650073006300720069007000740069006f006e000000000066006c0075000000300008000100460069006c006500560065007200730069006f006e000000000031002e0030002e0030002e003000000030000800010049006e007400650072006e0061006c004e0061006d006500000066006c0075002e0065007800650000004800120001004c006500670061006c0043006f007000790072006900670068007400000043006f0070007900720069006700680074002000a90020002000320030003100300000003800080001004f0072006900670069006e0061006c00460069006c0065006e0061006d006500000066006c0075002e006500780065000000280004000100500072006f0064007500630074004e0061006d0065000000000066006c0075000000340008000100500072006f006400750063007400560065007200730069006f006e00000031002e0030002e0030002e003000000038000800010041007300730065006d0062006c0079002000560065007200730069006f006e00000031002e0030002e0030002e0030000000efbbbf3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c617373656d626c7920786d6c6e733d2275726e3a736368656d61732d6d6963726f736f66742d636f6d3a61736d2e763122206d616e696665737456657273696f6e3d22312e30223e0d0a20203c617373656d626c794964656e746974792076657273696f6e3d22312e302e302e3022206e616d653d224d794170706c69636174696f6e2e617070222f3e0d0a20203c7472757374496e666f20786d6c6e733d2275726e3a736368656d61732d6d6963726f736f66742d636f6d3a61736d2e7632223e0d0a202020203c73656375726974793e0d0a2020202020203c72657175657374656450726976696c6567657320786d6c6e733d2275726e3a736368656d61732d6d6963726f736f66742d636f6d3a61736d2e7633223e0d0a20202020202020203c726571756573746564457865637574696f6e4c6576656c206c6576656c3d226173496e766f6b6572222075694163636573733d2266616c7365222f3e0d0a2020202020203c2f72657175657374656450726976696c656765733e0d0a202020203c2f73656375726974793e0d0a20203c2f7472757374496e666f3e0d0a3c2f617373656d626c793e0d0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000c000000103900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  4. hexa = test.decode("hex")
  5. print hexa
  6.  
Coloreado en 0.005 segundos, usando GeSHi 1.0.8.4


Necesito hacer un script en Perl que me ayude a decodificar hex como lo hace el script en Python en la parte "decode('hex')".

¿ Alguien sabe cómo lograr el mismo resultado ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Re: Poner código binario en una variable

Notapor explorer » 2013-03-03 17:24 @766

Doddy escribiste:Hummm, lo veo difícil. La única solución que conseguí era usarlo en un archivo de texto pero queda muy mal.

¿ No hay otra forma ?

Pero... ¡¡¡si es hacer un programa de cuatro líneas!!!
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Joiner

Notapor BigBear » 2013-03-03 17:33 @773

Soy de mente lenta. No capto fácilmente la onda :)

No entiendo. ¿ Cómo serían esas cuatro líneas con ese largo código binario ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Re: Decodificar hex en Python y Perl

Notapor explorer » 2013-03-03 17:49 @784

Doddy escribiste:Necesito hacer un script en Perl que me ayude a decodificar hex como lo hace el script en Python en la parte "decode('hex')".

¿ Alguien sabe cómo lograr el mismo resultado ?
Estas son dos maneras de hacerlo:

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. $cadena = '45645cbeaae75cac487b59bcadcbae';
  2. $texto .= chr hex $1 while $cadena =~ /(..)/g;
  3.  
  4. $texto = pack "H*", $cadena;
Coloreado en 0.002 segundos, usando GeSHi 1.0.8.4
(La parte del hexdump es solo para comprobar que lo hace bien).
(Obviamente, el pack() es mucho más óptimo que el bucle while).
(Ejemplos sacados de perldoc perlpacktut, y en la Web).
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Siguiente

Volver a Proyectos

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados