[SOLUCIONADO] Generador wordlist

Iniciado por puntoCL, Enero 17, 2016, 08:10:57 AM

Tema anterior - Siguiente tema

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

Enero 17, 2016, 08:10:57 AM Ultima modificación: Enero 17, 2016, 09:36:51 AM por Stiuvert
Hola.

la semana pasada vi un generador de wordlist y no puedo encontrar el link. lo que hace es script que tu dabas la caracteres y lo combinaba y te lo guardaba en un txt por ejemplo si yo ponía 123abc y que sea con 4 caracteres te hacia la combinación como:

123a
123b
123c
12ab
12ac
etc....

como decía no puedo encontrar el link adonde lo había visto si alguien sabe algo del script


Saludos





Enero 17, 2016, 08:37:13 AM #1 Ultima modificación: Enero 19, 2016, 03:41:25 PM por Cl0udswX
¿Te refieres a CRUNCH?

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
Saludos

Enero 17, 2016, 08:42:18 AM #2 Ultima modificación: Enero 17, 2016, 08:44:58 AM por Hu3c0
Hola compadre @You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login te debía una por el aportazo de los SO de windows y te devuelvo el favor:
Aquí comparto dos generadores  de diccionarios con patrones son dos script un en .sh y otro en perl

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Estos generadores los tenía en el baúl de los recuerdos el exe no lo he llegado a utilizar  este es el reporte de virustotal.

CitarYou are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Estos son los códigos de los scripts

[1] Script en .sh

Citar
Código: text
#!/bin/bash

flag_no_ceros=false
flag_salida=false
caracter_espacio=""

uso()
{
        echo "Uso: $0 [OPCIONES] <diccionario1> <diccionario2>"
        echo "  Lista de opciones:"
        echo "  -e, inserta espacio entre dos palabras"
        echo "  -h, muestra esta ayuda"
        echo "  -z, omite ceros en ambos diccionarios"
        echo "  -o, especifica archivo de salida."
        echo "      Salida estándard si se omite esta opción"
}

if [ $# -eq 0 ]
then
        uso
        exit 1
fi

while getopts "zeho:" Opcion
do
        case $Opcion in
                e)
                        caracter_espacio=" "
                        ;;
                h)
                        uso
                        exit 1
                        ;;
                z)
                        flag_no_ceros=true
                        ;;
                o)
                        salida=$OPTARG
                        flag_salida=true
                        ;;
                ?)
                        echo "opción $OPTARG no reconocida"
                        ;;
                :)
                        echo "opción $OPTARG requiere un argumento"
                        ;;
        esac
done

shift $(( OPTIND - 1 ))

if [ -z $1 ]||[ -z $2 ]
then
        echo "Faltan argumentos"
        exit 1
fi

if [ ! -e $1 ]
then
        echo "No se pudo encontrar $1"
        exit 1
fi

if [ ! -e $2 ]
then
        echo "No se pudo encontrar $2"
        exit 1
fi

for f1 in $(if [ $flag_no_ceros == true ]
        then
                cat $1|tr -d "0"
        else
                cat $1
        fi)
do
        for f2 in $(if [ $flag_no_ceros == true ]
                then
                        cat $2|tr -d "0"
                else
                        cat $2
                fi)
        do
                if [ $flag_salida == true ]
                then
                        echo $f1$caracter_espacio$f2 >> $salida
                else
                        echo $f1$caracter_espacio$f2
                fi
        done
done

[2] Script en perl

Citar
Código: text
#!/usr/bin/perl

#######################################################################
# Fichero:                      sgen.pl
# Fecha: 2-03-2010
# Version 1.2
# Autor:                        |FluiD| ([email protected])
# Descripcion: Generador de diccionarios.
#
# Este programa es software libre; puedes redistribuirlo y/o modificarlo
# bajo los términos de la Licencia Publica General GNU (GPL) publicada
# por la Free Software Foundation; en su versión numero 3, o (bajo tu
# criterio) la ultima versión. Mira http://www.fsf.org/copyleft/gpl.txt
#
# Este programa se distribuye SIN GARANTIA de ningún tipo.
#
##########################################################################

#Variables a mostrar en menu.
$p = "N/A.";
$s = "N/A.";

