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

A script for downloading browser files, Re: [?]Are Realtek Audio Drivers for Linux available for use



On Sat 13 Mar 2021 at 09:26:32 (+0530), Susmita/Rajib wrote:
> On 13/03/2021, David Wright wrote:
> >     ...		...	[snipped]	...		...	[snipped]	...		...
> > I (≠ OP) don't use pulseaudio as a matter of course. It's meant to
> > give benefits, but can add undesired complexity. So I generally
> > stick with ALSA.
> ...		...	[snipped]	...		...	[snipped]	...		...
> 
> It's nice to hear from you, Mr. Wright. I remember your support.
> 
> > Most of the time, this doesn't matter, as I have developed several
> > techniques over the years for capturing Transport Stream files from
> > the cache, and assembling them into seamless live video, and even
> > slurping files out of the browser's /proc/<PID>/fd thingies when
> > youtube_dl fails to download a video.

I was asked to share this technique of stealing files from the FF
browser's cache, so I've attached the script that I use.

I normally browse sites as a different user (named flash for
historical reasons), so a typical invocation command line looks like:

$ sudo -u flash /home/flash/bin/steal-from-cache.sh /home/flash/.cache/mozilla/firefox/jzq80501.default/cache2/entries/ /tmp/.0flashcache

The directories firefox/jzq80501.default/ will obviously need
adjustment. In my own case, even */*/ would suffice, as the flash
"user" only runs one browser in one profile.

There are several idiosyncrasies:

 The script sets file permissions to world-writeable so that I can
 steal the swag from user flash.

 The filenames are formatted to be readable but short.

 If you delete the file that stops it (Target/0), it only actually
 stops when the next file triggers.

 The program chatters as it captures files, so that you know whether
 at least your end of the process is working.

 It can sometimes capture and timestamp files in the wrong order
 (particularly when starting), or copy duplicates, so the internal
 times should always be used, where available, for assembling a
 set of files.

Finally, you might not capture much if you don't have this in your
magic file:

# MPEG Transport Stream (MPEG-2 Part 1) and perhaps others

0		string	G
>0xBC		string	G
>>0x178		string	G
>>>0x234	string	G
>>>>0x2F0	string	G
>>>>>0x3AC	string	G
>>>>>>0x468	string	G	TS transport stream

Cheers,
David.

Attachment: steal-from-cache.sh
Description: Bourne shell script


Reply to: