Closed howmp closed 8 years ago
def log_request(self, handler, request): domain = request.q.qname.__str__() if domain.endswith(settings.DNS_DOMAIN + '.'): udomain = re.search( r'\.?([^\.]+)\.%s\.' % settings.DNS_DOMAIN, domain) if udomain: user = User.objects.filter(udomain__exact=udomain.group(1)) if user: dnslog = DNSLog( user=user[0], host=domain, type=QTYPE[request.q.qtype]) dnslog.save()
正则无法匹配xxxxx.dnslog.link,因为之前的正则是\.([^\.]+)\.dnslog.link\.
\.([^\.]+)\.dnslog.link\.
正则无法匹配xxxxx.dnslog.link,因为之前的正则是
\.([^\.]+)\.dnslog.link\.