SHARE
TWEET

fg.script

0x783czar Aug 28th, 2015 (edited) 5 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. nc -k -l -U $HOME/test.sock | \
  9.   while read type message; do
  10.     echo "$(echo -n $type | base64 -di -)" "$(echo -n $message | base64 -di -)" >> /tmp/msg
  11.   done &
  12.  
  13. 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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top