#!/bin/sh # # Converts /etc/security/passwd file in AIX to regular /etc/shadow file # Suitable for John the Ripper # C0d3d by M1ch13l # Version 0.3 if [ $# -lt 1 ]; then echo "--------> Missing arguments" echo "--------> use aix_pw " echo "--------> where is AIX /etc/security/passwd file" exit 0; fi dos2unix $1 sed -e '/^$/d' -e 's/*/!!/g' $1 > /tmp/shwf$$ echo "## Start of /etc/shadow file ##" for i in `grep ":" /tmp/shwf$$|cut -d ":" -f1` do pass=`grep -w $i: -C1 /tmp/shwf$$|tail -n 2|grep password|awk -F= '{print $2}'` echo -e "$i:$pass::::::"|sed -e 's/ //g' done echo "## End of /etc/shadow file ##" if [ -e /tmp/shwf$$ ] then rm -f /tmp/shwf$$ fi