Skip to content

Instantly share code, notes, and snippets.

@kyleterry
Created August 10, 2011 18:24
Show Gist options
  • Save kyleterry/1137699 to your computer and use it in GitHub Desktop.
Save kyleterry/1137699 to your computer and use it in GitHub Desktop.
import time
import redis
import feedparser
channels = ('hackpark', 'infoforcefeed',)
def main():
r = redis.Redis()
feed_items = feedparser.parse("http://www.exploit-db.com/rss.php")
while True:
for item in sorted(feed_items['entries'], key=lambda x: x.id):
if item.id == r.get('last_exploit-db_feed'):
break
r.set('last_exploit-db_feed', item.id)
for channel in channels:
r.publish('#%s_out' % channel,
'[exploit-db] New post: %s: %s' % (item.title, item.link))
time.sleep(2)
time.sleep(60*10)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment