I performed a packet capture to discover that one of my devices are communicating with a certain server using digest access authentication.I extracted all the information from the packet capture that I could, and I'm hoping to be able to crack the password.

It looks to me as I have all the value that I need except for the password, so I figured it would be possible to perform a brute force attack and check the brute response against the real response.

I've created a script using php, which I'm running in a shell currently trying to crack the password, but I have no idea how long the password is, so I don't know if it's working until I find the password.So while I'm spending my days trying to crack this, I figured I should come and ask some hackers who actually know what they're talking about.

So I would highly appreciate it if someone could tell me whether I'm on the right lines to cracking this password, and if not, what I can do to fix it.

Thanks for all your help!

Here is the script i'm using to try and crack the password (please note, it's not all my work, I grabbed a permulation script off the internet to save time).