View Full Version : Using Terminal (OS X) To Retrieve CRC32


darksidZz
01-30-08, 02:14 AM
I found this bit of interesting information on the net, it seems OS X has a built in command to calculate CRC's but it's in decimal only! A nice person made some code that you can add into your .bash_profile and have the hexadecimal value instead. Here's what you need to do:

1. Open terminal then type the following:

touch ~/.bash_profile
open -e ~/.bash_profile

2. This will open your .bash_profile, most likely it will be empty. Then you need to add this as a single line of code:

function crc32 { cksum -o3 "$@"|ruby -e 'STDIN.each{|a|a=a.split;printf "%08X\t%s\n",a[0],a[2..-1].join(" ")}'; }

Close .bash_profile and save changes. When you're done open Terminal, type crc32 and then drag over a file from your desktop, hit return. You will be given the crc32 in all it's glory.

I like this because it allows me to verify the file is indeed the same one (if the CRC32 is given) they had online (whoever). Good luck!

Gustav
01-30-08, 03:32 AM
nonsense
os x is a just a fancy gui
cksum is from project 1003
ja, undercover/top secret/black chopper shit

fuck crc anyway
md5 rules!

Gustav
01-30-08, 03:36 AM
oh
my .profile was the funkiest in town
lemme see if i can find a copy