Re: how to capture flash, etc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2012 at 10:18 PM, Michael Cronenworth <mike@xxxxxxxxxx> wrote:
> Adobe obfuscated the /tmp file method several updates ago. The flash
> plugin still creates a /tmp file, but it immediately removes the file
> link causing any "ls /tmp" calls to not see a file. You can still get
> the file data through /proc.
>
> $ ps -ef | grep plugin
> # copy the PID of flash ($PID)
> $ ls -l /proc/$PID/fd
> # find the /tmp/flashXXXXXX file symlink ($FD)
> $ cp -p /proc/$PID/fd/$FD /home/foo/flash.flv

I use this shell function to play it with mplayer:

function play_flash() {
    for idx in $(pgrep -u $USER -f 'flashplayer'; pgrep -u $USER midori); do
	echo "Browser:" $(egrep 'Name:' /proc/${idx}/status| cut -f 2) "PID:" $idx
	echo -n "        FDs:"

	for fd in $(lsof -p $idx -F fn|egrep --text -B1 '/tmp/Flash'| egrep '^f'); do
	    echo -n "  ${fd:1}"
	done
	echo
	echo
    done

    echo "Select browser (by PID) and file descriptor (space separated)"
    read -p ': ' PID FD
    echo
    if [[ ! -z ${PID} ]]; then
	inhibit-xscreensaver &> /dev/null &
	declare sspid=$!
	mplayer -ontop "$@" /proc/${PID}/fd/${FD}
	kill $sspid && wait
    fi
    unset idx fd
}

This works for Firefox, Google Chrome and Midori. The OP can adapt it
to copy instead of play.

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux