I'm writing a recon shell script and I would like to parse the output of odat sidguesser so i can save only the found SID's into a file or variable. For example. I have the string;
[+] SIDs found on the 10.10.10.82:1521 server: XE,XEXDB
What I'm trying to do is parse this output so only XE,XEXDB remains so I can store it in a file or variable to further enumerate / run odat passwordguesser with the SID. How can i use sed or awk or grep etc... to get all valid SID's without knowing how many will be found? I'm able to get the SID's by doing,
cat oracle-sid.txt | grep "server:" | rev | cut -d " " -f 1 | rev
This works for my purposes since XE,XEXDB is all considered 1 string and i can write more logic to loop through it etc.... However, In the case where the SID's were separated by spaces, How would one go about parsing every SID or string after the word/delimeter, "server:" ?