helpful tcpdump command options

When creating a tcpdump, you don’t want to exclude to much information, to prevent a trace becoming useless. However large output files can be a pain to load and examine in Wireshark. There are some solutions though.

Create multiple files

tcpdump -n -C 128 -W 100 -i eth0 -w /tmp/packetlog.pcap &

  • -n don’t do reverse lookup on IPs, don’t convert port numbers to text descriptions, don’t convert MAC addesses to names, etc..
  • -C 128 rotate capture files every 128,000,000 bytes (128MB)
  • -W 100 limit the number of capture files being rotated (see -C) to 100
  • -i eth0 capture on interface eth0
  • -w /tmp/packetlogs/packetlog.pcap use file name /tmp/packetlogs/packetlog.pcap
  • & this is parsed by bash; indicates that the command should be run in the background (asynchronously)

Split the output file into smaller chunks

how to split a pcap file into a set of smaller ones :

tcpdump -r old_file -w new_files -C 10

The “-C” option specifies the size of the file to split into. Eg: In the above case new files size will be 10 million bytes each.

Enjoy ! M.

Visitor Score
[Total: 0 Average: 0]

Failed to deploy OVF package: The task was canceled by a user (Solution)

Tried to deploy a OVF package. After finishing the wizard, vSphere stopped the deployment with the message “Failed to deploy OVF package: The task was canceled by a user.“. However there was no other user logged in !

The fix for this is very easy :

  • Deleted *.mf file and change settings in the ovf file

If your not deploying an OVF package but an OVA package, extract the files from the OVA package (e.g. using 7zip). There are files with different extensions :

  • ovf – OVF descriptor, written in XML, which describes the hardware requirements
  • mf – contains SHA1 checksums of the .OVA and .VMDK
  • vmdk – the virtual hard disk for the virtual machine.

I immediately discarded the .mf. If you modify the .ova and don’t update the .mf, it’ll complain that the checksum is invalid. Removing this file seems to prevent vSphere from checking the checksums, which is useful, seeing as we want to poke around the .ova. After fiddling around inside the .ovf, I stumbled across the following line…

<rasd:ResourceSubType>vmware.cdrom.iso</rasd:ResourceSubType>

Changing the above line, to read…

<rasd:ResourceSubType>vmware.cdrom.atapi</rasd:ResourceSubType>

…appears to have fixed my deployment issues. Perhaps changing the ‘CD Drive Device type’ in the virtual machine’s settings would’ve fixed it. But by that point, I had already exported the OVA and deleted the source virtual machine.

Hopefully someone will stumble across this one day, and it’ll save them a few hours !

Greetz, M.

Visitor Score
[Total: 1 Average: 5]

Installing the XBMC SuperRepo

