+ if (a > 0):
+ logger.debug("found the following requests: " + str(files))
+ files = addtag(files, 'code')
+ files = orderbyfreq(files)
+ files = truncl(files, CMDNO)
+ writedata(str(a) + " requests", files)
+ if (ips != None):
+ logger.debug("found the following ips: " + str(ips))
+ ips = addtag(ips, 'code')
+ ips = orderbyfreq(ips)
+ n_ip = str(len(ips))
+ ips = truncl(ips, CMDNO)
+ writedata(n_ip + " unique clients", ips)
+ if (useragents != None):
+ logger.debug("found the following useragents: " + str(useragents))
+ useragents = addtag(useragents, 'code')
+ useragents = orderbyfreq(useragents)
+ n_ua = str(len(useragents))
+ useragents = truncl(useragents, CMDNO)
+ writedata(n_ua + " unique devices", useragents)