-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathtesthandler.py
More file actions
21 lines (18 loc) · 811 Bytes
/
testhandler.py
File metadata and controls
21 lines (18 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def init():
"""Optional function to initialize plugin.
"""
print "TestHandler initialized."
def handle(request,response):
"""Optional function called with the request and response that will be sent in
in response to the query. This is called within the DNSChef thread, so any
long precessing should be spawned into another thread.
:param request: dnslib.DNSRecord for the request
:param response: dnslib.DNSRecord for the response
The return value from this function will be sent in response to the query.
"""
print "in handle."
print "--------------------------- request ----------------------------"
print repr(request)
print "--------------------------- response ----------------------------"
print repr(response)
return response