Daily Archives: May 20, 2013

Extract MP3 from SWF files on Linux (Ubuntu)

We will use a tool called swfextract contained on the package swftools, so first we will install it

  1.  
  2. sudo apt-get install swftools
  3.  

Once installed first we will see wich media we can extract from our swf file.

  1.  
  2. rene@rene-desktop:~/Music$ swfextract test.swf
  3. Objects in file test.swf:
  4.  [-i] 5 Shapes: ID(s) 7, 14, 22, 23, 28
  5.  [-j] 16 JPEGs: ID(s) 1-6, 11-13, 16-21, 27
  6.  [-s] 1 Sound: ID(s) 29
  7.  [-F] 1 Font: ID(s) 8
  8.  [-f] 1 Frame: ID(s) 0
  9.  [-m] 1 MP3 Soundstream
  10.  

Then just use the option between brackets and the ID the element you want to extract, in our example we will extract the sound with ID 29, but you can extract also images if you want

  1.  
  2. rene@rene-desktop:~/Music$ swfextract -s 29 test.swf -o test.mp3
  3.  

How to disable directory listing in apache?

First option is to edit the file /etc/apache2/sites-avalible/default (i am using ubuntu), then look for the following lines:

  1.  
  2. <Directory /var/www/>
  3.     Options Indexes FollowSymLinks MultiViews
  4.     AllowOverride None
  5.     Order allow,deny
  6.     allow from all
  7.     # This directive allows us to have apache2’s default start page
  8.     # in /apache2-default/, but still have / go to the right place
  9.     #RedirectMatch ^/$ /apache2-default/
  10. </Directory>
  11.  

And then take out the word Indexes, then your file will look like

  1.  
  2. <Directory /var/www/>
  3.     Options FollowSymLinks MultiViews
  4.     AllowOverride None
  5.     Order allow,deny
  6.     allow from all
  7.     # This directive allows us to have apache2’s default start page
  8.     # in /apache2-default/, but still have / go to the right place
  9.     #RedirectMatch ^/$ /apache2-default/
  10. </Directory>
  11.  

Finally we just reload apache

  1.  
  2. sudo /etc/init.d/apache2 restart
  3.  

If you want to use .htaccess, you have two options:

  1.  

This option will show a forbidden message:

Forbidden

  1.  

empty