phpMyAdmin upgrade script.

I got sick of upgrading phpMyAdmin at work every time a new version came out so i made this little script to do it for me. All you have to do is pass the .gz download url to it.

Here is the code:

#!/bin/bash
upgrade() {
    wget $1 -O phpmyadminupgrade.tar.gz
    FILE="phpmyadminupgrade.tar.gz"
    tar zxvf $FILE
    FOLDER=`echo $FILE | awk -F".tar" '{print $1}'`
    cp /usr/share/phpmyadmin/config.inc.php ~/phpMyAdmin*
    rm -rf /usr/share/phpmyadmin/*
    cp -R ~/phpMyAdmin*/* /usr/share/phpmyadmin/
    chmod -R 777 /usr/share/phpmyadmin/
    chmod 644 /usr/share/phpmyadmin/config.inc.php
    rm -rf ~/phpMyAdmin*
    rm ~/$FILE
    echo "Done!!"
    exit 1
}

usage() {
    echo "Use this script to update phpmyadmin"
    echo "to run:"
    echo "./upgradephpmyadmin.sh url"
    exit 1
}

if [ -z "$1" ]; then
    usage;
else
    upgrade $1
fi

Past that into “upgradephpmyadmin.sh”
chmod a+x it and run it as root like so:

user@user:~$ sudo ./upgrademyphpadmin.sh url

NOTE: This bash script assumes phpMyAdmin’s html files, including config.inc.php live in /usr/share/phpmyadmin/ and that you are running this script in your home directory.

dc414 @ DEFCON19

ngharo and I will be giving a presentation at DEFCON19!! DefCon Groups asked us to talk a little about dc414. Like about how we run it, what we do at meetings, what we do in public, and other odds and ends. This will be a first and a honor for the both of us, It should be lots of fun 🙂

More Blacklist

Got this email from the kind people at Demand Progress:

We’re forcing them to take our concerns seriously: Demand Progress members have sent more than 50,000 emails to Senators to urge them to oppose the Internet Blacklist Bill (the PROTECT IP Act). Now we’re hearing back from them, and one thing is clear: Our emails are compelling Senators to start thinking hard about Internet freedom.

PROTECT IP would give the government the power to force Internet service providers, search engines, and other “information location tools” to block users’ access to sites that have been accused of copyright infringement — the initiation of a China-style censorship regime here in the United States.

Will you email Congress to urge them to oppose the PROTECT IP Act? Just click here.

Senators are writing back to let us know that our emails are making them think twice before rubber-stamping PROTECT IP. For instance, Oregon’s Jeff Merkley is telling Demand Progress members:

I have heard from many Oregonians on both sides of this issue – those who support providing U.S. agencies with greater authority to shut down websites, and those who are worried that the legislation could result in Internet censorship. Thanks to your letter and the letters of fellow Oregonians, I have asked my staff to take a closer look into this legislation.

Let’s keep it coming — Will you email Congress to urge them to oppose the PROTECT IP Act? Just click here.

Thanks for fighting for Internet freedom!

Send a email to your senator now and stop this evil act.

Good times @ mke makerspace open house

Me and ngh made a trip to mke makerspace’s open house and man it was well worth the ride. Got to see lots of cool clocks 😀 make a little blinking LED in soldering class, watched a makerbot in action and tons more awesome stuff. Also thanx to makerspace we also have a nice DIY project to give away at the next dc414 meeting “the blinky light we made in soldering class” Heres some pics i took while there. Thats it, peace.
mke makerspace

DIY 3 port powerless hub

Ever need a few extra ports for your network and didn’t want to spend more then a few dollars? Well dw5304 did, so he found a bunch of shit laying around his crib, made a little trip to radio shack and a few hours later he gives us the DIY 3 port powerless hub 😀 He was even nice enough to provide us with a easy follow along tut “complete with a list of tools/materials needed”, and some pics. Heres a few pics to start off with:


Download the tutorial HERE and make your own!! More pics inside. Many thanxs to dw5304 for all his hard work, dc414 wouldn’t be the same with out ya 😛

Using Unetbootin to create bootable USB drive from iso

I had used Unetbootin to create a USB installer from a Ubuntu ISO image. All went OK in creating and installing the USB image following UNetbootin instructions, so I thought.

The Problem
UNetbootin created menu entries in the bootloader containing invalid arguments.
When booting, it would load the kernel, then kick me to a shell stating
init not found pass init= to kernel
Googling reveals many other users having the same issue.

The Solution
Bootable Linux CDs usually always contain a configuration file for the bootloader. I mounted the ISO image loopback (# mount -o loop image.iso /mnt/mountpoint) and found Ubuntu 10.x is using Grub, which is pretty standard across all Linux distros. Looking at this config file in /boot/grub/loopback.cfg in my instance, I was able to see how Ubuntu was expected to boot.

Here’s what the default menu entry in Ubuntu Netbook image looks like:
menuentry "Try Ubuntu Netbook without installing" {
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu-netbook.seed boot=casper iso-scan/filename=${iso_path} quiet splash --
initrd /casper/initrd.lz
}

Passing kernel=/casper/vmlinuz initrd=/casper/initrd.lz boot=casper to UNetbootin’s bootloader and it booted right up.