Test if a URL uses Node.js
dotheyusenode.herokuapp.com
dotheyusenode.herokuapp.com
var frameworks = [
{name: 'express.js', s: "express", h: 'x-powered-by'},
{name: 'koa.js', s: 'koa', h: 'x-powered-by'},
{name: 'sails.js', s: "sails", h: 'x-powered-by'},
{name: 'ecstatic', s: 'ecstatic', h: 'server'},
{name: 'flatiron', s: 'flatiron', h: 'x-powered-by'}
]
All in all, this should prove relatively inaccurate. A vanilla http server from node sets neither server nor x-powered-by headers. Many frameworks don't set them, either (Walmart's hapi, PayPal's krakenjs, etc).Fun toy project but if you're really interesting in fingerprinting, check out the OWASP entry on the subject[1].
[0]: https://github.com/dotheyusenode/dotheyusenode/blob/ea235619...
[1]: https://www.owasp.org/index.php/Testing_for_Web_Application_...
[1] http://stackoverflow.com/questions/5867199/cant-get-rid-of-h...
I thought you need a framework (like Express.js) and then to not have turned off the header.
It also tries to read through the Javascript served up to see if it uses browserify. https://github.com/dotheyusenode/dotheyusenode/blob/master/c...
But yes it is a glorified `curl -I www.foo.com | grep -i 'x-powered-by` UI
You probably might want to stick "-s" in there too; silence the transfer statistics which curl (annoyingly) adds when output is piped / redirected.
Yeah I saw (I had a browse through your source after your previous post).
As a side note, I was impressed with just how readable your code was (even for someone like myself with very poor Javascript skills). I can't comment on how much credit node.js deserves for that, but I've seen people turn even the most readable of languages into line noise in the past. So it's always a pleasure to read code that doesn't require lines of comments to explain their function.
"Maybe, but we cannot tell"
You can simply add ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 to the URI of most PHP-sites and the server will respond with the PHP-credits [0].
[0]: http://thepiratebay.se/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C1...
And also, yes.. it checks headers (just threw up an Express project and got this: http://i.imgur.com/xpyfv0C.png)
I win!