Clone from http://reaver-wps.googlecode.com/svn/trunk/