Code:
!#/bin/bash
catdwn=$(cat .dwn.txt)
catdwnf=$(cat .dwnf.txt)
clear
echo "This tool searches content from realchacker.net using lynx and realhacker.net/sitemap.xml, all respect intended. Your search may not include all content, this depends on when the sitemap was last updated. Lynx must be i$
sleep 12
clear
echo "Retrieving Data......"
lynx -dump "http://www.realhacker.net/sitemap.xml" | grep -o "http:.*" >.srch.txt
clear
echo "Got It"
sleep 2
clear
echo "What would you like me to search for you?"
read srch
echo "Results"
grep "$srch" .srch.txt
echo "Please enter the URL from above that you want me to use."
read url
clear
echo "Thank you, what would you like done with this URL? I can do one of the following two options: l = Open in lynx, d = If the URL contains a file your interested in, I can download this for you using wget. Please enter the$
read actn
clear
if [ "$actn"="l" ];
then
echo "Opening URL in lynx, I am not responsible for what you do with this information. I suggest you get explicit permision from the owner of any hardware and or software you may be tampering with, enjoy!"
sleep 5
lynx "$url"
fi
if [ "$actn"="d" ];
then
echo "Downloading file using wget, I am not responsible for what you do with this file. I suggest you get explicit permision from the owner of any hardware and or software you may be tampering with, enjoy!"
sleep 5
lynx -dump "$url" | grep -o "http://packetstormsecurity.org/files/.*" >.dwn.txt | cat .dwn.txt | lynx -dump "$catdwn" | grep -o "http://packetstormsecurity.org/files/download/.*" >.dwnf.txt | wget "$catdwnf"
fi
script breaks after second pipe in bottom if/then statement. also first if/then runs no matter if second if/then is selected with d option or not...those $'s arent really there in echo's nano broke off that text