comment
IRC Chat
play_arrow
Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.

[Perl TK] Codificator

  • 0 Respuestas
  • 919 Vistas

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado BigBear

  • *
  • Underc0der
  • Mensajes: 543
  • Actividad:
    0%
  • Reputación 3
    • Ver Perfil
« en: Julio 03, 2011, 09:59:24 pm »
Un codificador con las sig opciones

  • Hex
  • SHA1
  • MD5
  • Base64
  • ASCII
  • URL



Imagen





Código: Perl
  1. #!usr/bin/perl
  2. #Codificator (C) Doddy Hackman 2011
  3.  
  4. use Tk;
  5. use Digest::MD5;
  6. use Digest::SHA1;
  7. use MIME::Base64;
  8. use URI::Escape;
  9.  
  10. if ($^O eq 'MSWin32') {
  11. use Win32::Console;
  12. Win32::Console::Free();
  13. }
  14.  
  15. $header= "This tool encode text in :
  16.  
  17. Hex
  18. SHA1
  19. MD5
  20. Base64
  21. ASCII
  22. URL
  23.  
  24.  
  25. ";
  26.  
  27. $window = MainWindow->new(-background=>"black",-foreground=>"white");
  28. $window->geometry("500x500+80+80");
  29. $window->title("Codificator (C) Doddy Hackman 2011");
  30. $window->resizable(0,0);
  31. $window->Label(-background=>"black",-foreground=>"white",-font=>"Impact",-text=>"Codificator")->You are not allowed to view links. Register or Login();
  32. $window->Label(-background=>"black",-foreground=>"white")->You are not allowed to view links. Register or Login();
  33. $window->Label(-background=>"black",-foreground=>"white")->You are not allowed to view links. Register or Login();
  34. $window->Label(-background=>"black",-foreground=>"white",-text=>"Code")->place(-x =>180, -You are not allowed to view links. Register or Login => 70);
  35. $window->Optionmenu(-background=>"black",-foreground=>"white",-activebackground=>'white',
  36. -options => [[HEX=>HEX], [ASCII=>ASCII], [BASE64=>BASE64], [MD5=>MD5],[SHA1=>SHA1],[URL=>URL]],  
  37. -variable => \$var,
  38. -textvariable => \$codificacion
  39. )->place(-x =>220, -You are not allowed to view links. Register or Login => 70);
  40. my $rot = $window->Text(-background=>"black",-foreground=>"white",-width=> 45,-height=> 15)->place(-x =>90, -You are not allowed to view links. Register or Login => 150);
  41. $window->Button(-text=>"Encode",-background=>"black",-foreground=>"white",-activebackground=>"white",-command=>\&encode,-width=>"10")->place(-x =>12, -You are not allowed to view links. Register or Login => 170);
  42. $window->Button(-text=>"Decode",-background=>"black",-foreground=>"white",-activebackground=>"white",-command=>\&decode,-width=>"10")->place(-x =>12, -You are not allowed to view links. Register or Login => 200);
  43. $window->Button(-text=>"Clear",-background=>"black",-foreground=>"white",-activebackground=>"white",-command=>\&clear,-width=>"10")->place(-x =>420, -You are not allowed to view links. Register or Login => 170);
  44. $window->Button(-text=>"About",-background=>"black",-foreground=>"white",-activebackground=>"white",-command=>\&about,-width=>"10")->place(-x =>420, -You are not allowed to view links. Register or Login => 200);
  45. $window->Button(-text=>"Exit",-background=>"black",-foreground=>"white",-activebackground=>"white",-command=>[$window=>'destroy'],-width=>"10")->place(-x =>420, -You are not allowed to view links. Register or Login => 230);
  46. $window->Label(-background=>"black",-foreground=>"white",-text=>"Copyright 2011 Doddy Hackman",-font=>"Impact")->place(-x =>150, -You are not allowed to view links. Register or Login => 430);
  47. $rot->insert('end',$header);
  48.  
  49. MainLoop;
  50.  
  51.  
  52. sub about {
  53. my $venta = MainWindow->new(-background=>"black");
  54. $venta->geometry("300x180+20+20");
  55. $venta->title("About");
  56. $venta->resizable(0,0);
  57. $venta->Label(-font=>"Impact",-text=>"\nCodificator",-background=>"black",-foreground=>"white")->You are not allowed to view links. Register or Login();
  58. $venta->Label(-text=>"\nProgrammer : Doddy Hackman\n\nContact : lepuke[at]hotmail[com]\n\n",-background=>"black",-foreground=>"white")->You are not allowed to view links. Register or Login();
  59. $venta->Button(-text=>"Exit",-foreground=>"white",-background=>"black",-command => [$venta => 'destroy'],-activebackground=>'white',-width=>"20")->You are not allowed to view links. Register or Login()
  60. }
  61.  
  62. sub clear {
  63. $rot->You are not allowed to view links. Register or Login('0.1','end');
  64. }
  65.  
  66. sub encode {
  67. $text = $rot->get("1.0", "end");
  68. You are not allowed to view links. Register or Login $text;
  69. &clear;
  70. if ($codificacion eq "HEX") {
  71. $result = hexar($text);
  72. $rot->insert('end',$result);
  73. You are not allowed to view links. Register or Login $result;
  74. }
  75.  
  76. elsif ($codificacion eq "SHA1") {
  77. $sha1 = Digest::SHA1->new->add($text);
  78. my $digest = $sha1->digest;
  79. $rot->insert('end',$digest);
  80. }
  81. elsif ($codificacion eq "BASE64") {
  82. $result = encode_base64($text);
  83. $rot->insert('end',$result);
  84. }
  85. elsif ($codificacion eq "URL") {
  86. my $codec  = Badger::Codec::URL->new();
  87. my $ya = $codec->encode($text);
  88. $rot->insert('end',$ya);
  89. }
  90. elsif ($codificacion eq "ASCII") {
  91. $result = ascii($text);
  92. $rot->insert('end',$result);
  93. }
  94. elsif ($codificacion eq "MD5") {
  95. $digest = Digest::MD5->md5_hex($text);
  96. $rot->insert('end',$digest);
  97. }
  98. else {
  99. $window->messageBox(-message=>"What?!\n");
  100. }}
  101.  
  102.  
  103. sub decode {
  104. $text = $rot->get("1.0", "end");
  105. You are not allowed to view links. Register or Login $text;
  106. &clear;
  107. if ($codificacion eq "HEX") {
  108. $result = decodera($text);
  109. $rot->insert('end',$result);
  110. }
  111.  
  112. elsif ($codificacion eq "SHA1") {
  113. $window->messageBox(-message=>"What?! , it's not possible with a function decoded\n");
  114. }
  115. elsif ($codificacion eq "BASE64") {
  116. $result = decode_base64($text);
  117. $rot->insert('end',$result);
  118. }
  119. elsif ($codificacion eq "URL") {
  120. my $codec  = Badger::Codec::URL->new();
  121. my $ya = $codec->decode($text);
  122. $rot->insert('end',$ya);
  123. }
  124. elsif ($codificacion eq "ASCII") {
  125. $result = ascii_de($text);
  126. $rot->insert('end',$result);
  127. }
  128. elsif ($codificacion eq "MD5") {
  129. $window->messageBox(-message=>"What?! , it's not possible with a function decoded\n");
  130. }
  131. else {
  132. $window->messageBox(-message=>"What?!\n");
  133. }}
  134.  
  135. sub hexar {
  136. my $string = $_[0];
  137. $hex = '0x';
  138. for (You are not allowed to view links. Register or Login //,$string) {
  139. $hex .= You are not allowed to view links. Register or Login "%x", You are not allowed to view links. Register or Login;
  140. }You are not allowed to view links. Register or Login $hex;}
  141.  
  142. sub ascii {
  143. You are not allowed to view links. Register or Login You are not allowed to view links. Register or Login ',',You are not allowed to view links. Register or Login "U*",$_[0];
  144. }
  145.  
  146.  
  147. sub decodera {
  148. $_[0] =~ s/^0x//;
  149. $encode = You are not allowed to view links. Register or Login You are not allowed to view links. Register or Login[], You are not allowed to view links. Register or Login { You are not allowed to view links. Register or Login You are not allowed to view links. Register or Login } $_[0] =~ /../g;
  150. You are not allowed to view links. Register or Login $encode;
  151. }
  152.  
  153. sub ascii_de {
  154. $_[0] = You are not allowed to view links. Register or Login You are not allowed to view links. Register or Login[], You are not allowed to view links. Register or Login { You are not allowed to view links. Register or Login } You are not allowed to view links. Register or Login You are not allowed to view links. Register or Login[,],$_[0];
  155. You are not allowed to view links. Register or Login $_[0];
  156. }
  157.  
  158. # ¿ The End ?
  159.  
« Última modificación: Julio 17, 2011, 03:44:38 am por Sthefano02 »

 

¿Te gustó el post? COMPARTILO!



Tutorial perl desde cero By: Black Poision & Painboy

Iniciado por ProcessKill

Respuestas: 2
Vistas: 3007
Último mensaje Septiembre 02, 2011, 09:43:36 pm
por blozzter
[Perl] Verificando si es root para correr un script

Iniciado por c1st

Respuestas: 1
Vistas: 1410
Último mensaje Octubre 07, 2012, 06:01:39 pm
por ANTRAX
[Perl] Search in google for scan SQLI

Iniciado por BigBear

Respuestas: 0
Vistas: 1181
Último mensaje Julio 03, 2011, 09:49:49 pm
por BigBear
[Perl] Half Life Servers List 0.1

Iniciado por BigBear

Respuestas: 0
Vistas: 1041
Último mensaje Noviembre 12, 2012, 07:31:50 pm
por BigBear
DoSing IP 1.0 - [Creado por SkillmaX] + Source [PERL]

Iniciado por SkillmaX

Respuestas: 0
Vistas: 1330
Último mensaje Julio 04, 2010, 10:14:31 am
por SkillmaX