May 8 2011

del.icio.us backup script

elderpyre

Wrote a bash script that will download my del.icio.us bookmarks locally, then delete any backups older than 3 days. Going to run it as a cron job. Figured I’d share. :)

#!/bin/bash
 
user='your username'
password='your password'
backupdir='/var/media/backups/delicious/'
 
backupfile='delicious_'$(date --rfc-3339=date)'.xml'
log='/var/log/delicious_backup.log'
old=$(find $backupdir -mtime +3 -type f -iname 'delicious*')
 
#get bookmarks
wget --user=$user --password=$password -O $backupdir$backupfile https://api.del.icio.us/v1/posts/all &>>$log
 
#check to see if backup is a sane size
if [ $(stat -c%s $backupdir$backupfile) -lt 1024 ]; then
     zenity --error --text "Del.icio.us backup is borked!"
else
     #delete backups older than 3 days
     if [ -n "$old" ]; then
          rm $old;
     fi
fi
 
#keep log file size in check. remove entry older than 30 days.
if [ $(stat -c%s $log) -gt 43008 ]; then
     sed -i '1,25d' $log
fi
 
exit 0
Share

Apr 6 2011

Life

elderpyre

Life has been quite the bit of chaos since my last post in September. Had to move from my home at the beginning of November because the owner lost his retirement pension and could no longer afford payments. Stayed with family for a couple months after that due to still being out of work. Got blown off 3 times for a possible position from a Department of Energy employer who shall remain nameless. Blown off for an interview for another position which they hired 2 (!) people to do the same job. And to top it all off, moved to Seattle on the spur of the moment in February for a contractor position with Microsoft.

So hopefully with all this life will begin to stabilize once more. Here’s to hoping at least. :D

Share

Sep 13 2010

Let us count the ways Facebook log in is insecure…

elderpyre

So I was logging into my (much maligned) Faceblag account the other day and I couldn’t remember my password. At first I was greeted by the usual incorrect password screen like so.
Typical wrong password prompt in Faceblag

So I continue entering what I hope will be my password when I am greeted by the following.
Previous password prompt in Faceblag
This just flies in the face of security. What if someone happened to know your email address and was guessing at your password. I know the first thing I would do in their case would be to take said email and password and try to log in to a few dozen or so other popular sites on the net.

This got me wondering what other interesting log in errors I could produce trying to log into Faceblag. I started entering this, that, and the other thing in the password prompt for my account to see what would happen. After about a dozen log in attempts I was finally confronted with a captcha and a prompt stating there had been a high number of unsuccessful log in attempts to my account.
High number of incorrect login attempts to Faceblag

And yet another interesting prompt I got after apparently mistyping my email address into the prompt.
Correcting my Faceblag log in spelling? Really?!

Share

Sep 2 2010

Use Your Power Wisely

elderpyre

Just because you can arrest someone, doesn’t mean you should

Bullethead | Wednesday, July 21, 2010

Time for another rant! Some of you may not realize it but Ol’ Bullethead is moving in a general direction. It may be hard to pick up because, when I get a good question, I like to toss that around and give a good answer. Other months, I might just go it alone. I’m trying to move us in a direction I think is good for us and for those we serve.

A few months back, I wrote a column about change and the importance of becoming experts at our job. Last month, I wrote about the need for ethical leadership and how we’re all leaders in the community and among ourselves as soon as we put our uniforms on. If you go back to the bottom of the Bullethead ammo crate, you’ll find articles about police work being a job for thinking men and women and not knuckle draggers.

Today, I woke up in a pleasant mood. Then my Crackberry exploded. That’s typical, but today one of my many spies sent me an article about cops arresting people for videotaping them while on duty and in public. This particular spy didn’t think the cops should arrest for that. He was exactly right.

