content top

Quicklook from the Terminal

You may be surprised to know that Leopard includes a command line version of Quick Look called “qlmanage”. If you’re a heavy terminal user like me this is incredibly handy.

I tend to do all my file organizing via the terminal so say I’m copying some jpeg files and I want to make sure they’re the ones I’m interested copying I can type the following command into the terminal to get a Quick Look preview of them all

qlmanage -p ./*.jpg

Which shows me all the .jpg files in my current directory or I could just preview one

qlmanage -p ./image.jpg

If you’re into bash or Perl scripting this opens up all sorts of cool possibilities.

There are also a selection of command line switched aside form the -p (preview) switch. I’ve listed a few of the more useful ones below.

-t                  Show thumbnails of the documents
-s size          Size for the thumbnail
-f factor       Scale factor for the thumbnail

As always if you have any problems, questions, comments or suggestions post them below in the comments section.

Read More

The fuser command (or Let my drive go!!)

Today I was having some troubles. I was trying to unmount a drive on my Linux server but I kept getting the

umount: /mnt/data: device is busy

message back. Well this means that some process is using a file on that drive. fuser to the rescue. I’ll take you through the steps I used to unlock this drive below.

Read More

Bust that pesky corporate firewall

Have you ever needed to SSH into a firewalled computer where you don’t have control over the firewall? Well by creating a tunnel from your this protected machine to your machine at home you can punch a tiny SSH sized hole in that firewall.

Read More

How-To spy on other users on the local network

Sometimes it’s nice to know what kind of people you’re sharing a LAN with. This hack will allow you to sniff packets from other users on the Local Switched network. What we accomplish by ARP spoofing is tricking a host on the LAN into forwarding us packets that normally would only be sent to the gateway (or the machine or router thats going to send them off to the internet)

****Disclaimer****
This should only ever be done on a network that you run or otherwise have permission to monitor other users activities.

Read More

Find all active IP addresses in an network

Today I found myself reconfiguring a wireless access point I hadn’t used in a very long time. I no longer have the manual (so I could reset it to factory defaults) nor do I remember what the obscure IP address I configured it with was. Luckily I do know what network it’s setup for ( 192.168.1.x ) but I don’t want to have to try to connect to all 254 IP addresses (192.168.1.1 through 192.168.1.254) as that would take quite some time. So what I’m going to do is use Nmap a swiss army knife for network operators and system admins. What we’re going to do is use Nmap to scan the entire network and tell us which IP addresses are active. This will allow us to drastically reduce the number of IP addresses we have to try. There are Nmap versions for all three major OS’s *nix, OS X and Windows. I’ll be showing you the syntax for the *nix/OS X version.

nmap -sP 192.168.1.0/24

replace 192.168.1.0/24 with whatever network it is you’re trying to scan.
The /24 is the netmask of the network in CDIR notation. If you need a cheat sheet you can find one here

Once you press return (or enter) Nmap will start to work pinging each and every IP address on your network and noting which ones respond and which don’t. (Note that if your device has a firewall that discards ping requests it will appear to be down to this scan)

You’ll quickly get an output similar to the following

Starting Nmap 4.50 ( http://insecure.org ) at 2008-08-19 10:15 PDT
HOST 192.168.1.25 appears to be up.
MAC Address: 0:0F:1F:4C:0B:E6 (WW Pcba Test)
Nmap finished: 256 IP addresses (3 hosts up) scanned in 5.711 seconds

As always let me know what you think of this post and post any questions you may have to the comments.

Read More
content top