Practical example using GREP command QUE.com › Forums › 30 – Cyber Security › Practical example using GREP command Tagged: grep This topic has 1 reply, 1 voice, and was last updated 11 months, 3 weeks ago by Support @QUE.COM. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts June 23, 2022 at 1:30 pm #50832 Support @QUE.COMKeymaster Listing all sub-domains. $ grep “href=” index.html | grep “\.yehey” | grep -v “www\.yehey\.com | awk -F “http://” ‘{print $2}’ | cut -d “/” -f 1 This will list the following results. mail.yehey.com ssh.yehey.com beta.yehey.com . . Another options. $ grep -o ‘[^/]*\.yehey\.com’ index.html | sort -u > list.txt $ cat list.txt mail.yehey.com ssh.yehey.com beta.yehey.com . . Different command parameters, same results. This topic was modified 1 year, 5 months ago by Support @QUE.COM. December 10, 2022 at 3:03 am #52101 Support @QUE.COMKeymaster A single command to search for hosts. $ for ip in $(cat list.txt); do $ip.que.com; done. // this is to automate listing sub-host of que.com domain. list.txt contains the following hosts. web ftp test server1 Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Connect with Login with Google Prove your humanity 8 + 4 = Log In