Tag OS X

Capturing whole packet with tcpdump for analysis with wireshark

Capturing the hole packet on your NIC for later analysis with wireshark $tcpdump -nnvvXSs 1514 -i em0 -w /tmp/em0.dumptcp Will capture 1514 bytes of all packets on interface “em0” and dump it to the file “/tmp/em0.dumptcp”. You can then import the file into wireshark for analysis. Explanation of Parameters Text below is copied from tcpdump man page -nn Don’t convert protocol and port numbers etc. to names either. -vv Even more verbose output.

Show all files in OS X’s finder

By default the finder in OS X does not show all the files. You can still see the files if you use a terminal and type ls -la but sometimes you may need the finder to point to a particularly file. e.g. you want to load a hidden file in to an application. To force finder to show all files, just type the following into a terminal: defaults write com.apple.Finder AppleShowAllFiles YES

Taking screenshot with OS X

The following shortcuts can be used to take screenshots with OS X. Take a screenshot of the full screen and save it as a PNG file on the desktop CMD+Shift+3 Select a specific part of your screen to take a screenshot. The picture is saved as a PNG on your desktop CMD+Shift+4 Click on a window to make a screenshot of this particularly window. The picture is saved as a PNG on your desktop CMD+Shift+4 space click

US iTunes gift cards

If you’re like me: a big TV series fan living outside US, its sometimes quiet annoying, to get you’re favorite TV series in a legal way. The only solution I found so far is, to buy US iTunes gift cards online and create a US iTunes store account. Configure iTunes is quiet easy, just change the “store country” to US and create a new Account. You have to provide a US address and phone number, you have also to use a different email address, then you use for your local iTunes account.

Using MacPorts

Changing from linux to OS X? Disappointed because you can’t find all the nice tools you’ve got with ubuntu? The MacPorts port collection turns your mac OS X computer into a fully functional UNIX system. The MacPorts port collection is an archive including thousands of UNIX tools and programs usable witch your mac. All the programs are delivered in source code and the MacPorts-tools will help you to download, install and keep it up to date.

screen as a minicom alternative?

for those who still use minicom to connect to a console (serial) port on a cisco (or whatever) device: i prefer “screen”, because its so easy, and for the most things it’s all you need. screen should be already pre installed with ubuntu, with osx it’s easy to install using macports. to use it, just type: screen /dev/ttyS0 9600 Where ttyS0 is your serial device and 9600 the baudrate to close the session you have to press ctrl-a k and then y (for yes)