Hey Hey,

I've had a bit of a bout of insomnia tonight, so I decided to create a shell script.

Code:
#!/bin/bash
nc www.antionline.com 80 < get.txt | grep -B 5 "END TEMPLATE: P_activetopicbits -->" > ao.html
html2text -style pretty -nobs -o ao.txt ao.html
cat ao.html | grep showthread | cut -d " " -f 4 | cut -d "\"" -f 2 | cut -d "<" -f 3 | grep http > links.txt
cat ao.html | grep "Today at" | cut -d ">" -f 4 | cut -d "<" -f 1 > title.txt
cat links.txt | cut -d "&" -f 1 > link1.txt
cat links.txt | cut -d "&" -f 2 > link2.txt
counter=1
echo "<?xml version=\"1.0\" ?>" > ao.xml
echo "<rss version=\"2.0\">" >> ao.xml
echo "  <channel>" >> ao.xml
echo "     <title>AO RSS Feed</title>" >> ao.xml
echo "     <link>http://www.antionline.com</link>" >> ao.xml
echo "     <description>Computer Security</description>" >> ao.xml
until [ $counter -eq 20 ]; do
	title=`head -n $counter title.txt | tail -n 1`
	link1=`head -n $counter link1.txt | tail -n 1`
	link2=`head -n $counter link2.txt | tail -n 1`
	echo "          <item>" >> ao.xml
        echo "          <title>$title</title>" >> ao.xml
	echo "          <link>$link1&$link2</link>" >> ao.xml
	echo "          </item>" >> ao.xml
	counter=`expr $counter + 1`
done
echo "  </channel>" >> ao.xml
echo "</rss>" >> ao.xml
As you can see it's a fairly simple shell script (you can download it from http://www.seeminglyrandom.info/ao/script.sh if you wish. Anyways it generates a simple RSS feed with the links off the main page (the first 20). It'll display the title of the thread and a link to the thread. It's nothing fancy, but it took a long time since I've never touched XML before and had to fix parse errors. Anyways it seems to be working.. feel free to use it as you wish. For those of you not interested in generating your own. I have a cron on my website running it every 15 minutes. If my host doesn't complain, I plan on changing it to every 5 minutes. You can access the XML feed from http://www.seeminglyrandom.info/ao/ao.xml.

It's not much but hopefully you'll enjoy it.

Peace,
HT

PS... is this an OK forum to post this in? I figure it's security related (it's AO Headlines and I wanted everyone to know it existed).....