# Salida estandar de HEX aleatorias
if (($ARGV[0] eq "-h") or ($ARGV[0] eq "-H"))
   {

print <<AQUI;

StrinGenerator 1.2, by |FluiD| <[email protected]>
usage: perl sgen.pl [ -hxX  <num> ]

   Sin parametro muestra menu. 

  -h Muestra esta ayuda.
  -x HEX aleatorias minusculas en STDOUT.
  -X HEX aleatorias mayusculas en STDOUT.
  <num> Longitud de HEX (para -x -X). Sin <num>, 26 char.

AQUI
      exit;
   }
elsif ($ARGV[0] eq "-X")
   {
      &hex_may_out;
   }
elsif ($ARGV[0] eq "-x")
   {
      &hex_min_out;
   }

################################################################################################################
####################################### SUBRUTINA menu_principal ###############################################

&menu_principal;

sub menu_principal
{

my ($opmenu);

&limpia;
print <<AQUI;
===================================================
          StrinGenenator v1.2 by |FluiD|
===================================================
1.-  Dic. letras minusculas.
2.-  Dic. letras MAYUSCULAS.
3.-  Dic. letras minusculas y numeros.
4.-  Dic. letras MAYUSCULAS y numeros.
5.-  Dic. numeros.
6.-  Dic. numeros desde... hasta...
7.-  Dic. HEX.
8.-  Dic. HEX aleatorios.
9.-  Dic. con string y letras minusculas.
10.- Dic. con string y letras MAYUSCULAS.
11.- Dic. con string y numeros.
12.- Dic. con string, letras minusculas y numeros.
13.- Dic. con string, letras MAYUSCULAS y numeros.
14.- Dic. a medida.
15.- Dic. a medida por volumenes.
16.- Filtrar palabras en archivo de texto.
17.- Conversor archivos Mayusculas/Minusculas.
---------------------------------------------------
p.-Prefijo : $p
s.-Sufijo  : $s
---------------------------------------------------
AQUI

print " Opcion: ";

$opmenu = <STDIN>;
chomp $opmenu;

if ($opmenu eq 1)
   {
      &fichero;
      &longitud;
      &let_min;
   }
elsif ($opmenu eq 2)
   {
      &fichero;
      &longitud;
      &let_may;
   }
elsif ($opmenu eq 3)
   {
      &fichero;
      &longitud;
      &let_min_num;
   }
elsif ($opmenu eq 4)
   {
      &fichero;
      &longitud;
      &let_may_num;
   }
elsif ($opmenu eq 5)
   {
      &fichero;
      &longitud;
      &num;
   }
elsif ($opmenu eq 6)
   {
      &fichero;
      &num_def;
   }
elsif ($opmenu eq 7)
   {
      &fichero;
      &longitud;
      &hex;
   }
elsif ($opmenu eq 8)
   {
      &fichero;
      &hex_aleatorio;
   }
elsif ($opmenu eq 9)
   {
      &fichero;
      &longitud;
      &string;
      &string_min;
   }
elsif ($opmenu eq 10)
   {
      &fichero;
      &longitud;
      &string;
      &string_may;
   }
elsif ($opmenu eq 11)
   {
      &fichero;
      &longitud;
      &string;
      &string_num;
   }
elsif ($opmenu eq 12)
   {
      &fichero;
      &longitud;
      &string;
      &string_min_num;
   }
elsif ($opmenu eq 13)
   {
      &fichero;
      &longitud;
      &string;
      &string_may_num;
   }
elsif ($opmenu eq 14)
   {  &fichero;
      &longitud2;
      &medida2;
   }
elsif ($opmenu eq 15)
   {  &menu_volumen;
      &fichero;
      &longitud2;
      &medida;
   } 
elsif ($opmenu eq 16)
   {
      &fichero;
      &cleandic;
   }
elsif ($opmenu eq 17)
   {
      &fichero;
      &conv;
   }
elsif ($opmenu eq "p")
   {
      &prefijo;
   }
elsif ($opmenu eq "s")
   {
      &sufijo;
   }
else
   {
      &menu_principal;
   }

} #SUB


################################################################################################################
####################################### SUBRUTINA hex_may_out ##################################################

######################################################
# Ejecutando el script con perl sgen.pl -X <num>
# genera por la salida estandar Hex aleatorias en
# mayusculas con la longitud <num>.
# Sin <num> genera con longitud 26
######################################################