I could write volumes on why this is one of the stupidest things I’ve ever heard, but I’ll just touch on the high points. We’re public servants entrusted with awesome power. We have the power to use force, even lethal force. We have the power to take away freedom. We’re allowed to kick down doors in the middle of the night and rush into people’s homes with machine guns. Maybe you non-thinkers don’t realize that all of these things, although necessary when used correctly, are also the things we’ve fought to defend against in every war we’ve ever fought. Don’t think so? Go study some history. You’ll find we were either protecting ourselves or someone else from the very things that police are allowed and expected to do when crooks cross the lines drawn by our society.

When we swear to uphold the Constitution, it’s the whole thing, not just the parts we like. Any cop who whines about the Bill of Rights standing in the way of making arrests should have their door kicked in by masked officers in the middle of the night. How would they like to get beaten until they confess to something? Or jailed without a fair trial? That’s right boys and girls, Ol’ Bullethead just hit a bunch of them—4th, 5th, 6th, 8th and the 14th amendments for good measure. My point: We must operate from within these laws. When we do, why wouldn’t we want it on video?

I wonder if the morons abusing their own laws against wiretapping have thought about dash cams and belt recorders. Maybe they don’t have those in the three states currently going after people for recording the cops (i.e., Maryland, Illinois and Massachusetts), but I’ll bet they do. They’ll say its OK because they’re conducting a criminal investigation. Fair enough, but what about consensual encounters? Oops—didn’t think about that, did you? A consensual encounter isn’t a criminal investigation until we have enough reasonable suspicion to detain someone. If you’re a cop in one of those three states, you’d better not activate your recorder until you have a detention or you might just have to arrest yourself and get a hook that way. Those doing this are claiming both parties must consent or the video and audio is illegal.

What about traffic cameras, license plate readers, helicopter videos and all the other tools police use? Hmm, I guess they didn’t think of that either. Most of those red-light cameras are rolling video, and they snap a still when someone runs the light. Dash cams are rolling all the time and save when activated. The video is usually recoverable, and all sorts of people are getting recorded without consent and without a criminal investigation. How about store surveillance? Are we gonna arrest the store if they catch a cop doing something wrong? Like I said, I could do volumes on this.

What really gets my powder hot is the lack of ethical leadership in the agencies practicing this crap. Good police leaders understand we operate with the consent of the people. We have civilian oversight from elected officials and the courts, but we’re also responsible to the people. Much of what we do is, as the cliché goes, lawful but awful. There’s no nice way to beat someone into cuffs. Welcome it on tape, and go explain it in court. Then we get a more educated public, and we’re transparent to those we serve.

via Use Your Power Wisely – LawOfficer.com.

Share

Aug 15 2010

Beware the Forest’s Mushrooms (NSFW)

elderpyre

Share

Aug 10 2010

Damned Nigerians

elderpyre

Got 2 of my email accounts hacked into this morning. I recovered them pretty quickly, but not before the following was sent out to most of my contacts:

From:
To:
Date: Tue, 10 Aug 2010 13:34:56 +0100
Subject: SAD NEWS!!!!!!!!!!!!!!!!!!!!!!!!!PLS
I’m writing this with tears in my eyes,sorry I did not inform you about our trip.We actually made a quick travel to London and unfortunately attacked and mugged at gun point on the way to our hotel,all cash,credit card and cell phone were taken away from us but luckily we still have our passport with us.

We`ve been to the embassy and the Police here but they’re not helping issues at all and our return flight leaves anytime from now but we`re having problems settling the hotel bills and the hotel manager won’t let us leave until we settle the bills.

am freaked out at the moment and need help right away.

After recovering my gmail account and looking at the access history, I discovered these two entries:

Browser Nigeria (41.138.172.93) 6:30 am (10 hours ago)
Browser Nigeria (41.138.172.93) 5:30 am (11 hours ago)

Needless to say I wasn’t pleased by any of this.

