As part of an assignment for a security class we are simulating a kaminski attack on a dns server we create ourselves. I'm using DNSLIB for python to generate the falsified DNS responses. Only problem is it looks like the default ttl is 0 which doesn't help when the goal is to poison the cache. I suspect you can specify a different ttl but can't find how to do it. Below is an example code for creating a dns response packet (taken from the dnslib site):
>>> d = DNSRecord(DNSHeader(qr=1,aa=1,ra=1), q=DNSQuestion("abc.com"), a=RR("abc.com",rdata=A("1.2.3.4")))
>>> print d
any ideas how to change the above code to specify a different ttl?