I highly recommend reading these two papers -- both attacks required a great deal of ingenuity to pull off, especially the second one.
My lame-o half-ass solution: buy a domain name, send out a tweet containing a link to that domain, and forward the domain to that tweet.
Why write a nerdy shell script when you can just throw some money at the problem? ;)
for instance, every tweet contains a url for tweet id 3149892792 (2000 more than the current most recent tweet on the public timeline at the time of this comment). once the system creates a tweet that overshoots the desired id, a new goal id is selected.
eventually, you'll get the right answer, especially if you can tweet a good percentage of tweets for a particular period of time.
1. Use a link with a unique keyword hash (you can check) eg http://bit.ly/hn_comment
2. Take the action, get the link
3. Make that link with the keyword hash
"To much recursion!" would be proper if you were, say, offering a toast on account of having loads of recursion. Like:
The Good King Lisp raised his glass and toasted with the Knights of Lambda, "To much recursion!"