Re: unescaped double quotes in TXT record
Hugo Monteiro <[email protected]> Tue, 25 May 2010 14:36:48 +0100
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
On 05/25/2010 02:12 PM, Daryl Tester wrote: > Hugo Monteiro wrote: > >>> (And yippee, another protocol overloading the TXT record). > >> Looks like it, but the question now is: Is there any way to solve >> this?... probably a well crafted generic record can do it.. > > Heck yeah. If you don't want to figure it out by hand, your dnsq of the > bind server gave you the answer you need - > >>>> $ dnsq txt xerox_phaser_6130n._ipp._tcp.dev.hmonteiro.net >>>> 192.168.56.103 >>>> 16 xerox_phaser_6130n._ipp._tcp.dev.hmonteiro.net: >>>> 212 bytes, 1+1+1+1 records, response, authoritative, weird ra, noerror >>>> query: 16 xerox_phaser_6130n._ipp._tcp.dev.hmonteiro.net >>>> answer: xerox_phaser_6130n._ipp._tcp.dev.hmonteiro.net 604800 16 >>>> \007qtotl=1\026rp=printers/xerox6130n\025ty=Xerox\040Phaser\0406130N\026product=(Phaser\0406130N)\032pdl=application/postscript >>> > > Cut 'n' paste that answer line into your data file (subbing testernet > for your > domain) (bear in mind I've mixed up your xerox with your hp - no matter). > # :fqdn:n:rdata:ttl:timestamp:lo > :hp_4050._ipp._tcp.testernet:16:\007qtotl=1\026rp=printers/xerox6130n\025ty=Xerox > Phaser 6130N\026product=(Phaser > 6130N)\032pdl=application/postscript:86400 > > Then dig should give the following answer ... > > # dig txt hp_4050._ipp._tcp.testernet @127.0.0.1 > (trimmed) > ;; ANSWER SECTION: > hp_4050._ipp._tcp.testernet. 86400 IN TXT "qtotl=1" > "rp=printers/xerox6130n" "ty=Xerox Phaser 6130N" "product=(Phaser > 6130N)" "pdl=application/postscript" > > Lookie there, more phantom dig-induced quotes. At least they appear to > be positioned appropriately. A Perl/Python/Scripting-language-of-choice > script to generate octal key/value lengths should be relatively > straightforward, and left as an exercise to the reader. :-) > > Cheers. > > Looks dandy to me. =) Again thanks for your input. Best Regards, Hugo Monteiro. -- fct.unl.pt:~# cat .signature Hugo Monteiro Email : [email protected] Telefone : +351 212948300 Ext.15307 Web : http://hmonteiro.net Divisão de Informática Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa Quinta da Torre 2829-516 Caparica Portugal Telefone: +351 212948596 Fax: +351 212948548 www.fct.unl.pt [email protected] fct.unl.pt:~# _