Black Rebel Motorcycle Club’s Howl and the Sony Rootkit

BRMC’s Howl is one of my favorite albums. I listen to it all the time. Mostly for the song “Ain’t No Easy Way Out”. I’m a sucker for acoustic rock songs, though I love the whole album. But I’d never recommend the album to any of my friends. Why? It could damage your computer.

Sony, in their never ending quest to punish their customers, put an auto-installing root kit on the CD. If you purchase the CD and listen to it on your computer the root kit will silently will install itself, phone home to Sony, hide all files that begin with ‘$sys$’, as well as cause occasional crashes and lockups. Attempts to remove the rootkit will disable your cdrom.

For more information check out this article. There was a class-action lawsuit against Sony because of the damage caused by the rootkit that was settled in 2005. But there’s still a ton of these CDs floating around out there so be careful.

But there’s hope! Now thanks to Amazon I can finally recommend this album to friends as a mp3 download. I recommend you give it a listen.

xorg.conf for IBM ThinkPad 1171 iseries

I’ve been setting up an old IBM laptop for my brother write papers and play freeCiv on. The Windows XP installation that was previously on the laptop had no problem displaying 1024×768 @ 60Hz, (and didn’t do much else, but that’s not what this article is about.) Once I installed Ubuntu the laptop would only display a small box at 800×600.

I spent a lot of time searching on Google for the magic line that would make the X server recognize this laptop monitor. There were a few other people on the internet that had posted questions about this, but there was either no answer or even more frustrating they had posted to their own questions “I figured it out” without any explanation. I knew it was possible, but I was just going to have to figure it out on my own. I had learned a few things during my search and this is how I finally got it working:

The first thing I did was back up my original xorg.conf by dropping into the terminal and typing this:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

Then I used gtf to generate a the code needed to tell X server to use 1024×768 resolution with a refresh rate of 60Hz:

gtf 1024 768 60

This gave me the code:

# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
  Modeline "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync

which I pasted into my /etc/X11/xorg.conf under the “Monitor” section

Under the “Monitor” section I also pasted

 Option "PreferredMode" "1024x768_60"

I checked the log file in /var/log/Xorg.0.log and among the other information was the error “hsync out of range”. What I also noticed was that it was unable to determine the monitor type and was using defaults for the monitor hsync and vrefresh values.

The solution was to hard code hsync and vrefresh values that were outside the default range but that didn’t break X server and allowed for 1024×768 resolution. I did brake X server a few times trying to get the values right, but was finally able to boot into 1024×768 full screen.

Below is the xorg.conf that worked for me with the IBM ThinkPad iseries 1171

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/X11/misc"
	#FontPath     "/usr/share/fonts/X11/cyrillic"
	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/Type1"
	FontPath     "/usr/share/fonts/X11/100dpi"
	FontPath     "/usr/share/fonts/X11/75dpi"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load  "glx"
	Load  "record"
	Load  "dri2"
	Load  "dri"
	Load  "extmod"
	Load  "dbe"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	Horizsync 47-48
	Vertrefresh 60
	# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
	Modeline "1024x768_60"  64.11  1024 1080 1184 1344  768 769 772 795  +HSync +Vsync
	Option "PreferredMode" "1024x768_60"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "AccelMethod"        	# []
        #Option     "SWcursor"           	# []
        #Option     "PciRetry"           	# []
        #Option     "NoAccel"            	# []
        #Option     "SetMClk"            	#
        #Option     "MUXThreshold"       	# 
        #Option     "ShadowFB"           	# []
        #Option     "Rotate"             	# []
        #Option     "VideoKey"           	# 
        #Option     "NoMMIO"             	# []
        #Option     "NoPciBurst"         	# []
        #Option     "MMIOonly"           	# []
        #Option     "CyberShadow"        	# []
        #Option     "CyberStretch"       	# []
        #Option     "XvHsync"            	# 
        #Option     "XvVsync"            	# 
        #Option     "XvBskew"            	# 
        #Option     "XvRskew"            	# 
        #Option     "FpDelay"            	# 
        #Option     "Display1400"        	# []
        #Option     "Display"            	# []
        #Option     "GammaBrightness"    	# []
        #Option     "TVChipset"          	# []
        #Option     "TVSignal"           	# 
	Identifier  "Card0"
	Driver      "trident"
	VendorName  "Trident Microsystems"
	BoardName   "CyberBlade/i1"
	BusID       "PCI:1:0:0"
	Option      "CacheLines" "768"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
		Modes "1024x768_60"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
		Modes "1024x768_60"
	EndSubSection
