DOB wordlist generation script

Here is a script on how to make a list of dates between X and Y in the format of DDMMYYYY

Great for bruting.  Nice 8 character numeric.

Source http://adaywithtape.blogspot.com/2011/03/creating-date-wordlist.html

#!/bin/bash
#
#
# Create a wordlist based on dates in the format
# ddmmyyyy
# date doesnt seem to like certain dates before 1940..
# so test as from 1941 ;)
#
# Although the input needs to be yyyy-mm-dd
# the output with the below script will be ddmmyyyy
# Its slow and suppose it would be quicker if it wasnt
# 'teed' to screen, but what else are you gonna stare at..
#
echo "Enter the starting date"
echo "must be in the format yyyy-mm-dd"
(tput bold && tput setaf 1)
read START_DATE
(tput sgr 0)
echo "Enter the ending date"
echo "must be in the format yyyy-mm-dd"
(tput bold && tput setaf 1)
read END_DATE
(tput sgr 0)
# List all dates in between the above dates

echo $START_DATE | tee r_dates.txt
while true
do
START_DATE=$( date +%Y-%m-%d -d "$START_DATE -d 1day" )
echo $START_DATE | tee -a r_dates.txt
if [ "$START_DATE" == "$END_DATE" ]
then
awk -F- '{print $3 $2 $1}' r_dates.txt > datelist.txt
rm r_dates.txt
(tput bold && tput setaf 1)
echo "wordlist 'datelist.txt' created"
(tput sgr 0)
exit
fi
done

WindyCityTech Blogger
windywindycitytech wordpress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s