sub hex_may_out
{
   my($long,@hex,$cont,$num,$hex);

   $long = $ARGV[1];

   if (($long eq "") or ($long !~ /\b\d+\b/)) {$long= 26};


   @hex = (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F);
   $cont = 0;

while(1)
   {

      $num =  int(rand(16));
      $hex = $hex.$hex[$num];

      $cont++;

         if ($cont == $long)
            {
               $cont=0;
               print "$hex\n";
               $hex = "";
            }
   }
}


################################################################################################################
####################################### SUBRUTINA hex_min_out ##################################################

######################################################
# Ejecutando el script con perl sgen.pl -x <num>
# genera por la salida estandar Hex aleatorias en
# minusculas con la longitud <num>
# Sin <num> genera con longitud 26.
######################################################


sub hex_min_out
{
   my($long,@hex,$cont,$num,$hex);

   $long = $ARGV[1];

  if (($long eq "") or ($long !~ /\b\d+\b/)) {$long= 26};

   @hex = (0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f);
   $cont = 0;

while(1)
   {
      $num =  int(rand(16));
      $hex = $hex.$hex[$num];

      $cont++;

         if ($cont == $long)
            {
               $cont=0;
               print "$hex\n";
               $hex = "";
            }
   }
}

################################################################################################################
####################################### SUBRUTINA prefijo #####################################################

sub prefijo
{
   print "\n Este prefijo se aplicara a TODOS los diccionarios.\n";
   print " A excepcion de las opciones 16 y 17.\n";
   print " Pulsa solo enter para no usar ningun prefijo.\n\n";
   print " Prefijo: ";
   $pref = <STDIN>;
   chomp $pref;

   if ($pref eq "")
      {
         $p = "N/A.";
      }
   else
      {
         $p = $pref;
      }

   &menu_principal;
}


################################################################################################################
####################################### SUBRUTINA sufijo #####################################################

sub sufijo
{
   print "\n Este sufijo se aplicara a TODOS los diccionarios.\n";
   print " A excepcion de las opciones 16 y 17.\n";
   print " Pulsa solo enter para no usar ningun prefijo.\n\n";
   print " Sufijo: ";
   $suf = <STDIN>;
   chomp $suf;

   if ($suf eq "")
      {
         $s = "N/A.";
      }
   else
      {
         $s = $suf;
      }

   &menu_principal;
}


################################################################################################################
####################################### SUBRUTINA cleandic #####################################################

# Extrae palabras de archivos de texto

