Closed sookyp closed 9 years ago
Repository health decreased by 0.42% when pulling 5a135c5 on sookyp:profiler into 0b1c062 on glastopf:master.
Traceback (most recent call last):
File "/home/travis/build/glastopf/glastopf/glastopf/testing/test_honeypot.py", line 57, in test_honeypot_mongo
self.glastopf = GlastopfHoneypot(work_dir=self.tmpdir, config=config_file)
File "/home/travis/build/glastopf/glastopf/glastopf/glastopf.py", line 83, in __init__
self.profiler_available = conf_parser.getboolean("profiler", "enabled")
File "/usr/lib/python2.7/ConfigParser.py", line 368, in getboolean
v = self.get(section, option)
File "/usr/lib/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
NoSectionError: No section: 'profiler'
Repository health decreased by 0.41% when pulling 009c29a on sookyp:profiler into 0b1c062 on glastopf:master.
@sookyp can you rebase?
rebased. but some tests are failing
rather verbose, but it works
the failing test_honeypot.py fails also on master on my computer
yep, there is an error:
Traceback (most recent call last):
File "/home/travis/build/mushorg/glastopf/glastopf/testing/test_honeypot.py", line 63, in test_honeypot_mongo
sensor_address)
File "/home/travis/build/mushorg/glastopf/glastopf/glastopf.py", line 273, in handle_request
self.profiler.handle_event(attack_event)
File "/home/travis/build/mushorg/glastopf/glastopf/modules/processing/profiler.py", line 51, in handle_event
ip_profile = self.create_new_profile(source_ip)
File "/home/travis/build/mushorg/glastopf/glastopf/modules/processing/profiler.py", line 176, in create_new_profile
if self.fetch_as_number(ip_profile):
File "/home/travis/build/mushorg/glastopf/glastopf/modules/processing/profiler.py", line 128, in fetch_as_number
'.origin.asn.cymru.com', 'TXT'], stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I found this http://stackoverflow.com/questions/24306205/file-not-found-error-when-launching-a-subprocess but solution comes with BIG warning https://docs.python.org/2/library/subprocess.html#frequently-used-arguments I'd rather avoid it if there's other way.
Attempting to fix issue #26. Besides stdout logging, it also stores/retrieves the comments in a similar way like the former glastopf/modules/reporting/log_postgresql.py