« February 2008 | Main | April 2008 »

March 25, 2008

Hidden Linux : Doing the splits


I've recently been converting a bunch of old spoken-word cassette tapes to digital format. The Audacity audio editor (also available for Windows and Mac users) is the ideal tool. It's built-in effects -- which include normalising and noise removal -- make it even more useful, and it can save files in a variety of formats including WAV, AIFF, FLAC, OGG and MP3. But there's one trick it can't handle...

At the end of my transfer sessions I had a number of very large MP3 files. These are a nuisance because, unless you open them back into an audio editor like Audacity, it's hard to find your way around them. On many portable MP3 players, switch off halfway through a 45 minute track and you're taken back to the start again when you switch back on. What I needed was a way of splitting these large tracks into convenient 5-minute blocks, rather in the manner of commercial audiobooks.

Linux to the rescue!

mp3splt does just that. It's a utility for splitting MP3 and OGG files without decoding. Here's what its manual entrys says...

mp3splt is a free command-line utility that allows you to split mp3 and ogg files from a begin time to an end time, without need of decoding and re-encoding. It’s useful to split large mp3/ogg to make smaller files or to split entire albums to obtain original tracks.

If you are splitting an album you can get split points and filenames automatically from Freedb.org server on internet or from a local.XMCD (.CDDB)or.CUEfile (see -c option), with the possibility to adjust them automatically with silence detection (see -a option).

You can also try to split files automatically with silence detection (see -s option), or by a fixed time length (see -t option)


mp3splt also has a graphical interface called mp3splt-gtk, but I just knocked up a quick batch file to do what I wanted:

#!/bin/bash
#MP3 Splitter

START_TRACK="01"
TITLE="Album_Title"
OUTPUT_DIR="splits"

TRACK_TITLE=""
TRACKNUM=$START_TRACK

for I in *.mp3
do
echo
echo "Splitting track " "$I"

if test $TRACKNUM -lt "10"; then
case $TRACKNUM in
1) TRACKNUM=01;;
2) TRACKNUM=02;;
3) TRACKNUM=03;;
4) TRACKNUM=04;;
5) TRACKNUM=05;;
6) TRACKNUM=06;;
7) TRACKNUM=07;;
8) TRACKNUM=08;;
9) TRACKNUM=09;;
esac
fi

TRACK_TITLE=$TITLE"-"$TRACKNUM
echo $TRACK_TITLE

#mp3splt variables:
# -t = time interval to split tracks into (5.00 = f minutes)
# -f = use MP3 frame mode
# -a = Auto-adjust mode. Use silence detection to auto-adjust splitpoints.
# -n = No Tag. Doesn't write ID3 or Vorbis comment in outputfile. # -d = output directory (created if not present)
# -o = output file ("@n*" = incrementing track number)
mp3splt -t 5.00 "$I" -f -a -n -d "$OUTPUT_DIR" -o "$TRACK_TITLE"-@n*
TRACKNUM=`expr $TRACKNUM + 1`
done

echo
echo "MP3 Split Done!"
echo " " "$TRACKNUM" " tracks split"

Simply copy it into the folder containing your large MP3s, set TITLE= to whatever you like and run it. It's non-destructive. Output files are written to a newly created sub-folder called "splits".



<--Previous Hidden Linux            Next Hidden Linux -->

March 19, 2008

Use Linux to hack any Windows PC in seconds!

It's received little publicity here, but a fortnight ago the Melbourne Age reported that a Kiwi had released a tool that can hack any Windows PC in seconds. Security consultant Adam Boileau says the tool -- called winlockpwn and available from his website -- can "unlock locked Windows machines or login without a password ... merely by plugging in your Firewire cable and running a command."

I've not yet had a chance to try it but I'm interested in hearing from readers who have. You'll need: a PC running Linux, a firewire cable, a Windows target machine and a copy of Boileau's Python script winlockpwn. (And, naturally, you should have proper legal access to the target machine!)

Three days after publication in The Age, Boileau wrote that his website -- www.storm.net.nz -- had had three-quarters of a million hits, with downloaders reporting success against Vista and even a laptop that didn't even have a built-in firewire port.

Curiously, the burghers of our anti-hacking legislation have been silent about winlockpwn. Technically, the propagation of hacking tools is illegal. But perhaps they -- like the rest of the local media -- haven't noticed it yet.

Also curiously silent are Microsoft. None of the reports I've seen so far have carried any comment from the hackee, even though Boileau says he first informed them of the vulnerability in 2006.


March 12, 2008

Hidden Linux : Fun with ISO images


