certtools / intelmq

IntelMQ is a solution for IT security teams for collecting and processing security feeds using a message queuing protocol.
https://docs.intelmq.org/latest/
GNU Affero General Public License v3.0
977 stars 296 forks source link

phishtank parser error #477

Closed pedromreis closed 8 years ago

pedromreis commented 8 years ago
2016-04-14 12:00:39,175 - phishtank-parser - ERROR - Bot has found a problem.
Traceback (most recent call last):
  File "/home/intelmq/intelmq-src/intelmq/lib/bot.py", line 102, in start
    self.process()
  File "/home/intelmq/intelmq-src/intelmq/bots/parsers/phishtank/parser.py", line 31, in process
    for row in csv.parser(io.StringIO(raw_report)):
AttributeError: 'module' object has no attribute 'parser'
2016-04-14 12:00:39,176 - phishtank-parser - INFO - Last Correct Message(event): None.
2016-04-14 12:00:39,233 - phishtank-parser - INFO - Current Message(event): {'feed.accuracy': 100.0, 'feed.url': 'https://data.phishtank.com/data/08c691acc69fe55455fba41ccf4ee354e8357b2461538d01dbf631da0a9a7dd6/online-valid.csv', 'time.observation': '2016-04-14T11:00:38+00:00', 'feed.name': 'Phishtank', 'raw': 'cGhpc2hfaWQsdXJsLHBoaXNoX2RldGFpbF91cmwsc3VibWlzc2lvbl90aW1lLHZlcmlmaWVkLHZlcmlmaWNhdGlvbl90aW1lLG9ubGluZSx0YXJnZXQKMzk2Nzc5OSxodHRwOi8vaW50ZXJuZXRiYW5raW5nLmluZi5ici8uLi4vYWNlc3NvLy4uLi9jYWQucGhwLGh0dHA6Ly93d3cucGhpc2h0YW5rLmNvbS9waGlzaF9

Maybe change for row in csv.parser(io.StringIO(raw_report)): to for row in csv.DictReader(io.StringIO(raw_report)):

in phishtank/parser.py ? will try later.

sebix commented 8 years ago

Thanks, fixed in master.

This bot does not use the dict reader, it has the columns hardcoded. I actually never tested it, because it's private.

pedromreis commented 8 years ago

Ok :) im not a programmer so bare with my "sugestions" heheh On 14 Apr 2016 14:40, "Sebastian" notifications@github.com wrote:

Thanks, fixed in master.

This bot does not use the dict reader, it has the columns hardcoded. I actually never tested it, because it's private.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/certtools/intelmq/issues/477#issuecomment-209946804