Installing and Patching Cowpatty 4.6

I had this error running cowpatty on my machine:

End of pcap capture file, incomplete four-way handshake exchange.  Try using a
different capture.

Showing this error, I checked the pcap file in kali linux and cowpatty installed in there checked the file as correct.
So I then call google for help and found very useful article. Here’s what you should do:

Get the source first, uncompress, then cd to its directory.

wget http://wirelessdefence.org/Contents/Files/cowpatty-4.6.tgz
tar xvzf cowpatty-4.6.tgz
cd cowpatty-4.6/

Then get the patch and patch cowpatty.

wget https://raw.githubusercontent.com/dpzhang314/pentest/master/net-wireless/cowpatty/files/cowpatty-4.6-fixup14.patch
patch < cowpatty-4.6-fixup14.patch

Install.

make
sudo make install

Done.

Credits:
http://theunl33t.blogspot.com/2011/06/patch-compile-and-installing-cowpatty.html
https://github.com/dpzhang314