While trying to determine the root cause of this whole fiasco I did discover an interesting tidbit about Mozilla Thunderbird, my email client of choice. The option network.prefetch-next is set to true by default! To those that have no clue what this is, here’s the quick and dirty from mozilla. Link prefetching is when a webpage hints to the browser that certain pages are likely to be visited, so the browser downloads them immediately so they can be displayed immediately when the user requests it. This preference controls whether link prefetching is enabled. Essentially the client will go and download a page to disk before the user has even visited it in the name of speedier internet. I discovered this little tidbit after downloading a couple more virus scanners and doing a full system scan just to discover that not only was some spam mail I had deleted about a week ago still sitting in the trash for that inbox, but some other malicious things had shown up in there with it as well. This led me to look into whether Thunderbird had a prefetch setting similar to that enabled by default in Mozilla Firefox. Turns out it did and it was enabled by default.

While this isn’t necessarily a bad thing in a normal web browser since you have a fair bit more control on where you’re going, having something like this enabled by default in an email client, which tend to be prone to getting malicious content sent to them no matter how hard a company may try to filter it, just seems like a terrible idea to me. When I received the original spam mail, the source and subject seemed somewhat legit at the time, so I had a quick look at the content. Once I realized it was spam, I promptly deleted it without visiting (or so I thought, thanks prefetch) any of the links contained in it. Goes to show technology isn’t always working for the proper end user.

Since I’ve spent all this time talking about the evils of prefetch, I’ll go ahead and quickly outline how you can go about disabling it in both Firefox and Thunderbird.

Firefox:
1. Open a new tab and in the address bar, type about:config and press Enter.
Thunderbird:
1. Go to Tools->Preferences (Microsoft Windows) or Edit->Preferences (most if not all *nix distros). Go to the Advanced tab, and on the General tab click the Config Editor… button.
Both:
2. You’ll get a warning page saying that “This might void your warranty!”. Click the I’ll be careful, I promise! button.
3. In the filter box, type in prefetch. The only option that comes up should be network.prefetch-next. If not, we’re only working with network.prefetch-next. Unless you have a clever network admin, it will be set to true when it comes up.
4. Double click the network.prefetch-next entry. This should set it to false. If not, you can always right click on the entry and select the Toggle menu entry.
5. Close the window/tab. That’s it. You’re done.

While this isn’t an end all be all security solution for Thunderbird or Firefox, it is definitely a step in the right direction in trying to trip the baddies up when they’re out to get you. And remember. The only effective security is proactive security.

Share

Jul 6 2010

The Truth About Working In The IT Industry

elderpyre

1. We work weird (night) shifts…
   Just like prostitutes.
2. They pay you to make the client happy…
   Just like a prostitute.
3. The client pays a lot of money, but your employer keeps almost every penny…
   Just like a prostitute.
4. You are rewarded for fulfilling the client’s dreams…
   Just like a prostitute.
5. Your friends fall apart and you end up hanging out with people in the same profession as you…
   Just like a prostitute.
6. When you have to meet the client you always have to be perfectly groomed…
   Just like a prostitute.
7. But when you go back home it seems like you are coming back from hell…
   Just like a prostitute.
8. The client always wants to pay less but expects incredible things from you…
   Just like a prostitute.
9. When people ask you about your job, you have difficulties to explain it…
   Just like a prostitute.
10. Everyday when you wake up, you say: “I’m not going to spend the rest of my life doing this.”
   Just like a prostitute …

Found at and procured from Who Cares?, who found it at JPmens@Posterous

Share

May 13 2010

Congratulations/Slight blog change

elderpyre

Congratulations are in order to Becky, who went into labour last night with her and Darren’s first child. I know both of them are truly excited and I wish for the absolute best for both of them and their new baby boy. Here’s to outstanding health and knowing they’ll raise a child smart enough in all respects to take on the world.

On a separate note, I had to disable the AddToAny plugin for the blog, as it was making the site hang during load. Anyone actually reading this will have to manually add links to other things for the time being.

Share

May 5 2010

:(

elderpyre

I got laid off due to a company restructuring this morning. Time to find new work again…

Share

Mar 28 2010

Amusement

elderpyre

Not generally the type of thing I would listen to, but I found this damn amusing.

Share