Prosecutors also alleged that the Afghan refugee tried to buy even more guns before his attack on American troops on Nov. 26.