added attack.js and updated index.html to include attack.js