2010
07.31

Using the PyDNS library found in Python Package Index and hosted at SourceForge, some code snippets for usage:

>>> import DNS
>>> DNS.DiscoverNameServers()
>>> reqobj = DNS.Request(name="blog.rayfoo.info")
>>> resp = reqobj.req()

>>> for i in resp.answers: print i
... 
{'name': 'blog.rayfoo.info', 'data': '74.207.229.183',
'typename': 'A', 'classstr': 'IN', 'ttl': 1790, 'type': 1,
'class': 1, 'rdlength': 4}

>>> resp.show()
; <<>> PDG.py 1.0 <<>> blog.rayfoo.info 1
;; options: recurs
;; got answer:
;; ->>HEADER<<- opcode 0, status NOERROR, id 60299
;; flags: qr rd ra; Ques: 1, Ans: 1, Auth: 0, Addit: 0
;; QUESTIONS:
;;      blog.rayfoo.info, type = A, class = IN

;; ANSWERS:
blog.rayfoo.info        1790    A       74.207.229.183

;; AUTHORITY RECORDS:

;; ADDITIONAL RECORDS:

;; Total query time: 367 msec
;; To SERVER: <sanitized>
;; WHEN: Sat Jul 31 11:06:24 2010

>>> resp.args
{'protocol': 'udp', 'name': 'blog.rayfoo.info',
'server': '<sanitized>', 'rd': 1, 'opcode': 0,
'timeout': 30, 'timing': 1, 'elapsed': 367.52486228942871,
'qtype': 1, 'port': 53}
2010
07.30

Restarting learning of Python for upcoming project, stay tuned.

2010
07.27

Disappointed with this world, where everyone is so focused on him/herself that only things get noticed when 1) it’s done by him/herself, especially when extraordinary, and 2) it’s not done by someone else who should be doing it, and causes inconvenience to oneself.

That’s the kind of world that gives birth to and rewards those who crow about their own accomplishments every now and then. The more often/louder, the better.

Edit: Aren’t I thinking the same way when I complain? Urgh.