Two Chicago-area sports journalists gathered the tweets directed at them and asked men to read them to their faces. The result went viral.
The measure includes censorship, control of links with foreign media and creates special courts to deal with media crimes.
Journalists fear it could spell the end to any kind of media freedom in Afghanistan.
The BBC’s David Loyn reports from Kabul.