While none immediately came to mind, there are several, and a quick look at hotscripts.com produced several possibilities. One that looked especially promising was Deadlock (though I have not tried it personally).
There are several such free and commercial apps out there, written in both PHP and perl, and Hotscripts is as good a place as I have found to track them down .
As an additional sugestion, toward providing more of what you "really would like", have you searched for an existing WP plug-in to provide enhanced post protection? A quick look over at The WordPress Codex (Plugins/Restriction) shows lots of possibillities, and several ways to approach the functionality you are looking for.