ISO image files (*.iso) are useful things. They were originally developed as a standard for storing data on CD-ROM, and hold not just files but also all their associated data structures as well -- things like directories, file attributes and boot code - which geeks call 'metadata'.

ISO files are often used for backups, though people are more familiar with them as being an intermediary stage when duplicating DVDs. And most people think that to get at their contents you need to 'upack' them somewhere -- onto a hard drive or optical disc. But under Linux you can simply mount them on your operating system.

Suppose I have an ISO image called bachups.iso from which I want to extract a single file. To look at it, I first need to create a mount point on my system:

sudo mkdir /mnt/test

This creates a new directory under /mnt called /test.
(Non-Ubuntu/Debian users may not need the sudo command.)


Then I mount the image using the -o (options) and -t (filesystem type) switches:

sudo mount -o loop -t iso9660 backups.iso  /mnt/test


And that's it. I can now access the image with any of my normal tools simply by pointing to /mnt/test. Finding that single file in an enormous backup set becomes a piece of cake.

But it goes further than that. 'Normal tools' includes DVD players. That means if backups.iso was one of those intermediary DVD files, it can even be played! All you need do in VLC or Kaffeine, for example, is choose File / Open Directory, point to /mnt/test and click Play.

On really large backups -- or with operating systems like Windows that max out at a file size of 1 GB -- you'll find ISOs get split into a series of suffixes such as backups.i00, backups.i01, backups.i02 ... To use these, simply mount the .i00 file and the system will handle the rest.




<--Previous Hidden Linux        Next Hidden Linux -->


 

March 7, 2008

Cult of the Dead Cow returns with Goolag Scan

Ten years ago the hacking group Cult of the Dead Cow caused consternation with their release of Back Orifice -- a simple tool that enabled script kiddies to take remote control of other peoples Windows PCs. This week they're back, with a tool that automates Google searches to find website vulnerabilities and sensitive information.

Goolag Scan (last time I tried, the site was down) is a tool that allows unskilled users to search under catagories such as "Files containg juicy information" and "Vulnerable servers", and returns a list of links that can be opened in a browser. You can check specific sites or entire top-level domains such as all those ending in ".nz".

While it's causing a bit of a stink, there's nothing particularly new in it. The brilliant johnny.ihackstuff site has been a pioneer of Google Hacking for some years now. They even coined the term "googledorks" to describe inept or foolish website administrators, and their Google Hacking Database is always compelling reading.

According to CDC spokesperson Oxblood Ruffin, "We are releasing gS to enable everyone -- whether they're private users, enterprise, or government -- to audit their own websites and see if their pants are hanging down. And if they are, then they can correct these problems." But a couple of cautions might be in order before you rush off and download it.

Use Goolag Scan too much and Google may become suspicious and block your IP address, and I simply don't know whether such a tool is even legal here. Its dual use -- as a hacking tool or a quick way for webmasters to check site security -- means it could fall foul of some of the vaguer anti-hacking provisions of the Crimes Amendment No 6 Bill.

Heise Security have a couple of good articles on its potential legality in the UK and Europe (here and here) and conclude "Heise Online feels unable to test Goolag Scan for ourselves, or indeed advocate its use within the jurisdiction of English law." Be warned!


March 4, 2008

Shock! Horror! Internet not so risky!

Who'd have thought it? Apparently the internet's not the paedophile paradise some would have us believe. According to a report entitled Online "Predators" and Their Victims -- Myths, Realities and Implications for Prevention and Treatment, media stories about predators who use the internet to gain access to young victims are gross exaggerations.
    One of the report's authours, Janis Wolak -- a sociologist at the Crimes against Children Research Center at the University of New Hampshire in Durham in the US -- says, "There's been some overreaction to the new technology, especially when it comes to the danger that strangers represent... Actually, internet-related sex crimes are a pretty small proportion of sex crimes that adolescents suffer."

Among the findings:
  • Posting personal information online does not, by itself, appear to be a particularly risky behavior.
  • Social networking sites such as MySpace do not appear to have increased the risk of victimization by online molesters.
  • Girls are more vulnerable, as are boys who are gay or questioning.
  • Online child molesters are generally not pedophiles.
  • Online child molesters are rarely violent.
  • Sex crimes against youths have not increased. (In fact sex assaults on teens fell 52 percent from 1993 to 2005, according to the US Justice Department.)
Among the reccomendations:
  • Avoid descriptions of the problem that characterize victims as young children or emphasize violence and deception.
  • Focus prevention efforts more on adolescents and less on parents.
  • Focus prevention more on interactive aspects of internet use and less on posting personal information.
  • Develop targeted prevention approaches for the most at-risk youth populations.


Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.