EndSection

Converting arrays, structures, queries, and components to XML in Coldfusion

Back in 2008 I needed a way to convert mixed CF data into XML documents. I had seen Ray Camden’s “toXML” script, but the functionality was too limited for me. I had to write my own from scratch that not only gave me full control over the creation of the XML document, but also allowed me to send in all of the Coldfusion datatypes, including cfc components. The results was AnythingToXML.

Example Code:






#myXML#

The results would look something like:



    Doll
    $10.00


    Game
    $16.00


    Puzzle
    $12.00


If you structure your data and then pass it to AnythingToXML along with the optional Root Node name and optional list of XML attributes. AnythingToXML will convert your data to a complex and well-formatted XML documents. It will accept any combination of Arrays, Queries, Structures, Objects, and Simple Types as input.

Future upgrades include adding schema and namespace support.

You can download AnythingToXML Here
More Examples of using AnythingToXML are Here

WordPress Source Code Syntax Highlighting for Coldfusion

If I’m going to blog about code, I need a good syntax highlighter for WordPress. Searching through the many plug-ins available its obvious that there are really only two choices: Plugins that use Google’s Prettify and Plug-ins that use GeSHi.

I first tried the “Google Syntax Highlighter for WordPress” plug-in only to find that it doesn’t do Coldfusion. I downloaded someone’s plug-in for Google’s plug-in that would do Coldfusion Syntax highlighting only to have it start breaking the page layout. There was also a noticable slow down in the page loading. I gave up after spending my morning trying to get this to work.

The next plug-in I tried was “WP-Syntax” which is based on GeSHi. Not only did it support Coldfusion right out of the box, but it worked perfectly the first time I used it! If anyone else needs Coldfusion Source Code Syntax Highlighting for WordPress I highly recommend checking out the “Wp-Syntax” plug-in.

Example:
(Code box begins with <pre lang=”cfm”>)


The other plug-in you’ll probably need is the “Raw-HTML” plug-in. This will help keep WordPress from being helpful and scrambling up your code. Unfortunately this doesn’t solve the issue of switching between the HTML tab to the Visual tab. If you do that WordPress will still eat your code.

Hello World!

I’m a web developer and musician. In this industry it seem like most web developers are. I could get full band together with my co-workers.

I program mostly in PHP and Coldfusion. I dabble in C++, Linux, & Music Production.

After much prodding from RabidGadfly and Kristian Hermansen I’ve started this blog to record all the junk thats floating around in my head. I’m no expert, but its possible that some of the things I’ve learned and resources I’ve found could be useful to others.

Besides: everyone else and their grandma has a blog so its time I have one too.

Cranston Bones

It was a Friday and I was spending my lunch break walking in the back parking lot of the Citizen’s bank building. There the heavy rains had washed out one of the embankments into the parking lot. I was kicking stones into the little stream that runs in the ditch nearby to kill the time. I was pretty useless at work; It was one week exactly before my last day on the job. I was just watching the time tick down until I was free from the office forever.

Finally I decided I should head back to the office. On my way back across the washout I kicked something that looked like a stone or stick, but when I kicked it some of the dirt fell off. It was a bone; A big bone. It looked too big to be a deer; it really looked… human.

bone

I thought that I should probably call the cops, human bones: that’s their department. But this was a crazy thing and I didn’t want to get involved. If it was just an old animal bone I’d feel very foolish calling the cops down here. So instead I called my co worker for a second opinion.

She said to definitely call the cops.
Damn.

