|
|
@ -12,3 +12,11 @@ test('reverseShell returns shell code with /host:port variables', t => { |
|
|
|
const returnValue = reverseShell(req); |
|
|
|
t.true(returnValue.indexOf('("foo",bar)') > -1); |
|
|
|
}); |
|
|
|
|
|
|
|
test('reverseShell returns usage if host and port aren\'t set', t => { |
|
|
|
const req = { |
|
|
|
url: '' |
|
|
|
}; |
|
|
|
const returnValue = reverseShell(req); |
|
|
|
t.true(returnValue.indexOf('# Reverse Shell as a Service') === 0); |
|
|
|
}); |
|
|
|