hair loss drug

Inspirated

 
 

October 16, 2010

HOWTO: Play PS3 backups with files larger than 4 GB

Filed under: Blog — admin @ 8:28 pm

One of the common issues gamers are facing in transferring their backups between their PS3 and PC is the filesize limits for FAT32 filesystems (which happens to be the only one recognized by Backup Manager on external USB drives). Fortunately, a workaround exists for transferring >4GB files to PS3 from USB storage. First of all, you’ll need Comgenie’s Awesome Filemanager. Once you’ve got it up and running you can split any large file in the following manner:

Big.file
Big.file.1.part
Big.file.2.part
Big.file.3.part

Comgenie’s package comes with a file-splitter which splits following the pattern mentioned above. However, the utility runs only on Windows or Wine integrated with Mono. Fellow *nixers can use the handy split to the same effect. Here’s a shell script which I wrote for automating this task:

ps3split.tar.gz

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
 
if [ "$#" -lt "1" ]
then
    echo "Usage: ps3split inputfile"
    exit 1
fi
 
if [ "$(readlink -f .)" == "$(dirname "$(readlink -f "$1")")" ]
then
    echo "Cannot split files in the same directory as original"
    exit 1
fi
 
split --verbose \
      --bytes=4294967295 \
      --suffix-length=1 \
      --numeric-suffixes \
      "$1" "$(basename "$1").part."
 
old="$(basename "$1").part.0"
new="$(basename "$1")"
echo "renaming file \`$old\` -> \`$new\`"
mv "$old" "$new"
 
for old in $(basename "$1").part.*
do
    new=`echo $old | sed 's/^\(.*\).part.\(.\)$/\1.\2.part/'`
    echo "renaming file \`$old\` -> \`$new\`"
    mv "$old" "$new"
done

Use the script by providing it the path of a file you want to split:

[krkhan@orthanc ps3split]$ ./ps3split /mnt/bluray/PS3_GAME/USRDIR/TEKKEN.psarc

creating file `TEKKEN.psarc.part.0′
creating file `TEKKEN.psarc.part.1′
renaming file `TEKKEN.psarc.part.0` -> `TEKKEN.psarc`
renaming file `TEKKEN.psarc.part.1` -> `TEKKEN.psarc.1.part`

Transfer all the splitted files to your external harddisk and then copy the first part (`TEKKEN.psarc` in this case) using Comgenie’s Filemanager. It will automatically recognize the subsequent parts and join them together on the internal harddisk of PS3. I’ve tested the script on Tekken 6 and Red Dead Redemption and it worked flawlessly for both.

Tags: , , , , , , , ,

June 4, 2010

How NOT to copy MBR with the dd command

Filed under: Blog — admin @ 8:39 pm

Yesterday I needed to copy the MBR of a drive over another. Googling a little I found the following command in various tutorials:

-bash-$ dd if=/dev/sda of=/dev/sdb bs=512 count=1

Where /dev/sda and /dev/sda were the original and target hard disks respectively. The command did complete its work in a snap but it also made me learn a thing about MBR structures the hard way: Only 446 bytes of the MBR contain boot code, the next 64 contain the partition table!

The implications of the lesson being, if partition tables of both hard disks differ — which unfortunately was the case with me — the partition table of the target hard-disk will be overwritten. The correct way would therefore be:

-bash-$ dd if=/dev/sda of=/dev/sdb bs=446 count=1

In case you did mess up the table, I recommend TestDisk for recovering your partitions.

Tags: , , , , , ,

March 2, 2010

GoDaddy/WordPress ninoplas Base64 virus and the fix

Filed under: Blog — admin @ 7:40 pm

Update: The virus seems to have affected only GoDaddy websites, hence the change in title.

Few hours ago I opened my website and noticed some rather strange Javascript hanging around the bottom. After some inspection, it became evident that every page on my blog was trying to load an IFrame to some place called ninoplas.com. Turns out, I wasn’t alone and there are other users as well who are affected by this. Judging by the fact that different blogs were attacked at the same time, this was in all probability the result of a security hole in some plugin or the core itself.

The virus acted by adding a piece of encrypted code on the first line of all PHP files on the server. It’s rather unsettling to consider the extend of damage that could have been caused with the write access to those files. Still, the damage could be rectified by simply deleting those lines. I wrote a tiny script for doing this job which cleans the ninoplas virus from all the PHP files in the current directory:

clean-ninoplas.sh

Warning: While this script has worked for me, I am in no way providing any guarantee for how it behaves on other blogs. Backup your blog as well as database before executing this script.
You have been warned.

Using the fix is a simple matter of:

-bash-$ cd wordpress
-bash-$ wget http://inspirated.com/uploads/clean-ninoplas.sh
-bash-$ sh clean-ninoplas.sh

And don’t forget to backup everything again after cleaning up. The security hole — if there is one — has still not been tracked and if it’s in the core or some plugin which you’re still using, the virus might not be so benevolent next time.

Tags: , , , , , , ,