I argued that it most likely wasn’t a human bone and I’d feel silly if I got the police to come down here for something stupid. They’re pretty busy. After some time she suggested that I walk next door, to the the fire department, and get a firefighter to look at it. They might know what human bones look like and then they can call the cops. I just wanted a second opinion after all. I took a picture of it with my cellphone and, knowing full well that human bones are not the Fire Department’s department, I headed next door to the fire department.

My lunch break headed into its second hour.

I walked through the fire department’s door and into a dark hall. I heard someone call “hello?” and turned the corner to see a dozen men watching TV. I said hi to all the fire fighters and showed them all the picture on my cell phone. They said it definitely looked human so one of them called the cops.

I hung out with a friendly EMT until the cops showed up.

First the Sargent showed up. Then a regular patrol man. I showed them the pic and they wanted to go to the scene. The regular cop offered to give me a ride in his cruiser which I accepted, “Cool I’m gonna ride in a police car” I thought to myself. He opened the back door to the cop car and said that he to pat me down before I could get in the back of the car.

I was patted down and then got into the backseat, behind the barrier. I was getting that irrational fear of cops thing pretty strong right about this time. The car started to move and the officer got on his radio:

“This is officer ____ en route from fire station 4 transporting adult white male to Davol parking lot.”

I was nervous.

We drove back behind the building to the corner of the parking lot and the officer let me out of the car. The few Citizen Bank employees that were nearby starred at me.

I showed the Sargent and the officer the big bone.
“That looks human” they said
“Were there anymore?” one asked. And before I could answer the other one said “Hey there’s another one -and its even bigger!”

It was big. And then we noticed that there were bones everywhere. I had been walking all over bones for the previous hour and just hadn’t noticed a thing.

Image009

The Sargent couldn’t get Crime Scene on the phone. He called repeatedly until finally he gave up and let his phone rest. I stood back and tried to take pictures with my cell phone. The younger officer noticed me doing this and asked me to stop.

They asked me for a witness statement and all my information. Afterwards the Sargent said. “Why don’t you stick around for a bit.”

That didn’t help my irrational nervousness. My heart was beating faster. I called my boss, not just to tell her where I was, but also maybe it could turn into an excuse to leave. She didn’t answer. I left a voicemail saying that I was hanging out with the police in the back parking lot.

My lunch break stretched on.

Eventually the Crime Scene Investigation van showed up after about an hour and then things really got down to business. They took a lot of photos and then pulled the big bone out of the ground. It was obviously a femur. You could tell from the ball joint at the end.

Image001 (1)

I didn’t just find one big bone. Now I was at a crime scene. Any fun there may have been in my exciting lunch break was gone and now this was s erious business. I really wanted to leave the scene now.

I called my boss again, but still no answer. I called my co worker, but she didn’t pick up either.

Then I saw my co worker. She was walking through the parking lot and bringing me a glass of water. She asked me if everything was ok and if I needed a drink. It was hot out. I was so happy to see a familiar face.

This was it; It was time to make my escape.

I asked the officers nicely if I could leave. I said “Well its been really interesting watching you guys work, but I’d like to sit down. Its hot out here. If you don’t mind I’d really like to go back inside”

The officers looked at each other for a moment in some secret cop-signal. Then the Sargent spoke.
He said “Are you just going to be inside?”
“Yes sir”
“And are we going to be able to get in contact with you?”
“Yes sir”
“Yea you can go”

I walked away. Fast, but not so fast as to look suspicious.

Inside I was bombarded with questions and people. I showed them all the bone picture on my phone. Then we went out on the roof and watched. By then the whole area was taped off with yellow crime tape and there were more cops and men with ties who were not in uniform. By the time I left channel 10 was there filming for the 6 O’clock news.

Image002

Later on it occurred to me that I still felt a little odd about kicking someone’s bones around. My apologies, sir, I did not realize that it was your leg.

Update: Read the links for more bone news!

http://www.projo.com/ri/cranston/content/projo_20060630_cr30dig.1924e23.html
http://www.projo.com/westbay/content/projo_20060721_21find.164cc73.html