SHARE
TWEET

bg.script

0x783czar Aug 28th, 2015 (edited) 8 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #
  3.  
  4. # to aid in cleanup when using Ctrl-C to exit strace
  5. trap "pkill -f -x 'nc -k -l -U $HOME/test.sock'; exit" SIGINT
  6.  
  7. # Start listening for notifications
  8. function irc_notify() {
  9.   nc -k -l -U $HOME/test.sock | \
  10.     while read type message; do
  11.       echo "$(echo -n $type | base64 -di -)" "$(echo -n $message | base64 -di -)" >> /tmp/msg
  12.     done
  13. }
  14.  
  15. irc_notify &
  16.  
  17. read
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top