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

Error in input handling #786

Closed rizwansiddiqu1-recon closed 7 months ago

rizwansiddiqu1-recon commented 7 months ago

my module: [{ "command":"bash /home/op/my-tool/test.sh input", "ext":"none" }]

Axiom command : axiom-scan input_file.txt -m test input_file :

test.com
example.com

test.sh content:

#!/bin/bash

if [ ! -f "$domains_file" ]; then
    echo "Error: Please provide a valid input file."
    exit 1
fi

while read -r domain || [[ -n "$domain" ]]; do
    echo $domain
done < "${1:-/dev/stdin}"

ERROR: Error: Please provide a valid input file.

sometime before it is running without any problem with same script.

0xtavian commented 7 months ago

@rizwansiddiqu1-recon running this code snippet locally produces the same error.

$ cat input
test.com
example.com
$ cat test.sh
#!/bin/bash

if [ ! -f "$domains_file" ]; then
    echo "Error: Please provide a valid input file."
    exit 1
fi

while read -r domain || [[ -n "$domain" ]]; do
    echo $domain
done < "${1:-/dev/stdin}"
$ ./test.sh input
Error: Please provide a valid input file.

I suspect there is something wrong with ur script?

rizwansiddiqu1-recon commented 7 months ago

yup got the issue.