Skip to content

Commit

Permalink
Refs #83 Integration tests for inject shell
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia committed Jun 15, 2020
1 parent 7749bb1 commit 9f55595
Show file tree
Hide file tree
Showing 25 changed files with 965 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-macos-2.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-macos-3.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-macos-3.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-macos-3.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-macos-3.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-macos-pypy2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-macos-pypy3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-ubuntu-2.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-ubuntu-3.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-ubuntu-3.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-ubuntu-3.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-x64-ubuntu-3.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
# Tests: Behaviour (Client)
# ------------------------------------------------------------

- name: "[CNC] Inject shell"
shell: bash
run: |
retry() {
_make=${1}
_target=${2}
_host=${3:-localhost}
_port=${4:-4444}
_wait=${5:-5}
_runs=${6:-1}
for n in $(seq ${RETRIES}); do
_port=$(( _port + n ))
echo "[${n}/${RETRIES}] make ${_target} ${_host} ${_port} ${_wait} ${_runs}";
if "${_make}" "${_target}" "TEST_PWNCAT_HOST=${_host}" "TEST_PWNCAT_PORT=${_port}" "TEST_PWNCAT_WAIT=${_wait}" "TEST_PWNCAT_RUNS=${_runs}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make _test-cnc--inject_shell
env:
RETRIES: 5

- name: "[BEHAVIOUR] Client quits correctly 000"
shell: bash
run: |
Expand Down
Loading

0 comments on commit 9f55595

Please sign in to comment.