El código:
Using perl Syntax Highlighting
- #!usr/bin/perl
- #ASCII Art 0.2
- #Coded By Doddy H
- #
- #http://search.cpan.org/~lory/Text-Banner-1.00/Banner.pm
- #
- use Text::Banner;
- use Time::HiRes "usleep";
- my $start = Text::Banner->new;
- sub head {
- my @logo = (
- "#=============================================#", "\n",
- "# ASCII Art 0.2 #", "\n",
- "#---------------------------------------------#", "\n",
- "# Written By Doddy H #", "\n",
- "# Email: lepuke[at]hotmail[com] #", "\n",
- "# Website: doddyhackman.webcindario.com #", "\n",
- "#---------------------------------------------#", "\n",
- "# The End ? #", "\n",
- "#=============================================#", "\n"
- );
- print "\n";
- marquesina(@logo);
- }
- head();
- print "\n\n[+] Text : ";
- chomp( my $text = <stdin> );
- print "\n\n[+] Fill : ";
- chomp( my $fill = <stdin> );
- print "\n\n\n" . artnow( $text, $fill ) . "\n";
- copyright();
- sub artnow {
- $start->set( $_[0] );
- $start->fill( $_[1] );
- return $start->get;
- }
- sub marquesina {
- #Effect based in the exploits by Jafer Al Zidjali
- my @logo = @_;
- my $car = "|";
- for my $uno (@logo) {
- for my $dos ( split //, $uno ) {
- $|++;
- if ( $car eq "|" ) {
- mostrar( "\b" . $dos . $car, "/" );
- }
- elsif ( $car eq "/" ) {
- mostrar( "\b" . $dos . $car, "-" );
- }
- elsif ( $car eq "-" ) {
- mostrar( "\b" . $dos . $car, "\\" );
- }
- else {
- mostrar( "\b" . $dos . $car, "|" );
- }
- usleep(40_000);
- }
- print "\b ";
- }
- sub mostrar {
- print $_[0];
- $car = $_[1];
- }
- }
- sub copyright {
- print "\n\n";
- marquesina("-- == (C) Doddy Hackman 2012 == --");
- print "\n\n";
- <stdin>;
- exit(1);
- }
- #The End ?
Coloreado en 0.004 segundos, usando GeSHi 1.0.8.4
Un ejemplo de uso
- Código: Seleccionar todo
r00t ~ # art2.pl
#=============================================#
# ASCII Art 0.2 #
#---------------------------------------------#
# Written By Doddy H #
# Email: lepuke[at]hotmail[com] #
# Website: doddyhackman.webcindario.com #
#---------------------------------------------#
# The End ? #
#=============================================#
[+] Text : hacked
[+] Fill : #
# # ## #### # # ###### #####
# # # # # # # # # # #
###### # # # #### ##### # #
# # ###### # # # # # #
# # # # # # # # # # #
# # # # #### # # ###### #####
-- == (C) Doddy Hackman 2012 == --