sudo command with password

Hello everybody,
Say I forgot my root password (shit happens, no?) and I'd like to brutally try 100 possibilities to delete a file using sudo. How can I make a script that tries all the passwords?
The following doesn't work. Do you have a clue?

foo:~$ cat test
sudo rm dummy <<< 'password'
echo 'password' | sudo rm dummy
foo:~$ bash test
Password:
Password:
foo:~$

Thanks for your help.
Santiago

Well, there's a tool called "John The Ripper", or JTR for short, that can be used to identify weak passwords. However, it requires read access to the password file. If you require going through a program to do what you're trying to do, for ethical reasons, we cannot help.

If you need to recover your system from password lost, you must have physical access to the machine and you can boot off a recovery CD/DVD. Google for "System Rescue linux" or something.