/usr/lib/nodejs/crc32/bin/runner.js is in node-crc32 0.2.2-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/usr/bin/env node
(function () {
'use strict';
var fs = require('fs'),
path = require('path'),
crc32 = require('../lib/crc32'),
name = (process.argv[1].indexOf(__filename) < 0 ? '' : 'node ') + path.basename(process.argv[1]),
usage = [
'Usage:',
'',
name + ' file1.txt [, file2.txt...]'
].join('\n'),
files;
if (process.argv.length === 2) {
console.log(usage);
return;
}
// get just the files
files = process.argv.slice(2);
files.forEach(function (file) {
var data;
try {
data = fs.readFileSync(file);
console.log(crc32(data));
} catch (e) {
console.error('Error reading file:', file);
}
});
}());
|