sql signature is a small unix utility and node.js extension that outputs a protocol usage signature given an sql query input. This is useful for sql-injection mitigation using the comparison of a query signature against a known safe sql query signature. for example:

$ echo "SELECT hash FROM users WHERE name='bob'" | sqlsig
dOeaPCP478xqI/Yi+Yaf86llwBLcZvfdkhW1wgZWg6Y=

is the same as

$ echo "SELECT hash FROM users WHERE name='susan'" | sqlsig
dOeaPCP478xqI/Yi+Yaf86llwBLcZvfdkhW1wgZWg6Y=

but different from

$ echo "SELECT hash FROM user WHERE name='bob' OR 'x'='x'" | sqlsig
ihPujMToJxxsA5gipY5NioixzspOa+KwdLqPKNsdzPc=

Try it out yourself! enter in an sql query
do sqlsig

Here's how to use it in node.js

var s= require('sqlsig');
console.log(s.sqlsig("SELECT name FROM users"));


::download unix::download node.js::podcast::