Update conf management
This commit is contained in:
		| @@ -5,8 +5,8 @@ from iplugin import IPlugin | ||||
| from display import * | ||||
|  | ||||
| class IWLADisplayTopVisitors(IPlugin): | ||||
|     def __init__(self, iwla): | ||||
|         super(IWLADisplayTopVisitors, self).__init__(iwla) | ||||
|     def __init__(self, iwla, conf): | ||||
|         super(IWLADisplayTopVisitors, self).__init__(iwla, conf) | ||||
|         self.API_VERSION = 1 | ||||
|         self.requires = ['IWLAPostAnalysisTopVisitors'] | ||||
|  | ||||
|   | ||||
| @@ -1,11 +1,18 @@ | ||||
| import socket | ||||
|  | ||||
| from iwla import IWLA | ||||
| from iplugin import IPlugin | ||||
|  | ||||
| class IWLAPostAnalysisReverseDNS(IPlugin): | ||||
|     def __init__(self, iwla): | ||||
|         super(IWLAPostAnalysisReverseDNS, self).__init__(iwla) | ||||
|     def __init__(self, iwla, conf): | ||||
|         super(IWLAPostAnalysisReverseDNS, self).__init__(iwla, conf) | ||||
|         self.API_VERSION = 1 | ||||
|  | ||||
|     def load(self): | ||||
|         timeout = self.getConfValue('reverse_dns_timeout', 0.5) | ||||
|         socket.setdefaulttimeout(timeout) | ||||
|         return True | ||||
|          | ||||
|     def hook(self, iwla): | ||||
|         hits = iwla.getValidVisitors() | ||||
|         for (k, hit) in hits.items(): | ||||
|   | ||||
| @@ -2,8 +2,8 @@ from iwla import IWLA | ||||
| from iplugin import IPlugin | ||||
|  | ||||
| class IWLAPostAnalysisTopVisitors(IPlugin): | ||||
|     def __init__(self, iwla): | ||||
|         super(IWLAPostAnalysisTopVisitors, self).__init__(iwla) | ||||
|     def __init__(self, iwla, conf): | ||||
|         super(IWLAPostAnalysisTopVisitors, self).__init__(iwla, conf) | ||||
|         self.API_VERSION = 1 | ||||
|  | ||||
|     def hook(self, iwla): | ||||
|   | ||||
| @@ -6,8 +6,8 @@ from iplugin import IPlugin | ||||
| from awstats_robots_data import awstats_robots | ||||
|  | ||||
| class IWLAPreAnalysisRobots(IPlugin): | ||||
|     def __init__(self, iwla): | ||||
|         super(IWLAPreAnalysisRobots, self).__init__(iwla) | ||||
|     def __init__(self, iwla, conf): | ||||
|         super(IWLAPreAnalysisRobots, self).__init__(iwla, conf) | ||||
|         self.API_VERSION = 1 | ||||
|  | ||||
|     def load(self): | ||||
|   | ||||
| @@ -7,8 +7,8 @@ from iplugin import IPlugin | ||||
|  | ||||
| class IWLAPreAnalysisSoutade(IPlugin): | ||||
|  | ||||
|     def __init__(self, iwla): | ||||
|         super(IWLAPreAnalysisSoutade, self).__init__(iwla) | ||||
|     def __init__(self, iwla, conf): | ||||
|         super(IWLAPreAnalysisSoutade, self).__init__(iwla, conf) | ||||
|         self.API_VERSION = 1 | ||||
|  | ||||
|     def load(self): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user