sub cleandic
{

# Declaramos las variables como local
my ($longitud, $archivo, @matriz1, @matriz2, $opcion);

@matriz1=();
@matriz2=();
$longitud=();
$opcion=();

# El nombre del diccionario a crear se obtiene en una llamada en la subrutina menu_principal

# Obtenemos el nombre del archivo de texto a filtar
print " Nombre del archivo de texto a filtrar: ";
$archivo = <STDIN>;
chomp $archivo;

# Abrimos el archivo a filtrar
if (not open (ARCHIVOAFILTRAR, "$archivo"))
   {
      print " No se ha podido abrir el archivo!";
      $null = (<STDIN>);
      &menu_principal
   }

# Agregamos a la matriz2 cada linea del archivo de texto
while (<ARCHIVOAFILTRAR>)
   {
      @matriz1 = split(/\s+/, $_);
      splice(@matriz2, $#matriz2+1, 0, @matriz1);
   }

ETI3:
print <<AQUI;

===================================================

1.-    Extrae todo, no filtra longitud.

2.-    Extrae longitud indicada.

3.-    Todas las longitudes menores o igual que...

4.-    Todas las longitudes mayores o igual que...

===================================================

AQUI

print " Opcion: ";
$opcion = (<STDIN>);
chomp $opcion;
if ($opcion !~ /\b[1-4]\b/) {goto ETI3;}

if ($opcion ne 1)
   {
      ETI4:
      print " Longitud en caracteres de las palabras a extraer: ";
      $longitud = <STDIN>;
      chomp $longitud;
      if ($longitud !~ /\b[1-9]+\b/) {goto ETI4;}
   }

# Opcion menu 1
if ($opcion eq 1)
   {
      foreach (@matriz2)
         {
            print DICC "$_\n";
         }

      close ARCHIVOAFILTRAR;
      &generando;
      &generado;     
   }

# Opcion menu 2
elsif ($opcion eq 2 )
   {
      foreach (@matriz2)
         {
            if (length($_) eq $longitud)
               {
                  print DICC "$_\n";
               }
         }

      close ARCHIVOAFILTRAR;
      &generando;
      &generado;     

   }

# Opcion menu 3
elsif ($opcion eq 3 )
   {
      foreach (@matriz2)
         {
            if (length($_) <= $longitud)
               {
                  print DICC "$_\n";
               }
         }

      close ARCHIVOAFILTRAR;
      &generando;
      &generado;     

   }

# Opcion menu 4
elsif ($opcion eq 4 )
   {
      foreach (@matriz2)
         {
            if (length($_) >= $longitud)
               {
                  print DICC "$_\n";
               }
         }

      close ARCHIVOAFILTRAR;
      &generando;
      &generado;     

   }

print " Opciones no validas!";
$null = <STDIN>;
&menu_principal;

} # Fin sub cleandic

################################################################################################################
####################################### SUBRUTINA menu_volumen #################################################

sub menu_volumen
{

# De aqui obtenemos la variable $tamano

print " Generar el diccionario en varios volumenes? (s/n): ";
$sino = <STDIN>;

if ($sino =~ /\bs\b/i)
   {
   
      $fijaerror = 1;
      ETI1:
      print " Cuantos Mb por volumen: ";
      $tamano = <STDIN>;
      chomp $tamano;

      if (($tamano !~ /\b\d\d*\b/) or ($tamano eq 0)) {goto ETI1;}

# De aqui obtenemos la variable $stop que nos servira en la subrutina comprueba
     
      ETI2:
      print " Esperar y preguntar despues de cada volumen? (s/n): ";
      $stop = <STDIN>;
      chomp $stop;

      if ($stop =~ /\bs\b/i)
         {
            $stop = 1;
         }
   
      elsif ($stop =~ /\bn\b/i)
         {
            $stop = 0;
         }
      else {goto ETI2;}

   }
elsif ($sino =~ /\bn\b/i)
   {
      #Esto es necesario para fijar el error de $tamano cuando no tiene valor, ya que entra en el
      #condicional if de la subrutina &comprueba y hace "true" la sentencia

      $fijaerror = 0;
   }
else
   {
      &menu_volumen;
   }

} #SUB


################################################################################################################
####################################### SUBRUTINA comprueba ####################################################

sub comprueba
{
   $size = (-s DICC);
   $size = (($size / 1024) / 1024);
   if (($size >= $tamano) and ($fijaerror eq 1))
   {

      close DICC;
      $sumavol++;
      open (DICC, ">$diccionario$sumavol");

      if ($stop eq 1)
         {
            print "\n";
            print " Volumen $sumavol con $tamano Mb creado\n";
            print " Pulsa ENTER para continuar";
            $null = <STDIN>;
            &generando2
         }
   }
}



################################################################################################################
####################################### SUBRUTINA limpia #######################################################

sub limpia
{
$platform = `uname -o`;
chomp $platform;

   if ($platform eq "GNU/Linux")
      {
         system clear;
      }
   else
      {
         system cls;
      }
}


################################################################################################################
####################################### SUBRUTINA fichero ######################################################

sub fichero
{

   #Obtenemos el nombre del diccionario y lo abrimos con el gestor
   
   print " Nombre del diccionario a crear: ";
   $diccionario = <STDIN>;
   if ($diccionario eq "\n"){&fichero;}
   chomp $diccionario;
   if ( -e $diccionario)
      {
         print "\n";
         print " ---------------------------------------------\n";
         print " El diccionario a crear ya existe.\n";
         print " Las palabras nuevas seran agregadas al final.\n";
         print " ---------------------------------------------\n";
      }

   open (DICC, ">>$diccionario");

}


################################################################################################################
####################################### SUBRUTINA logitud ######################################################

sub longitud
{
      print " Logitud de la cadena (num. de variables(2-13)): ";
      $longitud = <STDIN>;
      chomp $longitud;
      if (($longitud ne 2) and
          ($longitud ne 3) and
          ($longitud ne 4) and
          ($longitud ne 5) and
          ($longitud ne 6) and
          ($longitud ne 7) and
          ($longitud ne 8) and
          ($longitud ne 9) and
          ($longitud ne 10) and
          ($longitud ne 11) and
          ($longitud ne 12) and
          ($longitud ne 13))
            {
               &longitud;
            }
}   



################################################################################################################
####################################### SUBRUTINA logitud2 #####################################################

# Esta subrutina es solo para  &medida y $medida2, para poder ampliar la longitud maxima a 15
sub longitud2
{
      print " Logitud de la cadena (num. de variables(2-15)): ";
      $longitud = <STDIN>;
      chomp $longitud;
      if (($longitud ne 2) and
          ($longitud ne 3) and
          ($longitud ne 4) and
          ($longitud ne 5) and
          ($longitud ne 6) and
          ($longitud ne 7) and
          ($longitud ne 8) and
          ($longitud ne 9) and
          ($longitud ne 10) and
          ($longitud ne 11) and
          ($longitud ne 12) and
          ($longitud ne 13) and
          ($longitud ne 14) and
          ($longitud ne 15))
         
            {
               &longitud2;
            }
}   

################################################################################################################
####################################### SUBRUTINA string #######################################################

sub string
{
   print " Cadena o string a intercalar entre las variables: ";
   $string =<STDIN>;
   chomp $string;
   @string = ();
   unshift (@string,$string);
}

################################################################################################################
####################################### SUBRUTINA generando ####################################################

sub generando
{
print <<AQUI;

===================================================
Generando diccionario...
Nombre del diccionario : $diccionario
CONTROL + C cancela diccionario.
===================================================
AQUI
}
################################################################################################################
####################################### SUBRUTINA generando2 ###################################################

sub generando2
{
print <<AQUI;

===================================================
Generando diccionario...
CONTROL + C cancela diccionario.
===================================================
AQUI
}

################################################################################################################
###################################### SUBRUTINA generado ######################################################

sub generado
{
close DICC;
print <<AQUI;

===================================================
Diccionario creado con exito.
Pulsa ENTER para volver a menu.
===================================================
AQUI

$null =  <STDIN>;
&menu_principal;
}


################################################################################################################
####################################### SUBRUTINA agrega #######################################################

sub agrega
{
print <<AQUI;

===================================================
Introduce los atajos con los corchetes.
Para mas ayuda consulta el LEEME.txt
---------------------------------------------------

[a-z] Agrega abecedario completo en min.

[A-Z] Agrega abecedario completo en MAY.

[0-9] Agrega todos los numeros.

[a-f] Agrega todos los caracteres HEX en min.

[A-F] Agrega todos los caracteres HEX en MAY.

===================================================
Introduce cualquier caracter, palabra o signo de
puntuacion y pulsa ENTER.
Se generaran todas las combinaciones de los
caracteres que introduzcas.
---------------------------------------------------
Para comenzar a generar el diccionario
escribe .exit en minusculas (Con el punto).
===================================================

AQUI
}

################################################################################################################
####################################### SUBRUTINA let_min ######################################################

sub let_min
{

##############################################
#   Genera combinaciones de la "a" a la "z" 
#   de letras minusculas de longitud de entre
#   2 y 13 caracteres.
##############################################

#DEFINIMOS VARIABLES COMO LOCAL
my ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,@matriz);

@matriz=("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");

&generando;

#VARIABLE 1
foreach $var1(@matriz)
{

#VARIABLE 2
      foreach $var2(@matriz)
      {
if ($longitud == 2)
         {
         print DICC $pref,$var1,$var2,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 3     
      foreach $var3(@matriz)
      {
         if ($longitud == 3)
         {
         print DICC $pref,$var1,$var2,$var3,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 4     
      foreach $var4(@matriz)
      {
         if ($longitud == 4)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 5
      foreach $var5(@matriz)
      {
         if ($longitud == 5)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 6     
      foreach $var6(@matriz)
      {
         if ($longitud == 6)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 7     
      foreach $var7(@matriz)
      {
         if ($longitud == 7)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 8     
      foreach $var8(@matriz)
      {
         if ($longitud == 8)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 9     
      foreach $var9(@matriz)
      {
         if ($longitud == 9)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 10     
      foreach $var10(@matriz)
      {
         if ($longitud == 10)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 11     
      foreach $var11(@matriz)
      {
         if ($longitud == 11)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 12     
      foreach $var12(@matriz)
      {
         if ($longitud == 12)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 13     
      foreach $var13(@matriz)
      {
         if ($longitud == 13)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,$suf;
         print DICC "\n";
         next;
         }

      } #BUCLE 13
      } #BUCLE 12
      } #BUCLE 11
      } #BUCLE 10
      } #BUCLE 9
      } #BUCLE 8
      } #BUCLE 7
      } #BUCLE 6
      } #BUCLE 5
      } #BUCLE 4
      } #BUCLE 3
      } #BUCLE 2

} #BUCLE 1

&generado;

} #SUB

################################################################################################################
####################################### SUBRUTINA let_may ######################################################

sub let_may
{

##############################################
#   Genera combinaciones de la "a" a la "z" 
#   de letras MAYUSCULAS de longitud de entre
#   2 y 13 caracteres.
##############################################

#DEFINIMOS VARIABLES COMO LOCAL
my ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,@matriz);

@matriz=("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");

&generando;

#VARIABLE 1
foreach $var1(@matriz)
{

#VARIABLE 2
      foreach $var2(@matriz)
      {
if ($longitud == 2)
         {
         print DICC $pref,$var1,$var2,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 3     
      foreach $var3(@matriz)
      {
         if ($longitud == 3)
         {
         print DICC $pref,$var1,$var2,$var3,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 4     
      foreach $var4(@matriz)
      {
         if ($longitud == 4)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 5
      foreach $var5(@matriz)
      {
         if ($longitud == 5)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 6     
      foreach $var6(@matriz)
      {
         if ($longitud == 6)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 7     
      foreach $var7(@matriz)
      {
         if ($longitud == 7)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 8     
      foreach $var8(@matriz)
      {
         if ($longitud == 8)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 9     
      foreach $var9(@matriz)
      {
         if ($longitud == 9)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 10     
      foreach $var10(@matriz)
      {
         if ($longitud == 10)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 11     
      foreach $var11(@matriz)
      {
         if ($longitud == 11)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 12     
      foreach $var12(@matriz)
      {
         if ($longitud == 12)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 13     
      foreach $var13(@matriz)
      {
         if ($longitud == 13)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,$suf;
         print DICC "\n";
         next;
         }

      } #BUCLE 13
      } #BUCLE 12
      } #BUCLE 11
      } #BUCLE 10
      } #BUCLE 9
      } #BUCLE 8
      } #BUCLE 7
      } #BUCLE 6
      } #BUCLE 5
      } #BUCLE 4
      } #BUCLE 3
      } #BUCLE 2

} #BUCLE 1

&generado;

} #SUB

####################################################################################################################
####################################### SUBRUTINA let_min_num ######################################################

sub let_min_num
{

##############################################
#   Genera combinaciones de letras minusculas
#   y numeros (en ese orden) de entre 2 y
#   13 caracteres.
##############################################

#DEFINIMOS VARIABLES COMO LOCAL
my ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,@matriz);

@matriz=("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","0","1","2","3","4","5","6","7","8","9");

&generando;

#VARIABLE 1
foreach $var1(@matriz)
{

#VARIABLE 2
      foreach $var2(@matriz)
      {
if ($longitud == 2)
         {
         print DICC $pref,$var1,$var2,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 3     
      foreach $var3(@matriz)
      {
         if ($longitud == 3)
         {
         print DICC $pref,$var1,$var2,$var3,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 4     
      foreach $var4(@matriz)
      {
         if ($longitud == 4)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 5
      foreach $var5(@matriz)
      {
         if ($longitud == 5)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 6     
      foreach $var6(@matriz)
      {
         if ($longitud == 6)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 7     
      foreach $var7(@matriz)
      {
         if ($longitud == 7)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 8     
      foreach $var8(@matriz)
      {
         if ($longitud == 8)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 9     
      foreach $var9(@matriz)
      {
         if ($longitud == 9)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 10     
      foreach $var10(@matriz)
      {
         if ($longitud == 10)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 11     
      foreach $var11(@matriz)
      {
         if ($longitud == 11)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 12     
      foreach $var12(@matriz)
      {
         if ($longitud == 12)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 13     
      foreach $var13(@matriz)
      {
         if ($longitud == 13)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,$suf;
         print DICC "\n";
         next;
         }

      } #BUCLE 13
      } #BUCLE 12
      } #BUCLE 11
      } #BUCLE 10
      } #BUCLE 9
      } #BUCLE 8
      } #BUCLE 7
      } #BUCLE 6
      } #BUCLE 5
      } #BUCLE 4
      } #BUCLE 3
      } #BUCLE 2

} #BUCLE 1

&generado;

} #SUB

####################################################################################################################
####################################### SUBRUTINA let_may_num ######################################################

sub let_may_num
{
##############################################
#   Genera combinaciones de letras MAYUSCULAS
#   y numeros (en ese orden) de entre 2 y
#   13 caracteres.
##############################################

#DEFINIMOS VARIABLES COMO LOCAL
my ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,@matriz);

@matriz=("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","0","1","2","3","4","5","6","7","8","9");

&generando;

#VARIABLE 1
foreach $var1(@matriz)
{

#VARIABLE 2
      foreach $var2(@matriz)
      {
if ($longitud == 2)
         {
         print DICC $pref,$var1,$var2,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 3     
      foreach $var3(@matriz)
      {
         if ($longitud == 3)
         {
         print DICC $pref,$var1,$var2,$var3,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 4     
      foreach $var4(@matriz)
      {
         if ($longitud == 4)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 5
      foreach $var5(@matriz)
      {
         if ($longitud == 5)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 6     
      foreach $var6(@matriz)
      {
         if ($longitud == 6)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 7     
      foreach $var7(@matriz)
      {
         if ($longitud == 7)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 8     
      foreach $var8(@matriz)
      {
         if ($longitud == 8)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 9     
      foreach $var9(@matriz)
      {
         if ($longitud == 9)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 10
      foreach $var10(@matriz)
      {
         if ($longitud == 10)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 11
      foreach $var11(@matriz)
      {
         if ($longitud == 11)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 12
      foreach $var12(@matriz)
      {
         if ($longitud == 12)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$suf;
         print DICC "\n";
         next;
         }
#VARIABLE 13
      foreach $var13(@matriz)
      {
         if ($longitud == 13)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,$suf;
         print DICC "\n";
         next;
         }

      } #BUCLE 13
      } #BUCLE 12
      } #BUCLE 11
      } #BUCLE 10
      } #BUCLE 9
      } #BUCLE 8
      } #BUCLE 7
      } #BUCLE 6
      } #BUCLE 5
      } #BUCLE 4
      } #BUCLE 3
      } #BUCLE 2

} #BUCLE 1

&generado;

} #SUB

