Skip to content

Instantly share code, notes, and snippets.

@jawher
Created October 3, 2010 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jawher/608740 to your computer and use it in GitHub Desktop.
Save jawher/608740 to your computer and use it in GitHub Desktop.
#!/bin/bash
PID=`ps x | grep libflashplayer.so | grep -v grep | awk '{print $1}'`
FD=`lsof -p $PID | grep Flash | awk '{print $4}' | sed 's/u$//'`
while IFS=' ' read -ra ADDR; do
for x in "${ADDR[@]}"; do
echo "cp /proc/$PID/fd/$x ~"
done
done <<< "$FD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment