Sunday, September 28, 2014

Download streamed flash videos from the command line

I have just been looking for ways to download streamed videos into my hard drive so I can watch them later when I'm away from my wifi. With the power of linux I really wanted to find a way to do this in a simple way and ideally from the command line. So that's how I came across this tool called "get-flash-videos" which is a pretty descriptive name for the app.

I've tested it already and it works quite well, but I should note that you shouldn't use this to download anything you are not supposed to download. Just avoid doing anything illegal with this information of course.

Anyway, let's get started on how to install and use this tool.

There is quite a bit of information you can find on how to obtain and how to use this app on the following link --> https://code.google.com/p/get-flash-videos/ ... https://code.google.com/p/get-flash-videos/wiki/Installation

For my own use, I followed the Debian based distro guide which requires you to install

$ sudo apt-get install libwww-mechanize-perl libxml-simple-perl

then use wget to download the .deb file

$ wget http://get-flash-videos.googlecode.com/files/get-flash-videos_1.24-1_all.deb

Lastly, install it via

$ sudo dpkg -i get-flash-videos_1.24-1_all.deb

That's it, as easy as pie...

Now to use this little tool, use the following command to watch a video:

$ get_flash_videos -p http://website.url/video

or alternatively if you want to download the video directly to your hard drive use

$ get_flash_videos "http://website.url/video?f=1&v=1234" 

Enjoy... and if you want something specific for youtube, I've heard that youtube-dl is quite good but I haven't tried it myself yet.

Thursday, September 25, 2014

Shellshock - your bash may be making you vulnerable

Turns out that if you are a Linux or a Mac user you may be vulnerable to remote attacks via your bash shell. To check whether your machine is vulnerable you can use the following command:

$ env x='() { :;}; echo vulnerable' bash -c 'echo hello'

if your terminal returns the message "vulnerable hello" than you are vulnerable and you need to remediate that.

You are safe if the message "bash: warning: x: ignoring function definition attempt bash: error importing function definition for 'x' hello"

To fix your system you can update your bash via the command line by typing:

$ sudo apt-get update && sudo apt-get install --only-upgrade bash

this command will work on any debian based distro, if you are using another distro, I would redirect you to this link for the appropriate command to update your respective bash.