################################################################################################################
####################################### SUBRUTINA num ##########################################################

sub num
{

##############################################
#   Genera combinaciones de numeros de entre
#   2 y 13 caracteres.
##############################################

#DEFINIMOS VARIABLES COMO LOCAL
my ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,@matriz);

@matriz=("0","1","2","3","4","5","6","7","8","9");

&generando;

#VARIABLE 1
foreach $var1(@matriz)
{

#VARIABLE 2
      foreach $var2(@matriz)
      {
if ($longitud == 2)
         {
         print DICC $pref,$var1,$var2,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 3     
      foreach $var3(@matriz)
      {
         if ($longitud == 3)
         {
         print DICC $pref,$var1,$var2,$var3,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 4     
      foreach $var4(@matriz)
      {
         if ($longitud == 4)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 5
      foreach $var5(@matriz)
      {
         if ($longitud == 5)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 6     
      foreach $var6(@matriz)
      {
         if ($longitud == 6)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 7     
      foreach $var7(@matriz)
      {
         if ($longitud == 7)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$suf;
         print DICC "\n";
         next;
         }

#VARIABLE 8     
      foreach $var8(@matriz)
      {
         if ($longitud == 8)
         {
         print DICC $pref,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$suf;
         print DICC "\n";
  &
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login


@You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login efectivamente ese mismo que yo había visto. Gracias
@You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login muchas gracias man voy a ver los 2 Script

saludos





Doy el tema por solucionado.
Cualquier cosa MP y vuelvo abrirlo.

Saludos