Tue, 12 Sep 2006
Using Apple Products To Remove Apple's DRM
I'm a vocal opponent of any kind of
DRM. But yesterday I discovered a wonderful band named
Made Out Of Babies. I emailed them about buying their music online because I couldn't find it anywhere except through the iTunes Music Store. Sure enough, Neurot Recordings has an exclusive with Apple. So...I signed up for an account and paid them 99 cents to download the first track off their album.
Before I start with the details. I would like you to
download this track for free from my web site. It is in the unrestricted ogg/vorbis format, despite the original format being Apple's "protected mpeg-4". And now...the irony.
I used Apple products to remove the restrictions from Apple's restricted format. Step by step:
- Open iMovie HD and create a new project
- Select the Media window and the Audio tab within that window
- Find your restricted song in the Library section of the top pane
- Drag the song to the bottom of the timeline
- Select the Photos tab within the Media window
- Drag a photo to the top of the timeline
- On the timeline, slide the playhead to the end of the audio waveform and note the length of the song
- Deselect "Ken Burns Effect" in the photo settings and make the length of the photo the length of the song
- Click on the Share menu and select "Share".
- Pull down the tab next to "Compress movie for" and select "Expert Settings"
- Click Share
- Pull down the tab next to "Export" and select "Sound to Wave"
- Click Options
- Pull down the tab next to "Rate" and select "44.100"
- Click OK and click Save
You will now have a DRM free version of the song you purchased from the iTunes Music Store. It will be in the uncompressed WAV format, which you can compress using other non-restricted formats like mp3 or ogg/vorbis.
Granted, this is not a practical implementation for cleaning large amounts of ITMS purchases. Personally I would recommend not buying music through this retailer. Remember though, if you happened to buy some music in that format and would like to share it with a friend, or use it with portable players other than the iPod, this is one solution. The other (admittedly more simple) way is to burn the files to a CD-RW and rip that to another format.
posted at: 18:30 | path:
/hacking |
permanent link to this entry
Mon, 05 Jun 2006
Windows XP Professional Does Not Support RAID-1
Brain explody!
OMG, OMG, OMG, WTF. Okay. Get a grip Lee. It's only software. It's only the
most popular operating system in the universe. There must be a way. And of
course
there is.
Here's the summary of what this guide explains. There are three system files on
a Windows XP Professional system that limit the functionailty of the Disk
Manager Snap-in. They limit this functionality by containing a text string of
"WINNT" or "SERVERNT". The implication here is that a "home" user would never
need a "server" feature like disk mirroring (RAID-1). By changing this string
using a binary editor, this feature of Windows becomes "unlocked". That's
right, this feature is not determined by the programs included in Windows, it
is determined by a very short string of text embedded in those programs. They are
completely capable of doing this feature as shipped but Microsoft has decided
that it is not in your best interest to do this.
Please refer to the brain explody graphic above.
posted at: 00:44 | path:
/hacking |
permanent link to this entry
Tue, 25 Apr 2006
A Supposedly Fun Thing I'll Never Do Again
For all of you readers that have a UNIX type operating system on the public
Intenet with a real IP address, do this for a laugh. Install the
ngrep
package and run:
ngrep -q -t -d <your ethernet device> -W byline . not port 22
Then watch and wait. If you're lucky you should see lots of traffic on udp port
137 and 138. These are
Microsoft
NetBEUI ports. Some of which are
advertisements for various companies that sell "registry cleaning" software.
Hi-larious!
posted at: 11:32 | path:
/hacking |
permanent link to this entry
Mon, 17 Apr 2006
Ipod Hammer
I modified the
mp32ogg script to do ogg->mp3 and renamed it "ipod hammer" since
I changed it quite a lot. This is useful, for example if you have a large
collection of riped music in ogg/vorbis format and would like to share it with
someone who only has an ipod. It's lossy, so sound quality is effected. It is
obviously a band-aid until Apple gets their head out of their ass and listens
to their customers who use a real open source codec.
Download it.
posted at: 13:46 | path:
/hacking |
permanent link to this entry
Fri, 31 Mar 2006
The Happy Hacker Heyboard
I remember a friend of mine mentioning something about ergonimics and how these huge
keyboards with number pads totally break up the flow of mouse/keyboard
transitions. I started really feeling that when I acknowledged the fact that I
spend over 8 hours a day with a keyboard. I splurged and bought a
PFU Systems
Happy Hacker Keyboard. It is waaaayyyy overpriced but here's why it totally
rules.
- I look forward to typing on it. The keys are coated with this rough and
smooth substance that feels totally cool.
- The keys are super soft to the touch but still emit a satisfying clack when
pressed. Like a cross between the 30 pound IBM things from the 80s and a laptop
keyboard. Each key is perfectly even.
- The whole keyboard is less then 12" long. It fits in my messenger bag so I
can take it anywhere I go. It has a USB 2.0 mini cable to regular USB so it'll
work on every single computer worth touching.
- It has DIP switches on the back to flip the functionality of certian keys.
It also can work in "macintosh" mode where it gives you "vol up" "vol down"
"mute" and "eject" keys.
- You can optionally buy a model with blank key tops. This is too l33t for me
so I opted for the "charcoal grey" model, which is so dark you can't really see
the letters on the keys anyway. I'm still trying to figure out the advantage of
blank key tops for anything but typing dvorak.
So yeah, go out there and drop $260 on this shit if you spend more than 4 hours
working with a UNIX shell each day.
posted at: 20:51 | path:
/hacking |
permanent link to this entry
Sat, 04 Mar 2006
Weird Hacker Patches Proprietary Code and Tells All
This is totally bizarre. This guy reverse engineered some CPU detection
code in the Skype binary executable and used a Windows API "feature" to bypass the
CPU check. The end result is some feature that the Skype corporation only
intends for Intel CPUs can run on AMD CPUs too. This is a blatant violation
of the
Skype EULA and this guy will most likely get a cease and desist
from Ebay (who owns Skype). But if you can catch it,
read his expertly written
blow by blow of assembler instructions and how to modify them. Oh yeah, and
like, download the patched binary if you use Skype.
posted at: 22:58 | path:
/hacking |
permanent link to this entry
Thu, 05 Jan 2006
XFree86 FAQ
X used to scare me. I remember how cool it was to read Mac World or some stupid
PC magazine and feel all smart about how to do GUI tricks when I was using
commmercial OSes. Switching to Linux and using X felt all old skool and
entirely uncool without some bloatware like Gnome or KDE installed. Well, well,
I was wrong. X can do crazy shit with nothing more than a tiny window manager
and some
good
reference. See you later lame GUI!
BTW, my current GUI tower of power is fluxbox + mrxvt + fbpager. I adjusted the
~/.fluxbox/keys file to open apps and emulate some Gnome shortcuts I got
accoustomed to. The whole window manager installation (not including X) is
around a meg and runs fine on a Pentium II.
posted at: 15:52 | path:
/hacking |
permanent link to this entry
Wed, 23 Nov 2005
Cheap commercial product uses ext3 filesystem and writes about it!
This is the first time I've Linux spotted something this public in a commodity
commercial product. The
Linksys
NSLU2 is this little device that you plug a
USB disk into one end and a Ethernet cable into the other and it gives you a
web browser interface to configure some "network attached storage". No PC
necessary. The cool part is it
uses
the ext3 filesystem, which is the native
Linux filesystem.
posted at: 19:53 | path:
/hacking |
permanent link to this entry
Tue, 19 Jul 2005
I installed Mediawiki today. It's...different.
Wikipedia is an excellent web site that functions as an encyclopedia that's peer reviewed by everyone on the world wide web. It has a markup language that's not HTML, which up until now I thought was the world wide standard for putting text on the www for end users. I guess I'm wrong.
Mediawiki uses it's own markup language for formatting text, which the backend translates into vaild XHTML so your web browser can display it properly. Personally, I have
a lot of experience with HTML and a little less with XHTML. I memorized the important parts and used it to publish my own writing on the web and get jobs publishing other people's. It isn't that difficult. Yet I have found a lot of people who think it is, which is why I believe the wiki media foundation invented their own markup language.
But I can't help asking, is this markup really that different than HTML? Is it really less complicated?
posted at: 00:19 | path:
/hacking |
permanent link to this entry
Sun, 22 May 2005
Removing Plesk from Hostcentric Self Managed Hosting
There is a company called Hostcentric that offers
some pretty sick deals for dedicated hosting.
But as with anything,
there
is a catch. In my opinion, the biggest catch is their installation of a user friendly control panel for the
entire server called
Plesk. Plesk isn't so much
a control panel as a magical transformation of Linux into a propriatary "hosting platform". It takes over the whole
OS. In fact, Hostcentric
explictly
forbids altering the server in any way outside of installing some userland applications. The operative phrase
the the previous link is "as long as it's compatible with the current OS". One would think this would mean Fedora Core 1 but it doesn't. It means Plesk.
So what's an enterprising hacker to do about this? Well, remove Plesk of course! Easier said than done. Those
sw-soft guys really did a number on Fedora. What follows is the efforts of three people casually exploring the
guts of Plesk for three years and eventually, removing it. Know your enemy, right?
The core of Plesk lives in /usr/local/psa. The PSA stands for Plesk Server Admin. You'll find lots of things strewn about the filesystem with the letters 'psa' tacked onto them. When you look inside /usr/local/psa you'll find something similar to a common UNIX directory structure. That's their ticket, they recreated the parts of the "open" OS it sits on top of and put them in their own obscured location. Plesk does things like logging, database storage and maintaining state in this directory. The short list of what services are dominated is:
Since so many other things depend on this location existing, we'll wait until the very last step to remove it. The first step is to discover what services Plesk has directly modified. The easiest way to do this is with
rpm -qa | grep psa. This will show you all the RPM packages which have been taken over. Kind of a lot. qmail, the MTA has to go. As does the courier imapd and popd daemons. There's a bunch of stuff in /etc/xinetd.d/ that's Plesk-ified. If this isn't a production server it's safe to disable this for now.
I'm going to take this time, before you start hacking to emphasize DO NOT DO THIS ON A PRODUCTION SERVER! and of course the obligitory BACK UP YOUR DATA BEFORE PROCEEDING!. Like the Debian GNU/Linux login message, this mini-howto comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.. I hope I have made this clear enough...let's proceed.
If you have already picked around the Plesk GUI, you might have noticed some weirdnesses with how they define "domains" and "users". I still don't understand most of it but here's the gist. An "FTP User" is someone added to /etc/passwd with a shell of /bin/false and their web root is their home directory. A "Web User" is someone. I have no fucking idea. A "SSH User" Or remote login whatever, is someone who is also added to /etc/passwd with a shell of /bin/bash.
Outside of /usr/local/psa the second most dominated location is /etc/httpd. This is where all the Apache configs reside. While Plesk hasn't modified the Apache binary, they have ruled the config file structure and made it almost impossible to allow you to edit the file by hand. Double plus ungood. Another caveate, which was pretty amusing in retrospect (although not during the 8 fucking hours I spent figuring it out and fixing it) is that Plesk uses suexec for CGIs.
RTFM if you don't know what it is. These Hostcentric servers haven't modified the Apache binary so it's using /var/www as it's suexec document root (the default). Amusingly enough, Plesk is using a
different document root, making it
impossible to execute certian types of CGI programs. It requires recompiling Apache to change this variable and it's doesn't stick across upgrades. Great! suexec is great if you have a huge shared hosting business but anyone spending $59.99 a month for a server isn't doing that. And if you are, you're retarded, you will lose. Moral of the story, don't use suexec.
There's really no simple way around the Apache config part. You have to open up the files in a text editor and delete all the <VirtualHost> definitions you didn't create yourself. The ones you did, you have to save and then modify for your new configuration. This took me tons of trial and error.
DNS is a tricky problem. Most people
don't fully understand DNS or just don't have to think about it that much and don't care. Don't worry, I was one of them too and it took me a weekend to get it. Now I do and it's very simple.
BIND is overly complicated.
djbdns is not. Which one do you think Plesk uses? Why BIND, of course. This is actually kind of unexpected considering they are already using some DJB software, namely qmail. Whatever...If you are already publishing some domains from this box, you aren't fully screwed but it's going to be kind of difficult. You'll have to shut down your DNS server while you transition to djbdns. Fortunately, Mr. Bernstein provides
good documentation on transitioning from BIND to djbdns. Read it, do it, it'll work. This is a simple one to get out of the way and it'll last for the life of the server. Make sure you remove named from the system's boot order so it doesn't turn itself on across reboots. Once you have a stable tinydns/dnscache system you can uninstall BIND.
The last part of Plesk terribleness is MySQL. Fortunately it didn't do anything that bad to MySQL except use it for lots of state information and some user databases. If you already depend on databases created by the GUI,
dump them out of MySQL just to be safe.
Now you should have a very good idea of the depth of this project. The icing on the cake is that Hostcentric's agreement forbids you to update the OS. Fedora Core 1 is
quite old. The whole point of open source software is the freedom to update. My better judgement tells me the lawyers who wrote this agreement have never used a computer for anything more than typing email and surfing pr0n on the web so I can safely ignore them. Our business and theirs do not overlap. No probs. The first concrete step to a Plesk free life is installing
APT, the Advanced Packaging Tool, created by the wonderful
Debian GNU/Linux project and updating your RPM database.
After installing APT, follow the instructions and choose a mirror close to you. Run
apt-get update and make sure it runs without errors. Then run
apt-get dist-upgrade and see how horribly out of date your OS is. Scary, isn't it? Please say no to all of these upgrades, since one of them might be a kernel upgrade and you'll have to reboot. What you can do now, it run
/etc/init.d/psa stop, which will shut down Plesk, whatever that means. Now you are safe to refer to the output of that
rpm -qa | grep psa command and remove and replace the programs. I chose postfix to replace qmail-psa. Everything else I just replaced with their Fedora supplied counterparts. Once all the *-psa packages are removed, run
chkconfig --list and make sure the services you want are in the list and set to on for levels 2, 3, 4 and 5. If they are, run
apt-get dist-upgrade and say yes. You might get some GPG verification errors, which I couldn't get around even though I imported the public key from the Fedora project. I had to edit /etc/apt/apt.conf to disable GPG checking to get the upgrade to complete without errors.
You probably have a new kernel which you should reboot into. This is a pretty critical step, so make sure your bootloader is properly configured. My server was using grub. Verify that /boot/grub/menu.lst is pointing to the current kernel and that the kernel exists at that location. Make sure the default is to boot into that kernel. If you are using lilo, the same should apply. I'm scared of lilo so I'll leave that as an exercise for the reader if you are using that bootloader.
The final step is rebooting.
But wait! There's one last bit of sneakiness I got bit by. Run this
ls -l /sbin/reboot. Depending on your system, you might notice that it's linked to /sbin/halt ! This means if you type
reboot it'll actually shut down the system! Fuck! You can be safe and issue a
shutdown -r now command to properly reboot. If something goes wrong and the system doesn't come back online, you'll have to submit a reboot request to Hostcentric. They were actually pretty good at doing this, with a turn around of about 20 to 30 minutes for me and in both cases their reboot worked where mine didn't.
When your new system is rebooted and running, make sure the services you want are running with
netstat -ltunp and if they aren't, start them with the redhat-centric
service whatever start. If it comes up, use chkconfig to add it to the boot order for runlevels 2, 3, 4 and 5. To be safe you might want to do one last reboot to make sure everything you need comes up automatically. If it does, congratulations! You have a brand new Plesk free Fedora server. Stay tuned for a howto for upgrading to Fedora Core 2.
posted at: 18:09 | path:
/hacking |
permanent link to this entry