I mean if you wrote a tool to DOS 911 and distributed the link that would install/trigger it I would think you guilty of attacking 911 even if your computer was not involved.
I would be surprised if the courts consider the fact it was written in javascript or the distribution was twitter a factor.
I hope he is not sent to prison! I don't think it would benefit anyone. Doesn't sounds like he is in need of rehabilitation.
And the prosecution will argue that the very action of writing a piece of software that targets a critical infrastructure is proof of in itself of criminal intention.
It will be up to the judge, but hopefully he will be lenient.
This should serve as a warning for 2 things for you younger cats out there:
1. Learn how to disclose responsibly. Use proper channels for disclosing vulnerabilities and don't post exploits online like that (only after you have made contact, reported it and discussed a reasonable time table for patching or not at all). Or know the risk of full disclosure and go with that, but still never post a exploit like that online like that.
2. Any idea of a joke that involves the authorities should trigger a "Yeah, authorities are not well known for their sense of humor. They tend to not be amused" moment.
Edit: The attack against 911 was in the code itself and that argument won't stand a second in Court.
Be smart, stay safe, happy hacking!
Damn kids, they're all alike ...