#!/usr/bin/python

import sys
from lib.bot import *
from lib.utils import *
from lib.event import *
from lib.cache import *
import time

class MalwareDomainsBot(Bot):

    def process(self):
        url = "http://www.malwaredomainlist.com/updatescsv.php"
        report = fetch_url(url, timeout = 60.0, chunk_size = 16384)
	rep_ascii = report.decode('ascii', 'ignore')
#       print report
	self.pipeline.send(rep_ascii)


if __name__ == "__main__":
    bot = MalwareDomainsBot(sys.argv[1])
    bot.start()

#!/usr/bin/python

import sys
from lib.bot import *
from lib.utils import *
from lib.event import *
from lib.cache import *
import time

class MalwareDomainsBot(Bot):

    def process(self):
        url = "http://www.malwaredomainlist.com/updatescsv.php"
        report = fetch_url(url, timeout = 60.0, chunk_size = 16384)

	rep_ascii = report.decode('ascii','ignore')
#       [FIXME] crete generic decoder - see above
	self.pipeline.send(rep_ascii)


if __name__ == "__main__":
    bot = MalwareDomainsBot(sys.argv[1])
    bot.start()

Comment added to create generic decode method
Comment added to create generic decode method


Former-commit-id: 256c0f9cfd1ca0c5982ac9ab001c5ced84a02c32