Launch python -m SimpleHTTPServer
in the same directory as test.html
. By default, the port is 8000.
Then launch phantomJS like this: phantomjs test.js http://localhost:8000/test.html
vagrant@precise64:~$ pjs test.js http://localhost:8000/test.html
Received an alert: xss
opened web page successfully!
Received an alert: clicked xss link
^C