A simple script might do this for your subnet

#!/usr/bin/bash
i=1;
while [ $i -lt 255 ]; do
echo 192.168.1.$i secret >> psk.txt
i=`expr $i + 1`;
done