nmap -p--script http-enum -d example.com -oX output/nmap.xml --script-args 'http-enum.path=/' --script-args 'http-enum.maxpagecount=1' --script-args 'http-enum.hidematches=true' --script-args 'http-enum.nofollow=true' --script-args 'http-enum.ignore-codes=200,404' --script-args 'http-enum.externalonly=false' --script-args 'http-enum.maxdepth=1' --script-args 'http-enum.maxthreads=10' --script-args 'http-enum.delay=1s' --script-args 'http-enum.useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"' --script-args 'http-enum.version=detect' --script-args 'http-enum.method=GET' --script-args 'http-enum.baseurl=http://example.com' --script-args 'http-enum.outputfile=output/nmap_http_enum.txt' --script "http-enum" example.com > output/nmap_http_enum.txt && cat output/nmap_http_enum.txt | grep "Host:" | cut -d " " -f2 | sort | uniq > output/nmap_http_enum_hosts.txt && cat output/nmap_http_enum_hosts.txt | grep "^[a-zA-Z]{1,}." | sort | uniq > output/nmap_http_enum_valid_hosts.txt && cat output/nmap_http_enum_valid_hosts.txt >> output/nmap_all_subdomains.txt && echo "Done!" && echo "" && echo "Output saved to output directory." && echo "" && echo "All subdomains have been successfully collected." && echo "" && echo "Please check the output file for the list of all subdomains." && echo "" && echo "If you want to save the output in a different format, please run the script again with the desired output format as an argument." && echo "" && echo "For example, to save the output in JSON format, run the following command:" && echo "" && echo "nmap -p--script http-enum -d example.com -oX output/nmap_all_subdomains_json.xml --script-args 'http-enum.path=/' --script-args 'http-enum.maxpagecount=1' --script-args 'http-enum.hidematches=true' --script-args 'http-enum.nofollow=true' --script-args 'http-enum.ignore-codes=200,404' --script-args 'http-enum.externalonly=false' --script-args 'http-enum.maxdepth=1' --script-args 'http-enum.maxthreads=10' --script-args 'http-enum.delay=1s' --script-args 'http-enum.useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"' --script-args 'http-enum.version=detect' --script-args 'http-enum.method=GET' --script-args 'http-enum.baseurl=http://example.com' --script "http-enum" example.com > output/nmap_all_subdomains_json.xml" && echo "" && echo "Note: The above command is just an example and may not work on all systems." && echo "" && echo "If you encounter any issues while running the script, please refer to the Nmap documentation or contact the Nmap community for assistance." && echo "" && echo "Thank you for using this script!" && echo "" && echo "Have a nice day!" && echo "" && echo "Script created by OWASP Amass Community (https://github.com/OWASP/Amass)" && echo "" && echo "This script is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License." && echo "" && echo "You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2." && echo "" && echo "Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." && echo "" && echo "See the License for the specific language governing permissions and limitations under the License." && echo "" && echo "Script created by OWASP Amass Community (https://github.com/OWASP/Amass)" && echo "" && echo "This script is portable across all major operating systems and requires no additional setup or configuration." && echo "" && echo "For more information about this script, help and support options, please visit https://github.com/OWASP/Amass" && echo "" && echo "If you have any questions or feedback regarding this script, please contact us at info@owaspamass.org." && echo "" && echo ""