x1mdev / ReconPi

ReconPi - A lightweight recon tool that performs extensive scanning with the latest tools.
https://x1m.nl/posts/recon-pi/
MIT License
717 stars 112 forks source link

domains.json output #23

Closed x1mdev closed 6 years ago

x1mdev commented 6 years ago

the domains.json file is not getting the right input data, not really sure what is going on there

https://github.com/x1mdev/ReconPi/blob/master/recon.sh


: 'Convert domains.txt to json (subdomainDB format) + make POST API request with output from subfinder'
convertDomainsFile()
{
    echo -e "[$GREEN+$RESET] Converting $GREEN$ROOT/$1/domains.txt$RESET to an acceptable $GREEN.json$RESET file.."
    cat $ROOT/$1/domains.txt | grep -P "([A-Za-z0-9]).*$1" >> $ROOT/$1/domains.json
    echo -e "{\\n\"domains\":"; jq -MRs 'split("\n")' < domains.json | sed -z 's/,\n  ""//g'; echo -e "}"

    # TODO: Post request to dashboard - work in progress
    #curl -X POST -H "Content-Type: application/json" -H "X-Hacking: is Illegal!" -d "@domains.json" http://127.0.0.1:4000/api/domain/:domain

}

@ebelties any ideas?

x1mdev commented 6 years ago

regex idea from @quintenvi:


^(([[:alpha:]](-?[[:alnum:]])*)\.)*[[:alpha:]](-?[[:alnum:]])+\.[[:alpha:]]{2,}$
x1mdev commented 6 years ago

Fixed in v1.0.0

https://github.com/x1mdev/ReconPi/commit/82de07d969e9ece6eca345769226fc13ade0440a