WIP
This commit is contained in:
parent
751a9b3fae
commit
4f1c09867d
5
iwla.py
5
iwla.py
|
@ -25,7 +25,8 @@ from display import *
|
||||||
# Parse Log, compute them, call plugins and produce output
|
# Parse Log, compute them, call plugins and produce output
|
||||||
# For now, only HTTP log are valid
|
# For now, only HTTP log are valid
|
||||||
#
|
#
|
||||||
# Plugin requirements : None
|
# Plugin requirements :
|
||||||
|
# None
|
||||||
#
|
#
|
||||||
# Conf values needed :
|
# Conf values needed :
|
||||||
# analyzed_filename
|
# analyzed_filename
|
||||||
|
@ -582,7 +583,7 @@ class IWLA(object):
|
||||||
print '==> Load previous database'
|
print '==> Load previous database'
|
||||||
|
|
||||||
self.meta_infos = self._deserialize(conf.META_PATH) or self._clearMeta()
|
self.meta_infos = self._deserialize(conf.META_PATH) or self._clearMeta()
|
||||||
if self.meta_infos['last_time']:
|
if 'last_time' in self.meta_infos.keys():
|
||||||
self.current_analysis = self._deserialize(self.getDBFilename(self.meta_infos['last_time'])) or self._clearVisits()
|
self.current_analysis = self._deserialize(self.getDBFilename(self.meta_infos['last_time'])) or self._clearVisits()
|
||||||
else:
|
else:
|
||||||
self._clearVisits()
|
self._clearVisits()
|
||||||
|
|
|
@ -11,11 +11,11 @@ import awstats_data
|
||||||
#
|
#
|
||||||
# Extract referers and key phrases from requests
|
# Extract referers and key phrases from requests
|
||||||
#
|
#
|
||||||
# Plugin requirements : None
|
# Plugin requirements :
|
||||||
|
# None
|
||||||
#
|
#
|
||||||
# Conf values needed :
|
# Conf values needed :
|
||||||
# page_to_hit_conf*
|
# domain_name
|
||||||
# hit_to_page_conf*
|
|
||||||
#
|
#
|
||||||
# Output files :
|
# Output files :
|
||||||
# None
|
# None
|
||||||
|
@ -24,9 +24,18 @@ import awstats_data
|
||||||
# None
|
# None
|
||||||
#
|
#
|
||||||
# Statistics update :
|
# Statistics update :
|
||||||
# visits :
|
# month_stats :
|
||||||
# remote_addr =>
|
# referers =>
|
||||||
# robot
|
# pages
|
||||||
|
# hits
|
||||||
|
# robots_referers =>
|
||||||
|
# pages
|
||||||
|
# hits
|
||||||
|
# search_engine_referers =>
|
||||||
|
# pages
|
||||||
|
# hits
|
||||||
|
# key_phrases =>
|
||||||
|
# phrase
|
||||||
#
|
#
|
||||||
# Statistics deletion :
|
# Statistics deletion :
|
||||||
# None
|
# None
|
||||||
|
|
|
@ -3,6 +3,33 @@ import socket
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
|
#
|
||||||
|
# Post analysis hook
|
||||||
|
#
|
||||||
|
# Replace IP by reverse DNS names
|
||||||
|
#
|
||||||
|
# Plugin requirements :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
# Conf values needed :
|
||||||
|
# reverse_dns_timeout*
|
||||||
|
#
|
||||||
|
# Output files :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
# Statistics creation :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
# Statistics update :
|
||||||
|
# valid_visitors:
|
||||||
|
# remote_addr
|
||||||
|
# dns_name_replaced
|
||||||
|
# dns_analyzed
|
||||||
|
#
|
||||||
|
# Statistics deletion :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
|
||||||
class IWLAPostAnalysisReverseDNS(IPlugin):
|
class IWLAPostAnalysisReverseDNS(IPlugin):
|
||||||
DEFAULT_DNS_TIMEOUT = 0.5
|
DEFAULT_DNS_TIMEOUT = 0.5
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,32 @@ import re
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
|
#
|
||||||
|
# Post analysis hook
|
||||||
|
#
|
||||||
|
# Count TOP downloads
|
||||||
|
#
|
||||||
|
# Plugin requirements :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
# Conf values needed :
|
||||||
|
# reverse_dns_timeout*
|
||||||
|
#
|
||||||
|
# Output files :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
# Statistics creation :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
# Statistics update :
|
||||||
|
# month_stats:
|
||||||
|
# top_downloads =>
|
||||||
|
# uri
|
||||||
|
#
|
||||||
|
# Statistics deletion :
|
||||||
|
# None
|
||||||
|
#
|
||||||
|
|
||||||
class IWLAPostAnalysisTopDownloads(IPlugin):
|
class IWLAPostAnalysisTopDownloads(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
super(IWLAPostAnalysisTopDownloads, self).__init__(iwla)
|
super(IWLAPostAnalysisTopDownloads, self).__init__(iwla)
|
||||||
|
|
|
@ -7,7 +7,8 @@ from iplugin import IPlugin
|
||||||
# Pre analysis hook
|
# Pre analysis hook
|
||||||
# Change page into hit and hit into page into statistics
|
# Change page into hit and hit into page into statistics
|
||||||
#
|
#
|
||||||
# Plugin requirements : None
|
# Plugin requirements :
|
||||||
|
# None
|
||||||
#
|
#
|
||||||
# Conf values needed :
|
# Conf values needed :
|
||||||
# page_to_hit_conf*
|
# page_to_hit_conf*
|
||||||
|
|
|
@ -10,7 +10,8 @@ import awstats_data
|
||||||
#
|
#
|
||||||
# Filter robots
|
# Filter robots
|
||||||
#
|
#
|
||||||
# Plugin requirements : None
|
# Plugin requirements :
|
||||||
|
# None
|
||||||
#
|
#
|
||||||
# Conf values needed :
|
# Conf values needed :
|
||||||
# page_to_hit_conf*
|
# page_to_hit_conf*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user