Saturday, September 8, 2007

Wifi Card du jour

Wireless cards that are supposed to do it all, packet injection and the like. As high power as is legal ~300mW

Manufacturer:
http://www.ubnt.com
Local Retailer:
http://www.echotechwireless.com
Recommended Card:
http://www.ubnt.com/downloads/srcdatasheet.pdf

There are also mini-pci cards that one could install into their Dell latptop. Pricetags are > $100, so pony up , or watch E-Bay.

A testimonial of the Ubiquity card I've formatted it a little:

"I've tried 4 different wireless cards on Back|Track2 with varying levels of success.

[...]

UbiQuiti SRC Range Max

Without a doubt the best card available IMHO.

  • A massive 300mW power
  • comes with 2 x MMCX connectors and now shipping standard with a 5dB aerial
  • Can support OMNI and Directional at the same time
  • Uses the madwifi driver, supports packet injection
  • Support for ABG networks; Great sensitivity

Only draw back is the price, ... If you don't mind the money, then this is the only choice."

Here is a site listing cards and drivers that are known to work with BT2 (Backtrack 2). This list includes the following entry for the Ubiquity:

Ubiquiti SRC

  • Driver : Madwifi-ng
  • Chipset : Atheros AR5212 a/b/g
  • FCC ID: SWX-SRC
  • lspci : 03:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

In stock in the Salt Lake City area at EchoTech Wireless, 740 W. 1700 S., Unit #6, Salt Lake City, UT 84104. (801) 649-6400 (order@echotechwireless.com)

Monday, September 3, 2007

Images on the command line

I have used imagemagick as a command line tool in the past; you know, for batch image processing and tweaking in various scenarios. It has always come through for me and generally saved me a lot of time.

Since recently purchasing my Cannon SLR, I now have a lot of very large (3MB jpeg) pictures to manage. Imagemagick was an easy choice for things like shrinking to a size you can share with grandma via email, and cropping for the perfect fit on your desktop.

I would be interested if any of you have tricks to optimize / automate such tasks. Some of my imagemagick notes are as follows:

KNOWLEDGE IS POWER

Working with images, it is often helpful to verify what your commands have done. Use the identify command to tell you the image format, dimmensions, etc.: identify filename.jpg

  • Very useful in making robust scripts that handle different formats or sizes.

RESIZE AN IMAGE

To resize an image you can just use a simple: convert filename.jpg -resize 50% newfilename.jpg

  • This will resize the image to 50% of the original size and maintain aspect.

To resize to a particular width and maintain aspect use the following: convert filename.jpg -resize 800 newfilename.jpg

To resize to a particular height and maintain aspect use the following: convert filename.jpg -resize x600 newfilename.jpg

To resize in a fit in screen type mode, specify both width and height: convert filename.jpg -resize 800x600 newfilename.jpg

  • This maintains aspect and fits the image within that square

To force the image to a certain size, or "stretch" the image, you can use: convert filename.jpg -resize 800x600 ! newfilename.jpg

  • This will result in a perfect size image, but the image may be distorted.

CROP AN IMAGE

As with resize above, you can specify width or height to crop to.

width
convert filename.jpg -crop 50% newfilename.jpg
convert filename.jpg -crop 800 newfilename.jpg
height
convert filename.jpg -crop x50% newfilename.jpg
convert filename.jpg -crop x600 newfilename.jpg
both
convert filename.jpg -crop 50%x40% newfilename.jpg
convert filename.jpg -crop 800x600 newfilename.jpg

NOTE: the above commands will not discard anything, but rather give multiple output files of the original in pieces no larger than what is specified in your crop command. Think "tiles".

If you want ONLY a specific portion of the original, you can follow the dimensions with an offset x and y (+x+y). The x is measured from left to right by default and y is measured top to bottom. The upper left corner is +0+0. The picture saved is then measured from the +x+y reference point, again, the default is to the right and down.

convert filename.jpg -crop 800x600+0+0 newfilename.jpg

  • This gives the specified area measured to the right and down from the top left corner (+0+0). Everything else is discarded.

convert filename.jpg -crop 800x600+100+50 newfilename.jpg

  • This moves the upper left corner of the kept picture to the right 100 and down 50. Then measures to the right 800 and down 600 for the picture to be saved. Everything else is discarded.

COMBINE STEPS IN ORDER

You can actually combine steps in order on the commandline. Just give the name of the output file as the last argument like so: convert filename.jpg -resize x1024 -crop 1280x1024+0+0 filename-sm-crop.jpg

FINAL NOTE

There are a million more things that imagemagick can do... countless formats are supported and so are conversions between formats. If you have to process large numbers of images you should check it out.

Friday, August 31, 2007

Thursday, August 30, 2007

Using secure access "network connect" with Linux

In order to use the full network connect option of SecureAccess (Juniper SSL VPN), you have to do the following on your linux (Debian) host.

sudo apt-get install libstdc++2.10-glibc2.2
sudo ln -s /usr/lib/libssl.so.0.9.7 /usr/lib/libssl.so.2
sudo ln -s /usr/lib/libcrypto.so.0.9.7 /usr/lib/libcrypto.so.2

(you get the idea)

This is a year old, so the versions in the above syntax may have changed.

Monday, August 27, 2007

Get yours from SourceForge before someone buys it!

http://www.heidi.ie/eraser/

This is a program for windows. Secure file deletion, wiping unused space on disk, secure recycle bin erasure and the like... You can even choose your algorithm and number of passes... to some extent anyway - I haven't played around with it enough yet.

Full integration with all the right-clicky menus etc...

Note that this handy little gem does not hide files... it only deletes and overwrites the contents. The tell tale signs of files that were once present on your windows box can only be removed by zeroing the drive and reinstalling a nice fresh copy of Windows.

Saturday, August 25, 2007

Getting vmware server to run on Debian GNU/Linux

I have reinstalled vmware server (free version) and encountered incompatibility problems with my kernel (2.6.22-1-k7). It seems there are a lot of similar issues with other distros and similar kernels.

There are a number of standard hoops to jump through for Debian, but the following was the silver bullet for me with this new issue.

Needed is the any-any-113 patch from http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update113.tar.gz

  • untar the files
    tar zxf vmware-any-any-update113.tar.gz
  • change to the vmware-any-any-update113 directory
    cd vmware-any-any-update113
  • execute the runme.pl package
    ./runme.pl

The result will be a valid vmware-server package. By the way, when it asks for the location of your kernel's include files, use: /lib/modules/2.6.22-1-mepis-smp/build/include

Useful info at:

Tuesday, August 21, 2007

mp3 converters

compile these for use with grip try this URL: http://yolinux.com/TUTORIALS/LinuxTutorialMP3.html

http://members.tripod.com/Milaa/mp3Comparison/conclusion.html for usage options for lame.

both of these compiled fine, only used the --prefix=/usr/local/blahxxx option with ./configure

It looks like lame-3.97b2.tar.gz is still the latest version as of 2007-Aug.

I had to install (apt-get install) gcc and g++ with their accompanying libs to get the ./configure to work. I just followed the INSTALL doc that came with the source.