Most of the best XBMC addons are available on SuperRepo (http://superrepo.org/), which is highly recommended if you have a XBMC box. The following steps will take you through how to install the XBMC SuperRepo on your media center using only a keyboard.

  • Once you have started XBMC navigate to the “system” menu and open the file manager.
  • Select “Add Source” on the left panel of the screen.
  • Click on the textbox with says “None” to open up the keyboard entry.
  • Type the url http://srp.nu and click done.
  • Enter a name for the media source in the textbox below.
  • The repo will now be added to your file manager.
  • Go to “System” and then “Addons”.
  • Click “Install from Zip”.
  • Locate the relevant repository for your XBMC version.
  • This should now be added to your “Get Add Ons” screen

Greetz, M.

Visitor Score
[Total: 0 Average: 0]

What are the different signal indicators avalable on the notification bar?

The signal indicator on my phone often shows “3G” or “H+” in the signal indicator. When there’s no connectivity it doesn’t show anything.
They are referring to the mobile data connection:

  • G : GPRS (slowest, data rates of 56–114 kbit/s)
  • E : Edge (enhanced GSM, data rates up to 236 kbit/s )
  • 3G : UMTS (data rates up to 384 kbit/s)
  • H : HSPA (enhanced 3G, data rates up to 14.4 Mbit/s)
  • H+ : HSPA+ (even more enhanced/faster HSPA, data rates up to 42 Mbit/s)
  • 4G : LTE (Long term evolution, data rates up to 300Mbit/s)

Note : all data rates mentioned are downlink peak rates. Uplink data rates are much lower.

Greetz, M.

Visitor Score
[Total: 0 Average: 0]

Using Shortcodes to Customize Your Posts

When using JetPack to publish blog posts by email, there are some shortcodes you can use in the mail message to customize your post.

I had a wide satisfactory smile (more like a grin) on my face after testing shortcodes. After a short while and without breaking a sweat, I learned you could add categories, tags, excerpts, slugs, polls, delay your posts for hours or days, and turn comments on and off among other things. Here is a list of the available shortcodes:

  • [title Your Desired Post Title] – Sets your post title in case you cannot access the subject field from your mobile device
  • [category a,b,c] – Adds categories a, b and c to your post. E.g. [category Recipes, How-To] will assign categories Recipes and How-To to your post
  • [delay +1 hour] – This shortcode will instruct WordPress to publish your post after one (1) hour. [delay +2 days] means your post will be published after two days
  • [end] – Everything after this bad boy is ignored. Put it at the very end of your post with a blank line above it. This is the only shortcode you can’t use anywhere else in the body of your email. You can place any other shortcode wherever in your email except the subject field of course ;)
  • [tags a,b,c] – Adds tags a, b and c to your post
  • [excerpt]Your excerpt goes here…[/excerpt] – This shortcode adds an excerpt to your post
  • [slug add-your-slug-here] – Adds a slug to your post. A slug is a browser and SEO friendly URL of your post
  • [comments on | off] – Turns comments on or off
  • [nogallery] – Deactivates the gallery and displays all images inline
  • –  Turns your gallery into a slideshow
  • [more] – Works just like the more tag
  • [poll] Quiz and answers[/poll] – Adds a Polldaddy poll
  • [nextpage] – Allows you to paginate your blog post
  • [publicize off | yahoo | twitter | facebook] – Allows you to set your publicize options. For instance, [publicize off] disables the publicize feature for that particular post, and [publicize twitter] sends notification to your Twitter account only
  • [status publish | pending | draft | private] – What do you think this does?

Note: You must write all shortcodes in lowercase.

Greetz, M.

Visitor Score
[Total: 0 Average: 0]

Publish WordPress Blog Posts via Email

Blogging can be much more fun when you know you have a couple of cool WordPress options at your disposal. For instance, did you know that you can compose, format and publish WordPress blog posts right from inside your mailbox? Oh yeah, you can and it’s easy stuff :).

Just imagine the amount of work you can accomplish this way? Think of the flexibility and benefit this option brings you. I mean, you can post from wherever using any internet-enabled device whether or not you have the WordPress mobile app. If you are excited, let us look at the way you can use to publish WordPress blog posts via email.

Post by Email in Jetpack

Jetpack allows you to supercharge your self-hosted WordPress website by offering you a couple of nice features including Post by Email. So how do you post by email using Jetpack? Obviously, you must first install Jetpack on your WordPress site (Note: you cannot use this feature on a local installation of WordPress since JetPack, just an fyi if you were hoping to test this out on your localhost). With Jetpack installed on your WordPress platform, it is time for the next step: generating a special email address. You will send all the posts you would like to publish to this email address, so it’s important to keep it a secret. People (read hackers) with access to this email address can publish posts to your blog, something we definitely don’t want.

Fire up your favorite mail client (I love Gmail for business. Thank you Google Apps) and start composing your blog post. The title of your blog post goes in the subject field of your email and the post’s content goes in the body of your email – just like a typical email. Of course, once we’re done composing and formatting the post, we will send it to that special email address we generated earlier, so copy it in the to field.

Greetz, M.

Visitor Score
[Total: 0 Average: 0]

Fix date time missing in the menu bar in Ubuntu 14.04

Open a terminal and use the command given below. This is optional and just to make sure that you have the indicator installed already.

sudo apt-get install indicator-datetime

Once we have made sure that the indicator is installed, next step is to reconfigure it:

sudo dpkg-reconfigure --frontend noninteractive tzdata

And the last step is to restart Unity:

sudo killall unity-panel-service

That should be it. Now the date time should be appearing in the top panel.

Greetz, M.

Visitor Score
[Total: 0 Average: 0]