Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added logging to the profiler #237

Closed
wants to merge 1 commit into from
Closed

Conversation

sookyp
Copy link
Contributor

@sookyp sookyp commented May 15, 2015

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

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.42% when pulling 5a135c5 on sookyp:profiler into 0b1c062 on glastopf:master.

@glaslos
Copy link
Member

glaslos commented May 21, 2015

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'

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.41% when pulling 009c29a on sookyp:profiler into 0b1c062 on glastopf:master.

@glaslos
Copy link
Member

glaslos commented Jul 14, 2015

@sookyp can you rebase?

Removed leftovers

Added profiler section
@katkad
Copy link
Member

katkad commented Jul 20, 2015

rebased. but some tests are failing

@katkad
Copy link
Member

katkad commented Aug 7, 2015

rather verbose, but it works

the failing test_honeypot.py fails also on master on my computer

@katkad
Copy link
Member

katkad commented Aug 10, 2015

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

@glaslos
Copy link
Member

glaslos commented Aug 10, 2015

@katkad
Copy link
Member

katkad commented Aug 10, 2015

@katkad katkad mentioned this pull request Aug 10, 2015
@katkad
Copy link
Member

katkad commented Oct 21, 2015

finaly in master f1842ba

@katkad katkad closed this Oct 21, 2015
@katkad katkad mentioned this pull request Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants