pry0cc / axiom

The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!
MIT License
4k stars 622 forks source link

"axiom-images use" not working with AWS #686

Closed h49nakxs closed 1 year ago

h49nakxs commented 1 year ago

Hi there,

First, thanks for this incredible tool ! It's a game changer for me.

When trying to set a new base image for a AWS account, the following command line doesn't work : axiom-images use "name-of-the-aws-image"

and returns : Failed to find snapshot with name: name-of-the-aws-image... exiting

Even if "axiom-images ls" does correctly find all the snapshots.

The issue comes from the line 141 in ".axiom/interact/axiom-images" : get_snapshots | grep -w $snapshot || { echo -e "${Red}Failed to find snapshot with name: "$snapshot"... exiting${Color_Off}" ; exit 1; }

The command "grep -w" cannot correctly get the snapshot name. I suspect this is because of the ANSI escape sequences at the beginning of the lines used to color the output of the function "get_snapshots" (with the "-w" option in grep, the whole word must start or end the line).