Script to quickly convert multiple .pcap captures to PMKID and HCCAPX, ready for Hashcat cracking

This is my very first bash script so go easy on me, but it seems to work fine.

convertwpa will loop through all your .pcap files and convert them to the appropriate format ready for Hashcat cracking. It separates them into two folders pmkid (Association captures) and hccapx (deauth handshake captures).

Let me know if something isn’t working correctly, or happy to improve it somehow.



# Author: CyrisXD
# Twitter: @sudo_overflow
# Github:

# This script relies on -
# Make sure hcxpcaptool is installed and available in terminal

# Save the script as convertwpa and make it executable
# chmod +x convertwpa

# Add convertwpa to your ~/.bash_profile
# sudo nano ~/.bash_profile

# Add the below line (without # hash)
# export PATH="path/to/convertwpa/folder"

# How to use
# Navigate to the folder with all your handshakes
# Run command: convertwpa
# Two folders (pmkid/hccapx) will be created with your converted handshakes

mkdir pmkid
mkdir hccapx
for f in $FILES
if [[ "$f" == *"$EXT"* ]];then
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  hcxpcaptool -z ./pmkid/${FileName/.pcap/}.pmkid ./$f
  hcxpcaptool -o ./hccapx/${FileName/.pcap/}.hccapx ./$f

This looks awesome I will test it out this afternoon

1 Like