#!/usr/bin/perl -w # Date wordlist generator by Thyrst' use strict; my $min = shift() || die "No year\n"; my $max = shift() || $min; if ($min =~ /\D/ || $max=~ /\D/) { die "Argument is not number\n"; } elsif ($max>$min) { die "Bad arguments\n"; } my @mons = ("leden", "unor", "brezen", "duben", "kveten", "cerven", "cervenec", "srpen", "zari", "rijen", "listopad", "prosinec", "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"); my $file = $max == $min ? "date_wordlist_$min" : "date_wordlist_$min-$max"; open(FILE, ">$file"); foreach (@mons) { my $mon = $_; foreach (1..31) { print FILE "$_$mon\n"; print FILE "$_.$mon\n"; print FILE "$mon$_\n"; } print FILE "$mon\n"; } foreach ($min<$max,$min++) { my $year = $_; foreach (@mons) { my $mon = $_; foreach (1..31) { print FILE "$_$mon$year\n"; print FILE "$_.$mon$year\n"; print FILE "$mon$_$year\n"; print FILE "$year$_$mon\n"; print FILE "$year$_.$mon\n"; } print FILE "$year$mon\n"; print FILE "$mon$year\n"; } print FILE "$year\n"; } close(FILE); exit;