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!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in input handling

rizwansiddiqu1-recon opened this issue · comments

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.

@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?

yup got the issue.