diff options
author | denpamusic <denpa@netfleet.space> | 2019-09-18 18:29:43 +0300 |
---|---|---|
committer | denpamusic <denpa@netfleet.space> | 2019-09-18 18:29:43 +0300 |
commit | edb449b3b936b8721e891d7552647a0d19b84e20 (patch) | |
tree | 40608235dd8b8c0ffde8e714c051af6c7c1ce624 /test/functional/util | |
parent | 1a64f6be2c5e8e5177ec157df737b8db96ea9ec0 (diff) | |
download | rspamd-edb449b3b936b8721e891d7552647a0d19b84e20.tar.gz rspamd-edb449b3b936b8721e891d7552647a0d19b84e20.zip |
[Minor] Fix typos in p0f plugin
- Improved tests to include cached response cases
- Changed default socket location to /var/run/p0f as per @moisseev recommendation
Diffstat (limited to 'test/functional/util')
-rwxr-xr-x | test/functional/util/dummy_p0f.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/util/dummy_p0f.py b/test/functional/util/dummy_p0f.py index e44844812..d780bdb0d 100755 --- a/test/functional/util/dummy_p0f.py +++ b/test/functional/util/dummy_p0f.py @@ -28,23 +28,23 @@ class MyStreamHandler(socketserver.BaseRequestHandler): self.data = self.request.recv(21).strip() - if self.server.p0f_status == 'fail': + if self.server.p0f_status == 'bad_response': response = 0 else: response = struct.pack( "IbIIIIIIIhbb32s32s32s32s32s32s", - 0x50304602, # magic + 0x50304602, # magic S[self.server.p0f_status], # status 1568493408, # first_seen 1568493408, # last_seen 1, # total_conn 1, # uptime_min - 4, # up_mod_days + 4, # up_mod_days 1568493408, # last_nat 1568493408, # last_chg 10, # distance 0, # bad_sw - 0, # os_match_q + 0, # os_match_q OS[self.server.p0f_os][0], # os_name OS[self.server.p0f_os][1], # os_flavor '', # http_name @@ -61,7 +61,7 @@ def cleanup(SOCK): try: os.unlink(SOCK) except OSError: - logging.warning("Could not unlink socket %s", SOCK) + print "Could not unlink socket: " + SOCK if __name__ == "__main__": SOCK = '/tmp/p0f.sock' |