Skip to content

Instantly share code, notes, and snippets.

@tin-z
Created November 30, 2023 09:23
Show Gist options
  • Save tin-z/47a3ad129ba1e04d47b2532adb4894f8 to your computer and use it in GitHub Desktop.
Save tin-z/47a3ad129ba1e04d47b2532adb4894f8 to your computer and use it in GitHub Desktop.
bash alias for msfrpcd autostarter
alias msfrpcd_startdaemon='function _setMsfrpcd(){ if [ "$#" != 2 ]; then echo "[x] Wrong arguments, usage: $0 <ip> <password>"; return; fi; cmd="msfrpcd -a $1 -P $2"; tmp123=`ps aux | grep -e "[0-9] msfrpcd" -e "[0-9] /usr/bin/msfrpcd"`; if [ -z "$tmp123" ]; then nohup bash -c "$cmd" > /tmp/msfrpcd.out & disown; fi; }; _setMsfrpcd'
msfrpcd_startdaemon 127.0.0.1 password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment