-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (32 loc) · 714 Bytes
/
index.js
File metadata and controls
34 lines (32 loc) · 714 Bytes
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
import zerxes from './src/zerxes.js';
import yargs from 'yargs';
const argv = yargs(process.argv.slice(2))
.option('in', {
describe: 'input file',
type: 'string',
demandOption: true
})
.option('out', {
describe: 'output file',
type: 'string',
demandOption: true
})
.option('maxHops', {
describe: 'maximum valid redirect hop count',
type: 'number'
})
.option('concurrency', {
describe: 'maximum concurrent tests',
type: 'number'
})
.help()
.argv;
await zerxes(Object.assign(
{},
argv,
{
err: console.log,
testCaseComplete: (url, success) => console.log(`${!!success ? 'PASS' : 'FAIL'} ${url}`)
}
)).then(console.log);