Hack x Crack - Comunidad de Seguridad informática

Programación => Scripting => Perl => Mensaje iniciado por: BigBear en Septiembre 14, 2013, 12:38:58 am

Título: [Perl Tk] HTTP FingerPrinting 0.1
Publicado por: BigBear en Septiembre 14, 2013, 12:38:58 am
Un simple script en Perl para HTTP FingerPrinting o por lo menos lo intenta xDD.

El codigo :

Código: Perl
  1. #!usr/bin/perl
  2. #HTTP FingerPrinting 0.1
  3. #Coded By Doddy H
  4.  
  5. use LWP::UserAgent;
  6.  
  7. my $nave = LWP::UserAgent->new;
  8. $nave->agent(
  9. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  10. );
  11.  
  12. print "\n-- == HTTP FingerPrinting 0.1 == --\n";
  13.  
  14. unless ( $ARGV[0] ) {
  15.  
  16.     print "\n[+] Sintax : $0 <page> < -fast / -full >\n";
  17.  
  18. }
  19. else {
  20.  
  21.     print "\n[+] Getting Data ...\n";
  22.  
  23.     my $code = $nave->get( $ARGV[0] );
  24.  
  25.     print "\n----------------------------------------------\n";
  26.  
  27.     if ( $ARGV[1] eq "-full" ) {
  28.  
  29.         print $code->headers()->as_string();
  30.  
  31.     }
  32.     else {
  33.  
  34.         print "\n[+] Date : " . $code->header('date');
  35.         print "\n[+] Server : " . $code->header('server');
  36.         print "\n[+] Connection : " . $code->header('connection');
  37.         print "\n[+] Content-Type : " . $code->header('content-type');
  38.  
  39.     }
  40.  
  41.     print "\n----------------------------------------------\n";
  42.  
  43. }
  44.  
  45. print "\n[+] Coded By Doddy H\n";
  46.  
  47. #The End ?
  48.  

Tambien hice una version grafica :

Una imagen :

(http://doddyhackman.webcindario.com/images/httpl.jpg)

El codigo :

Código: Perl
  1. #!usr/bin/perl
  2. #HTTP FingerPrinting 0.1
  3. #Version Tk
  4. #Coded By Doddy H
  5.  
  6. use Tk;
  7. use LWP::UserAgent;
  8.  
  9. if ( $^O eq 'MSWin32' ) {
  10.     use Win32::Console;
  11.     Win32::Console::Free();
  12. }
  13.  
  14. my $nave = LWP::UserAgent->new;
  15. $nave->agent(
  16. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  17. );
  18.  
  19. my $background_color = "black";
  20. my $foreground_color = "green";
  21.  
  22. my $ven = MainWindow->new(
  23.     -background => $background_color,
  24.     -foreground => $foreground_color
  25. );
  26. $ven->title("HTTP FingerPrinting 0.1 (C) Doddy Hackman 2013");
  27. $ven->geometry("430x340+20+20");
  28. $ven->resizable( 0, 0 );
  29.  
  30. $ven->Label(
  31.     -background => $background_color,
  32.     -foreground => $foreground_color,
  33.     -text       => "Target : ",
  34.     -font       => "Impact"
  35. )->place( -x => 20, -y => 20 );
  36. my $target = $ven->Entry(
  37.     -background => $background_color,
  38.     -foreground => $foreground_color,
  39.     -width      => 30,
  40.     -text       => "http://www.petardas.com"
  41. )->place( -x => 80, -y => 25 );
  42. $ven->Button(
  43.     -command          => \&fast,
  44.     -activebackground => $foreground_color,
  45.     -background       => $background_color,
  46.     -foreground       => $foreground_color,
  47.     -text             => "Fast",
  48.     -width            => 10
  49. )->place( -x => 270, -y => 25 );
  50. $ven->Button(
  51.     -command          => \&full,
  52.     -activebackground => $foreground_color,
  53.     -background       => $background_color,
  54.     -foreground       => $foreground_color,
  55.     -text             => "Full",
  56.     -width            => 10
  57. )->place( -x => 345, -y => 25 );
  58. $ven->Label(
  59.     -background => $background_color,
  60.     -foreground => $foreground_color,
  61.     -text       => "OutPut",
  62.     -font       => "Impact"
  63. )->place( -x => 175, -y => 70 );
  64. my $output = $ven->Text(
  65.     -background => $background_color,
  66.     -foreground => $foreground_color,
  67.     -width      => 55,
  68.     -heigh      => 15
  69. )->place( -x => 18, -y => 100 );
  70.  
  71. MainLoop;
  72.  
  73. sub fast {
  74.  
  75.     $output->delete( "0.1", "end" );
  76.  
  77.     my $code = $nave->get( $target->get );
  78.  
  79.     $output->insert( "end", "[+] Date : " . $code->header('date') );
  80.     $output->insert( "end", "\n[+] Server : " . $code->header('server') );
  81.     $output->insert( "end",
  82.         "\n[+] Connection : " . $code->header('connection') );
  83.     $output->insert( "end",
  84.         "\n[+] Content-Type : " . $code->header('content-type') );
  85.  
  86. }
  87.  
  88. sub full {
  89.  
  90.     $output->delete( "0.1", "end" );
  91.  
  92.     my $code = $nave->get( $target->get );
  93.  
  94.     $output->insert( "end", $code->headers()->as_string() );
  95.  
  96. }
  97.  
  98. #The End ?
  99.