Skip to content

Instantly share code, notes, and snippets.

@kyleterry
Created August 12, 2011 23:09
Show Gist options
  • Save kyleterry/1143192 to your computer and use it in GitHub Desktop.
Save kyleterry/1143192 to your computer and use it in GitHub Desktop.
import time
import redis
import feedparser
channels = ('hackpark', 'infoforcefeed',)
def main():
r = redis.Redis()
while True:
feed_items = feedparser.parse("http://www.exploit-db.com/rss.php")
for item in sorted(feed_items['entries'], key=lambda x: x.link):
if item.link in r.smembers('exploit-db_feed'):
continue
r.sadd('exploit-db_feed', item.link)
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