from http://reaver-wps-fork.googlecode.com/svn/