<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-660024223227219722</id><updated>2012-02-06T15:27:36.576+01:00</updated><category term='space'/><category term='日本'/><category term='日本語'/><category term='photos'/><category term='norsk'/><title type='text'>Use of words</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://useofwords.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3443240555251026690</id><published>2012-02-06T15:27:00.000+01:00</published><updated>2012-02-06T15:27:36.579+01:00</updated><title type='text'>dnstool - curses-based DNS zone administration</title><content type='html'>Out now! Get it while the bits are still hot!&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/Redpill-Linpro/dnstool"&gt;https://github.com/Redpill-Linpro/dnstool&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Fine Manual is plain text and even has screenshots, perfect for the old-school lynx enthusiast ;)&lt;br /&gt;&lt;br /&gt;If your dns server supports RFC2136 dynamic updates, you might want to look at this. BIND9 does.&lt;br /&gt;&lt;br /&gt;Patches always welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3443240555251026690?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3443240555251026690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3443240555251026690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3443240555251026690'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2012/02/dnstool-curses-based-dns-zone.html' title='dnstool - curses-based DNS zone administration'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-1189157706696280486</id><published>2011-10-17T18:14:00.002+02:00</published><updated>2011-10-17T19:11:02.889+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='norsk'/><title type='text'>Terra firma</title><content type='html'>Ok.&lt;br /&gt;&lt;br /&gt;Jeg har i dag oppdatert firmware - på ei mus.&lt;br /&gt;&lt;br /&gt;Når ble de lure nok til å trenge firmware? Antagelig sammen med led/optikk-variantene.&lt;br /&gt;&lt;br /&gt;Og hva hindrer dem fra å gro et virtuelt keyboard om natta og bedrive bruteforcing av passordet mitt? Ingenting jeg vet om.&lt;br /&gt;&lt;br /&gt;(Ok, feedback er et problem. Men det fins usb skjermkort... :p)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-1189157706696280486?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=1189157706696280486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1189157706696280486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1189157706696280486'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2011/10/terra-firma.html' title='Terra firma'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3867856879101259818</id><published>2011-08-17T15:23:00.000+02:00</published><updated>2011-08-17T15:23:52.519+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='norsk'/><category scheme='http://www.blogger.com/atom/ns#' term='日本語'/><title type='text'>Verbbøyingsgalskap</title><content type='html'>Japansk er fleksibelt og komplisert. La oss ta et tilfeldig verb, taberu - å spise.&lt;br /&gt;&lt;br /&gt;For det første er ikke ordbok-formen av verbet infinitiv på japansk. Ordbokformen av verbet er "uformell ikke-fortid" - kan hende det skjer omtrent nå, kan hende en bare har vage planer om det en gang i fremtiden, men det er iallfall ikke ferdig med å skje.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Watashi wa niku ga taberu."&lt;/i&gt; - Jeg spiser kjøtt. Temmelig generell og uformell vending. Om du allerede snakker om deg selv og det du liker, vil du vanligvis sløyfe de to første ordene. &lt;i&gt;"Niku ga taberu."&lt;/i&gt; - Spiser kjøtt.&lt;br /&gt;&lt;br /&gt;Det er uformelt, dog. I høflig samtale med folk du ikke kjenner godt, vil du vanligvis bruke en normalt høflig form. &lt;i&gt;"Niku ga tabemasu."&lt;/i&gt; (uttales "Niku ga tabemas".)&lt;br /&gt;&lt;br /&gt;Men hvis du vanligvis ikke spiser kjøtt, vil du kanskje uttrykke det. &lt;i&gt;"Niku ga tabemasen."&lt;/i&gt; - Spiser ikke kjøtt. Å bøye verb i positive og negative former er en typisk japansk ting. Fremdeles en veldig generell vending.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabetai desu."&lt;/i&gt; - Har lyst til å spise kjøtt. Her er verbet gjort om til et adjektiv "lyst til å spise", mens "desu" = har.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabete mimasu."&lt;/i&gt; - Kan prøve å spise kjøtt og se hvordan det går. Her er du usikker på om dette er noe for deg. "Mimasu" er høflig ikkefortid av "å se", her som hjelpeverb.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabete mitai desu."&lt;/i&gt; - Har lyst til å prøve å spise kjøtt og se hvordan det går. Kombinasjon av de to over.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabete imasu."&lt;/i&gt; - Spiser kjøtt akkurat nå. "-te imasu" er noe ala "am -ing"-form på engelsk.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabete iru hito."&lt;/i&gt; - Personen som spiser kjøtt akkurat nå. "Iru" er den ikke-høflige kortformen av "imasu", når du bruker en hel frase som et adjektiv så brukes korte bøyinger.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabemashou."&lt;/i&gt; - La oss spise kjøtt! Høflig men direkte.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabemasen ka."&lt;/i&gt; - Skal vi ikke spise kjøtt? Indirekte invitt, høfligere.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga taberaremasen."&lt;/i&gt; - Kan ikke spise kjøtt. Potensiell, høflig ikkefortid, negativ form.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabemashita."&lt;/i&gt; - Har spist kjøtt.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku wa tabeta koto ga arimasen."&lt;/i&gt; - Har aldri spist kjøtt. Uformell fortid pga. hjelpeordene etterpå. En mer klumpete og direkte oversettelse blir "Erfaringen å ha spist kjøtt, har jeg ikke."&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku wa tabenai tsumori desu."&lt;/i&gt; - Har ikke planer om å spise kjøtt. Negativ uformell ikkefortid + hjelpeord.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku wa tabenakute wa ikemasen."&lt;/i&gt; - Må spise kjøtt. ("Kan da ikke la være å spise...")&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabeta hou ga ii desu."&lt;/i&gt; - Bør spise kjøtt. Formaning, "Det er bedre (for deg/meg) å..."&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"Niku ga tabesugite wa ikemasen."&lt;/i&gt; - Ikke forspis deg på kjøtt. Her er taberu blitt til det sammensatte verbet tabesugiru, der -sugiru betyr "for mye".&lt;br /&gt;&lt;br /&gt;... og jeg har fremdeles bare såvidt begynt på Genki II. Mange flere sammensetninger og former ligger på lur og venter. Og taberu er et enkelt, regulært verb i forhold til mange andre.&lt;br /&gt;&lt;br /&gt;Det er da litt gøy. :)&lt;br /&gt;&lt;br /&gt;また、ね！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3867856879101259818?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3867856879101259818' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3867856879101259818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3867856879101259818'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2011/08/verbbyingsgalskap.html' title='Verbbøyingsgalskap'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-1804460843923750397</id><published>2010-12-21T14:15:00.001+01:00</published><updated>2010-12-21T16:34:15.639+01:00</updated><title type='text'>Transport layer protocols for stealth and evil</title><content type='html'>Ever tested some of the more exotic transport protocols?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SCTP&lt;/b&gt; is interesting ... multihoming means you can have several ips involved on each side of a connection (association in sctp speak) ... so when you move from wired to wireless your ssh session still is fine. If you find a proper SCTP ssh, of course.&lt;br /&gt;&lt;br /&gt;Testing it on Ubuntu LTS, though, using socat for glue... a listening SCTP socket is invisible in netstat -ln. Fun. tcp, udp, raw sockets are visible ... but sctp isn't.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;socat SCTP-LISTEN:8080,fork TCP-CONNECT:localhost:22&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Nice, stealthy backdoor. Does not show in &lt;b&gt;netstat(8)&lt;/b&gt; or &lt;b&gt;ss(8)&lt;/b&gt;. Combine with socat TCP-LISTEN:2223 SCTP-CONNECT:localhost:8080 on a remote host and we have a completely stealthy tunnel, if the firewall is mildly clue-challenged.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;knan@ip:~$ netstat -ln&lt;br /&gt;Active Internet connections (only servers)&lt;br /&gt;Proto Recv-Q Send-Q Local Address           Foreign Address         State      &lt;br /&gt;tcp        0      0 0.0.0.0:4949            0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     &lt;br /&gt;udp        0      0 0.0.0.0:68              0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:36558           0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:5353            0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:631             0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:45561           0.0.0.0:*                          &lt;br /&gt;knan@ip:~$ &lt;/pre&gt;&lt;br /&gt;lsof reports a mysterious socket. But it also does that for udev and update-manager, so that's hardly conclusive.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;knan@ip:~$ lsof | grep socat | grep sock&lt;br /&gt;socat     24969       knan    3u     sock                0,6      0t0     645716 can't identify protocol&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;The only place I've dug out useful info so far is from procfs.&lt;br /&gt;&lt;pre&gt;knan@ip:~$ cat /proc/net/sctp/eps &lt;br /&gt; ENDPT     SOCK   STY SST HBKT LPORT   UID INODE LADDRS&lt;br /&gt;ffff8800722cb800 ffff8800342c8480 2   10  16   8080   1001 645716 0.0.0.0 &lt;/pre&gt;&lt;br /&gt;Hardly easy to read. But it says LADDRS 0.0.0.0, LPORT 8080. Ok.&lt;br /&gt;&lt;br /&gt;(BTW: SCTP not being in netstat is a Debian/Ubuntu-specific bug, SuSE/Red Hat have applied patches.)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sctp_darn(1)&lt;/b&gt; can do more fun sctp-specific stuff, like setting up multiple local and remote addresses for the association.&lt;br /&gt;&lt;br /&gt;Cool enough. But there are other fun transport protocols we can try.&lt;br /&gt;&lt;br /&gt;How about &lt;b&gt;DCCP&lt;/b&gt;? It's connection-oriented and has congestion control but otherwise is UDP-like.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;netsend dccp receive&lt;/tt&gt;&lt;br /&gt;&lt;pre&gt;knan@ip:~$ netstat -ln&lt;br /&gt;Active Internet connections (only servers)&lt;br /&gt;Proto Recv-Q Send-Q Local Address           Foreign Address         State      &lt;br /&gt;tcp        0      0 0.0.0.0:4949            0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     &lt;br /&gt;tcp6       0      0 :::22                   :::*                    LISTEN     &lt;br /&gt;tcp6       0      0 ::1:631                 :::*                    LISTEN     &lt;br /&gt;udp        0      0 0.0.0.0:68              0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:36558           0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:5353            0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:631             0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:45561           0.0.0.0:*&lt;/pre&gt;Netstat still says nothing.&lt;br /&gt;&lt;br /&gt;The only place in /proc/net you find DCCP mentioned is in /proc/net/protocols. Which says nothing about ongoing connections or listening sockets.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;knan@ip:~$ grep -ir DCCP /proc/net/&lt;br /&gt;/proc/net/protocols:DCCP      1400      1      -1   NI    1196   yes  dccp_ipv4   y  y  y  y  y  y  y  y  y  y  y  y  n  n  y  y  y  y  n&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;lsof still says little.&lt;br /&gt;&lt;tt&gt;knan@ip:~$ lsof | grep netsend | grep sock&lt;br /&gt;netsend   25376       knan    3u     sock                0,6      0t0     658124 can't identify protocol&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;ss(8) to the rescue! But  only when you specifically ask it about DCCP sockets with -d.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;knan@ip:~$ ss -ldn&lt;br /&gt;Recv-Q Send-Q                              Local Address:Port                                Peer Address:Port &lt;br /&gt;0      0                                               *:6666                                           *:*     &lt;/pre&gt;&lt;br /&gt;The final protocol I want to propose today is &lt;b&gt;UDP-Lite&lt;/b&gt;. This is basically a UDP variant with partial checksums, for the case when garbled data is better than no data.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;$ netsend udplite receive&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;As usual, netstat tells us nothing of this uncommon activity.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;knan@ip:~$ netstat -ln&lt;br /&gt;Active Internet connections (only servers)&lt;br /&gt;Proto Recv-Q Send-Q Local Address           Foreign Address         State      &lt;br /&gt;tcp        0      0 0.0.0.0:4949            0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     &lt;br /&gt;tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     &lt;br /&gt;tcp6       0      0 :::22                   :::*                    LISTEN     &lt;br /&gt;tcp6       0      0 ::1:631                 :::*                    LISTEN     &lt;br /&gt;udp        0      0 0.0.0.0:68              0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:36558           0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:5353            0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:631             0.0.0.0:*                          &lt;br /&gt;udp        0      0 0.0.0.0:45561           0.0.0.0:*                          &lt;/pre&gt;&lt;br /&gt;This time, though, lsof identifies it!&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;knan@ip:~$ lsof | grep netsend&lt;br /&gt;netsend   25461       knan    3u     IPv4             661633      0t0    UDPLITE *:6666 &lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Which is good, since ss doesn't.&lt;br /&gt;&lt;br /&gt;To summarize (for Ubuntu 10.04 LTS):&lt;br /&gt;&lt;br /&gt;&lt;table border=1&gt;&lt;tr&gt;&lt;th&gt;Protocol&lt;/th&gt;&lt;th&gt;netstat(8)&lt;/th&gt;&lt;th&gt;ss(8)&lt;/th&gt;&lt;th&gt;lsof(8)&lt;/th&gt;&lt;th&gt;/proc/net/*&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SCTP&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;/proc/net/sctp/eps&lt;br /&gt;/proc/net/sctp6/eps&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DCCP&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes (-d)&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;UDP-Lite&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;/proc/net/udplite&lt;br /&gt;/proc/net/udplite6&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;Hope this leaves you entertained by the possibilities. Black hats begone!&lt;br /&gt;&lt;br /&gt;P.S.&lt;br /&gt;&lt;a href="https://bugs.launchpad.net/ubuntu/+source/net-tools/+bug/174858"&gt;launchpad:netstat+sctp&lt;/a&gt;&lt;br /&gt;&lt;a href="https://bugs.launchpad.net/ubuntu/+source/lsof/+bug/692988"&gt;launchpad:lsof+sctp&lt;/a&gt;&lt;br /&gt;&lt;a href="https://bugs.launchpad.net/ubuntu/+source/lsof/+bug/692990"&gt;launchpad:lsof+dccp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-1804460843923750397?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=1804460843923750397' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1804460843923750397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1804460843923750397'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/12/transport-layer-protocols-for-stealth.html' title='Transport layer protocols for stealth and evil'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-4001270902692432643</id><published>2010-12-15T16:10:00.000+01:00</published><updated>2010-12-15T16:10:41.096+01:00</updated><title type='text'>sed for dns hackers</title><content type='html'>(Requires gnu sed)&lt;br /&gt;&lt;br /&gt;Moving to a new set of nameservers is a bit like moving house. Lots of stuff thrown away for reasons of unreasonable antiquity, lots of stuff could do with a refresh and cleanup.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;sed -i.bak '/\(NS\|SOA\)/ s/\bdns1\.example\.org/innerdns1.example.org/g; /\(NS\|SOA\)/ s/\bdns2\.example\.org/innerdns2.example.org/g' master/*&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This simple, pretty oneliner fixes NS and SOA records to point to new addresses, and leaves other records alone - unless you have really unfortunate and awkward capital-letter names in your zones. Add some more \b safeguards if so.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-4001270902692432643?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=4001270902692432643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4001270902692432643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4001270902692432643'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/12/sed-for-dns-hackers.html' title='sed for dns hackers'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-6712758000502661228</id><published>2010-10-28T15:05:00.001+02:00</published><updated>2010-10-28T21:52:17.242+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='日本'/><title type='text'>Japanese WHOIS fun</title><content type='html'>Recently, I wanted to look up info on a Japanese domain name. Being a command-line type of guy, I obviously did $ whois ac.jp and expected things to work out.&lt;br /&gt;&lt;br /&gt;Well, things were a bit less helpful than I'd hoped.&lt;br /&gt;&lt;pre&gt;$ whois ac.jp&lt;br /&gt;Domain Information: [%I%a%$%s&gt;pJs]&lt;br /&gt;a. [%I%a%$%sL&gt;]                 AC.JP&lt;br /&gt;e. [$=$7$-$a$$]&lt;br /&gt;f. [AH?%L&gt;]                     3X=Q%I%a%$%s&lt;br /&gt;g. [Organization]               Academic Domain&lt;br /&gt;k. [AH?%&amp;lt;oJL]&lt;br /&gt;l. [Organization Type]&lt;br /&gt;m. [EPO?C4Ev&amp;lt;T]&lt;br /&gt;n. [5;=QO"MmC4Ev&amp;lt;T]&lt;br /&gt;p. [%M!&lt;%`%5!&lt;%P]               a.dns.jp&lt;br /&gt;p. [%M!&lt;%`%5!&lt;%P]               b.dns.jp&lt;br /&gt;p. [%M!&lt;%`%5!&lt;%P]               c.dns.jp&lt;br /&gt;p. [%M!&lt;%`%5!&lt;%P]               d.dns.jp&lt;br /&gt;p. [%M!&lt;%`%5!&lt;%P]               e.dns.jp&lt;br /&gt;p. [%M!&lt;%`%5!&lt;%P]               f.dns.jp&lt;br /&gt;p. [%M!&lt;%`%5!&lt;%P]               g.dns.jp&lt;br /&gt;[&gt;uBV]                          Reserved&lt;br /&gt;[EPO?G/7nF|]&lt;br /&gt;[@\B3G/7nF|]&lt;br /&gt;[:G=*99?7]                      2005/03/30 17:37:52 (JST)&lt;/pre&gt;While I can figure out what I need here, why the garble? This is 2010 and I'm running in a UTF-8 locale with proper fonts; I should see hiragana/katakana/kanji just fine.&lt;br /&gt;&lt;br /&gt;So I looked up the current &lt;a href="http://tools.ietf.org/html/rfc3912"&gt;WHOIS protocol&lt;/a&gt;. That's probably the shortest RFC I've ever seen.&lt;br /&gt;&lt;br /&gt;The interesting bit: "The WHOIS protocol has no mechanism for indicating the character set in use." ... rrrright. Obviously not UTF-8 on this server.&lt;br /&gt;&lt;br /&gt;Some trial and error, then.&lt;br /&gt;&lt;br /&gt;$ whois ac.jp &gt; gnark.txt&lt;br /&gt;$ file gnark.txt&lt;br /&gt;gnark.txt: ASCII English text, with escape sequences&lt;br /&gt;&lt;br /&gt;Oh thank you. Very helpful. (irritated hacking ensues)&lt;br /&gt;&lt;br /&gt;End product (bash function):&lt;br /&gt;&lt;pre&gt;function jwhois { whois "$@" | iconv -f iso-2022-jp ; }&lt;/pre&gt;&lt;pre&gt;$ jwhois ac.jp&lt;br /&gt;Domain Information: [ドメイン情報]&lt;br /&gt;a. [ドメイン名]                 AC.JP&lt;br /&gt;e. [そしきめい]&lt;br /&gt;f. [組織名]                   学術ドメイン&lt;br /&gt;g. [Organization]            Academic Domain&lt;br /&gt;k. [組織種別]&lt;br /&gt;l. [Organization Type]&lt;br /&gt;m. [登録担当者]&lt;br /&gt;n. [技術連絡担当者]&lt;br /&gt;p. [ネームサーバ]              a.dns.jp&lt;br /&gt;p. [ネームサーバ]              b.dns.jp&lt;br /&gt;p. [ネームサーバ]              c.dns.jp&lt;br /&gt;p. [ネームサーバ]              d.dns.jp&lt;br /&gt;p. [ネームサーバ]              e.dns.jp&lt;br /&gt;p. [ネームサーバ]              f.dns.jp&lt;br /&gt;p. [ネームサーバ]              g.dns.jp&lt;br /&gt;[状態]                        Reserved&lt;br /&gt;[登録年月日]&lt;br /&gt;[接続年月日]&lt;br /&gt;[最終更新]                     2005/03/30 17:37:52 (JST)&lt;/pre&gt;Looks better, yes?&lt;br /&gt;&lt;br /&gt;P.S. This was written using FreeBSD whois. Ubuntu whois acts completely differently - specifically asks for and shows English information in English locales, and breaks interestingly in the Japanese locales I've tested.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-6712758000502661228?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=6712758000502661228' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/6712758000502661228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/6712758000502661228'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/10/japanese-whois-fun.html' title='Japanese WHOIS fun'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-2040978400554369266</id><published>2010-06-24T02:11:00.002+02:00</published><updated>2010-06-24T02:22:43.356+02:00</updated><title type='text'>Wine on Windows...</title><content type='html'>The &lt;a href="http://www.winehq.org/"&gt;Wine&lt;/a&gt; project is preparing the long-awaited 1.2 release for the end of the month.&lt;br /&gt;&lt;br /&gt;Stuff like this should help morale:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.nvidia.com/index.php?showtopic=104636&amp;st=360&amp;p=1075892&amp;#entry1075892"&gt;Gothic I &amp; II not working on Windows 7&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Working around a longstanding d3d driver bug by instead running via crosscompiled d3d8+wined3d on OpenGL on Windows. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-2040978400554369266?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=2040978400554369266' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2040978400554369266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2040978400554369266'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/06/wine-on-windows.html' title='Wine on Windows...'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3481696697015252010</id><published>2010-05-14T01:35:00.005+02:00</published><updated>2010-05-14T02:00:16.714+02:00</updated><title type='text'>Fun hardware - first results</title><content type='html'>Testing the Fusion-io ioXtreme 80GB (/dev/fioa) vs Intel X25-M gen 2 160G (/dev/sda). The non-directio dd went cpu-limited for some reason, needs looking into.&lt;br /&gt;&lt;br /&gt;792 MB/s read speed at 12% cpu use in the directio case looks a bit promising :)&lt;br /&gt;&lt;pre&gt;# dd if=/dev/fioa2 of=/dev/null bs=1M&lt;br /&gt;26723+1 records in&lt;br /&gt;26723+1 records out&lt;br /&gt;28021615104 bytes (28 GB) copied, 201.797 s, 139 MB/s&lt;br /&gt;# dd if=/dev/fioa2 of=/dev/null bs=1M iflag=direct&lt;br /&gt;19792+0 records in&lt;br /&gt;19791+0 records out&lt;br /&gt;20752367616 bytes (21 GB) copied, 26.2142 s, 792 MB/s&lt;br /&gt;&lt;br /&gt;# dd if=/dev/sda4 of=/dev/null bs=1M&lt;br /&gt;5157+0 records in&lt;br /&gt;5156+0 records out&lt;br /&gt;5406457856 bytes (5.4 GB) copied, 25.136 s, 215 MB/s&lt;br /&gt;# dd if=/dev/sda4 of=/dev/null bs=1M iflag=direct&lt;br /&gt;6040+0 records in&lt;br /&gt;6039+0 records out&lt;br /&gt;6332350464 bytes (6.3 GB) copied, 26.1701 s, 242 MB/s&lt;/pre&gt;&lt;br /&gt;Stay tuned, more to come...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3481696697015252010?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3481696697015252010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3481696697015252010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3481696697015252010'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/05/fun-hardware-first-results.html' title='Fun hardware - first results'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-1515189695357925818</id><published>2010-05-13T19:13:00.002+02:00</published><updated>2010-05-13T19:24:13.819+02:00</updated><title type='text'>Fedora kernel on Ubuntu Lucid 10.04</title><content type='html'>I had need of a Fedora Core 12 kernel lately. Testing the fun hardware of the previous post.&lt;br /&gt;&lt;br /&gt;Turns out that running that kernel with Ubuntu 10.04 userspace is pretty easy. Alien + some dkms invocations are enough.&lt;br /&gt;&lt;pre&gt;fakeroot alien kernel-2.6.31.5-127.fc12.x86_64.rpm&lt;br /&gt;fakeroot alien kernel-devel-2.6.31.5-127.fc12.x86_64.rpm&lt;br /&gt;&lt;br /&gt;dpkg -i kernel_2.6.31.5-128_amd64.deb&lt;br /&gt;dpkg -i kernel-devel_2.6.31.5-128_amd64.deb&lt;br /&gt;&lt;br /&gt;update-initramfs -c -k 2.6.31.5-127.fc12.x86_64&lt;br /&gt;&lt;br /&gt;dkms build -m nvidia-current -v 195.36.15 -k 2.6.31.5-127.fc12.x86_64&lt;br /&gt;dkms install -m nvidia-current -v 195.36.15 -k 2.6.31.5-127.fc12.x86_64&lt;br /&gt;&lt;br /&gt;update-initramfs -u -k 2.6.31.5-127.fc12.x86_64&lt;br /&gt;&lt;br /&gt;update-grub&lt;/pre&gt;&lt;br /&gt;et voila:&lt;br /&gt;&lt;pre&gt;knan@sarevok:~$ lsb_release -a&lt;br /&gt;No LSB modules are available.&lt;br /&gt;Distributor ID: Ubuntu&lt;br /&gt;Description: Ubuntu 10.04 LTS&lt;br /&gt;Release: 10.04&lt;br /&gt;Codename: lucid&lt;br /&gt;knan@sarevok:~$ uname -a&lt;br /&gt;Linux sarevok 2.6.31.5-127.fc12.x86_64 #1 SMP Sat Nov 7 21:11:14 EST 2009 x86_64 GNU/Linux&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-1515189695357925818?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=1515189695357925818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1515189695357925818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1515189695357925818'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/05/fedora-kernel-on-ubuntu-lucid-1004.html' title='Fedora kernel on Ubuntu Lucid 10.04'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-2411559186077928134</id><published>2010-04-09T19:10:00.004+02:00</published><updated>2010-04-09T19:22:32.359+02:00</updated><title type='text'>Tease</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_eOA7Wya9Iec/S79gKp-YfRI/AAAAAAAAAAU/tj7ZVBuD-ho/s1600/gadget1.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_eOA7Wya9Iec/S79gKp-YfRI/AAAAAAAAAAU/tj7ZVBuD-ho/s400/gadget1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5458187009578794258" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_eOA7Wya9Iec/S79gWpOLGOI/AAAAAAAAAAc/Ji9LoMU7LxE/s1600/gadget2.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_eOA7Wya9Iec/S79gWpOLGOI/AAAAAAAAAAc/Ji9LoMU7LxE/s400/gadget2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5458187215535020258" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, if only I had the rest of the New! Shiny! computer handy, this would be a very fun weekend... as is, I'll just have to tease and promise benchmarks &amp; impressions in a few weeks' time.&lt;br /&gt;&lt;br /&gt;Buona sera!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-2411559186077928134?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=2411559186077928134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2411559186077928134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2411559186077928134'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/04/tease.html' title='Tease'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_eOA7Wya9Iec/S79gKp-YfRI/AAAAAAAAAAU/tj7ZVBuD-ho/s72-c/gadget1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-1730838533215345944</id><published>2010-02-06T20:00:00.002+01:00</published><updated>2010-02-06T20:05:49.788+01:00</updated><title type='text'>htrosbif gets better</title><content type='html'>&lt;a href="http://anduin.net/~knan/htrosbif/htrosbif-alpha-4.tar.gz"&gt;Alpha 4&lt;/a&gt; is out now.&lt;br /&gt;&lt;br /&gt;More signatures, more tests, and even bugs fixed. Imagine.&lt;br /&gt;&lt;br /&gt;Git repo: git clone http://anduin.net/~knan/htrosbif.git/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-1730838533215345944?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=1730838533215345944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1730838533215345944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1730838533215345944'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/02/htrosbif-gets-better.html' title='htrosbif gets better'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-4626707941139063165</id><published>2010-01-24T18:54:00.003+01:00</published><updated>2010-01-24T19:05:10.140+01:00</updated><title type='text'>Perl trick-of-the-day - $USER-local modules</title><content type='html'>Ever been frustrated by CPAN and scared to upgrade modules as root? Been burned by a perl rpm/deb upgrade overwriting your carefully upgraded modules?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://perl.jonallen.info/writing/articles/install-perl-modules-without-root"&gt;Jon Allen brings us the light&lt;/a&gt; in a nice, short revelation. And a perl module. Of course.&lt;br /&gt;&lt;br /&gt;Install/upgrade local perl modules in a user homedir, with basically no extra effort. Brilliant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-4626707941139063165?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=4626707941139063165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4626707941139063165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4626707941139063165'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2010/01/perl-trick-of-day-user-local-modules.html' title='Perl trick-of-the-day - $USER-local modules'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-7819694892661521437</id><published>2009-11-05T22:17:00.005+01:00</published><updated>2009-11-06T14:34:00.056+01:00</updated><title type='text'>introducing htrosbif</title><content type='html'>htrosbif - Active HTTP server fingerprinting and recon tool&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What does it do?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;knan@viconia:~/ak-git/htrosbif.git$ ./htrosbif http://localhost:8525/&lt;br /&gt;Match (1200/1200): pound-2.4.5.sig =&gt; jetty-4.2.19.sig&lt;br /&gt;Match (1193/1200): pound-2.4.5.sig =&gt; jetty-4.2.24.sig&lt;br /&gt;Match (1076/1200): pound-2.4.5.sig =&gt; jetty-4.0.6.sig&lt;br /&gt;Match (1042/1200): pound-2.4.5.sig =&gt; jetty-4.1.4.sig&lt;br /&gt;Match (1039/1200): pound-2.4.5.sig =&gt; apache-1.2.6-php3-used.sig&lt;br /&gt;Match (1033/1200): pound-2.4.5.sig =&gt; jetty-3.1.8.sig&lt;br /&gt;Match (1010/1200): pound-2.4.5.sig =&gt; jetty-3.0.6.sig&lt;br /&gt;Match (1000/1200): pound-2.4.5.sig =&gt; tomcat-4.1.40-oldconnector.sig&lt;br /&gt;Match (1000/1200): pound-2.4.5.sig =&gt; tomcat-5.0.30.sig&lt;br /&gt;Match (1000/1200): pound-2.4.5.sig =&gt; apache-2.2.13-php-5.3.0-used.sig&lt;br /&gt;&lt;br /&gt;Does a bit of Recon by Fire, if you will. Prods the web server in all sorts of old, new, basic, fancy, spec-compliant and spec-breaking ways. Tries to characterise both the well-spoken educated responses and the seriously deviant babble it receives in return. Signatures contain no user data, only header names and http-level quirks. A few dozen sacrifical test installs of servers ancient (cern, 1993) and new have survived its tentacles.&lt;br /&gt;&lt;br /&gt;As a (very) useful side effect, might detect reverse proxies, http load balancers, intrusion prevention systems and web application firewalls.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Cool! Download?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sure. &lt;a href="http://anduin.net/~knan/htrosbif/htrosbif-alpha-3.tar.gz"&gt;http://anduin.net/~knan/htrosbif/htrosbif-alpha-3.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;$ git clone http://anduin.net/~knan/htrosbif.git/&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;License?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;GPL v3.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Alpha, huh?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yup. Signature format(s) are still in flux, and sections of the code are just stubs. But it basically works. Sending me signatures isn't very useful yet. Sending me patches, ideas and comments, however... are extremely welcome @ knan-rosbif at anduin.net.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Why?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Because I wanted to see what could be inferred from behaviour alone.&lt;br /&gt;&lt;br /&gt;HTTP load balancers like Pound and HAProxy usually are invisible, ghostly presences, subtly directing traffic and shaping conversations - these touches are detectable, if you think to look.&lt;br /&gt;&lt;br /&gt;Replacing a Server: header is trivial effort, mimicking protocol handling quirks much less so.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-7819694892661521437?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=7819694892661521437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7819694892661521437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7819694892661521437'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/11/introducing-htrosbif.html' title='introducing htrosbif'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-5196414006891940215</id><published>2009-11-02T01:24:00.003+01:00</published><updated>2009-11-02T01:40:46.203+01:00</updated><title type='text'>Bad karma</title><content type='html'>The 9.10 upgrade losing track of /boot and swap (What, uuid? never seen those uuids anywhere, honest! Wanna buy some slightly used /dev/sda* references? Fell off a truck!) and thus failing to boot was a bit painful.&lt;br /&gt;&lt;br /&gt;A bunch of games suddenly growing scratchy/stuttery sound problems not evident in jaunty was more painful. Much debugging ensued.&lt;br /&gt;&lt;br /&gt;Wondercure: apt-get remove --purge pulseaudio&lt;br /&gt;&lt;br /&gt;... if only all social disorders were as easy to correct.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-5196414006891940215?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=5196414006891940215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/5196414006891940215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/5196414006891940215'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/11/bad-karma.html' title='Bad karma'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-6864968767566607614</id><published>2009-10-06T23:22:00.002+02:00</published><updated>2009-10-06T23:29:02.720+02:00</updated><title type='text'>Befuddling web servers for fun</title><content type='html'>sub test_get_11trailingcrap_knowngood()&lt;br /&gt;{&lt;br /&gt;  # So, does trailing crap after the HTTP/1.1 cause a panic?&lt;br /&gt;  #&lt;br /&gt;  # Lots of fun stuff ... some ignore the crap,&lt;br /&gt;  # some think "stupid client, must be 1.0, here you go",&lt;br /&gt;  # some get confused about the url and return a 404,&lt;br /&gt;  # some reject with 400, some spew an error page&lt;br /&gt;  # with no headers at all ("stupid 0.9 client, go away")...&lt;br /&gt;  #&lt;br /&gt;  # ...and some are just endearingly confused about it all.&lt;br /&gt;  #  UNKNOWN 400 Bad Request&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-6864968767566607614?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=6864968767566607614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/6864968767566607614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/6864968767566607614'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/10/befuddling-web-servers-for-fun.html' title='Befuddling web servers for fun'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-5318349547690102576</id><published>2009-09-23T18:28:00.001+02:00</published><updated>2009-09-23T18:30:52.896+02:00</updated><title type='text'>Fingerprinting fun</title><content type='html'>knan@viconia:~/ak-git/htrosbif.git$ ./htrosbif http://thepiratebay.org/&lt;br /&gt;Fuzzy match (932/1000): lighttpd-1.5-svn2621.sig&lt;br /&gt;Fuzzy match (797/1000): lighttpd-1.4.23.sig&lt;br /&gt;Fuzzy match (797/1000): lighttpd-1.4.21.sig&lt;br /&gt;Fuzzy match (797/1000): lighttpd-1.4.22.sig&lt;br /&gt;Fuzzy match (683/1000): lighttpd-1.4.17.sig&lt;br /&gt;Fuzzy match (683/1000): lighttpd-1.4.18.sig&lt;br /&gt;Fuzzy match (683/1000): lighttpd-1.4.13.sig&lt;br /&gt;Fuzzy match (683/1000): lighttpd-1.4.19.sig&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-5318349547690102576?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=5318349547690102576' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/5318349547690102576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/5318349547690102576'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/09/fingerprinting-fun.html' title='Fingerprinting fun'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-4791567147311701816</id><published>2009-07-06T01:22:00.003+02:00</published><updated>2009-07-06T02:07:22.181+02:00</updated><title type='text'>Hairy stunt #1: firmware update via wine</title><content type='html'>My shiny new LG GGW-H20L blu-ray/alphabet soup reader/writer happened to need a firmware update. For some reason, many hardware vendors think win32 executables are handy for this sort of thing. I really... don't.&lt;br /&gt;&lt;br /&gt;But I got intrigued when several people reported success updating the firmware through wine. Copious amounts of wine can of course make almost anything seem like a good idea, so I bravely give it a try - it will probably brick something in an amusing way, at least.&lt;br /&gt;&lt;br /&gt;winetricks mfc42 grabs the usual missing dlls for us. Yet, the firmware updater fails with something on the order of ERROR_SUCCESS in informativeness.&lt;br /&gt;&lt;br /&gt;Oh well. Last try: running wine as root.&lt;br /&gt;... and it works. Quickly and perfectly. I don't _think_ I'm hallucinating. More voluptuous hallucinations would be expected in that case.&lt;br /&gt;&lt;br /&gt;I suspect the kernel's blk_verify_command kicked in when running as a normal user. Fair enough, you don't necessarily want the backup job user to be able to overwrite the tape drive firmware with zeroes. Or a more-evil-than-usual ransomware virus.&lt;br /&gt;&lt;br /&gt;Still, I boggle. And salute fellow Wine contributors. Well done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-4791567147311701816?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=4791567147311701816' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4791567147311701816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4791567147311701816'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/07/hairy-stunt-1-firmware-update-via-wine.html' title='Hairy stunt #1: firmware update via wine'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-2181390173561727066</id><published>2009-06-15T19:20:00.002+02:00</published><updated>2009-06-15T19:43:48.084+02:00</updated><title type='text'>ip6tables fun</title><content type='html'>Note to self. IPv6 connection tracking is a bit eccentric.&lt;br /&gt;&lt;br /&gt;Seems that neighbour solicitations are "INVALID" according to conntrack. I.e. IPv6's equivalent of arp requests are invalid ... and dropped if you have a "-m state --state INVALID -j DROP" rule before your accept-various-icmpv6 rules.&lt;br /&gt;&lt;br /&gt;This does great things for my host security, obviously.&lt;br /&gt;&lt;br /&gt;workaround: put --state INVALID drops after the icmpv6 rules.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-2181390173561727066?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=2181390173561727066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2181390173561727066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2181390173561727066'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/06/ip6tables-fun.html' title='ip6tables fun'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-8646429644064148713</id><published>2009-03-27T01:27:00.002+01:00</published><updated>2009-03-27T01:34:02.463+01:00</updated><title type='text'>OpenVMS cuteness</title><content type='html'>&lt;pre&gt;220 xx.xx.xx.edu MultiNet FTP Server Process V5.2(16) at Thu 26-Mar-2009 8:19PM-EDT&lt;br /&gt;&lt;br /&gt;ftp&gt; site window-size 1073741824&lt;br /&gt;200 TCP window size now 1073741824 bytes&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Strangest ftp command competition, anyone?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-8646429644064148713?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=8646429644064148713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/8646429644064148713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/8646429644064148713'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/03/openvms-cuteness.html' title='OpenVMS cuteness'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3236646414156283171</id><published>2009-03-10T12:29:00.008+01:00</published><updated>2009-03-10T14:16:54.758+01:00</updated><title type='text'>OpenVPN: LDAP and ipset says you may.</title><content type='html'>Our ad-hoc authorization scheme proceeds. Adding custom schemas to OpenLDAP is pretty easy. (&lt;a href="http://users.linpro.no/knan/openvpn/vpnaccess.schema"&gt;vpnaccess.schema&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ipset.netfilter.org"&gt;ipset&lt;/a&gt; lets us define netfilter rules against named, dynamic sets of ips, like:&lt;br /&gt;&lt;pre&gt;ipset -N bofhirc iphash&lt;br /&gt;iptables -m set --set bofhirc src -d bofhirc.example.org -p tcp \&lt;br /&gt;-m tcp --dport 22 -j ACCEPT&lt;/pre&gt;adds a rule giving only ips added to the &lt;span style="font-style:italic;"&gt;bofhirc&lt;/span&gt; set access to bofhirc.example.org port 22. How ips are added to that set is up to you (Port knocking, messenger pigeon, ocr on a piece of paper held up in front of a webcam...) but involves &lt;span style="font-family:monospace;"&gt;ipset -A bofhirc &amp;lt;ip&amp;gt;&lt;/span&gt; at some point. And hopefully &lt;span style="font-family:monospace;"&gt;ipset -D bofhirc &amp;lt;ip&amp;gt;&lt;/span&gt; at some other point to revoke that access again. All without disturbing your carefully-tuned iptables config on every login.&lt;br /&gt;&lt;br /&gt;A touch of &lt;acronym title="Perl"&gt;the swiss army chainsaw&lt;/acronym&gt; with Net::LDAP to OpenVPN --client-connect (&lt;a href="http://users.linpro.no/knan/openvpn/accesses-from-ldap-open.pl"&gt;accesses-from-ldap-open.pl&lt;/a&gt;) and --client-disconnect (&lt;a href="http://users.linpro.no/knan/openvpn/accesses-from-ldap-close.pl"&gt;accesses-from-ldap-close.pl&lt;/a&gt;). Et voila. Adding accesses is now as easy as adding a named set of firewall rules, and adding: &lt;pre&gt;objectClass: vpnAccessPerson&lt;br /&gt;vpnAccess: bofhirc&lt;/pre&gt; to the relevant user in ldap. The ips involved are private and assigned by OpenVPN, so there's no risk of aliasing for multiple users behind a NAT.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3236646414156283171?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3236646414156283171' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3236646414156283171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3236646414156283171'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/03/openvpn-ldap-and-ipset-says-you-may.html' title='OpenVPN: LDAP and ipset says you may.'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-7360972987722676492</id><published>2009-03-05T14:00:00.001+01:00</published><updated>2009-03-05T15:58:45.571+01:00</updated><title type='text'>OpenVPN: Hooked!</title><content type='html'>Authorization.&lt;br /&gt;&lt;br /&gt;OpenVPN 2.x provides a bunch of script hooks. Which ones are most useful for authorization?&lt;br /&gt;&lt;br /&gt;--up, --down ... mostly used on the client side. Restoring network settings on vpn disconnect with a --down hook, for example. Not suitable.&lt;br /&gt;&lt;br /&gt;--route-up ... we don't have the user common_name at this point. Not suitable.&lt;br /&gt;&lt;br /&gt;--ipchange ... discouraged in server mode.&lt;br /&gt;&lt;br /&gt;--auth-user-pass-verify ... authentication. Too early. The client is untrusted and doesn't have an assigned ip yet.&lt;br /&gt;&lt;br /&gt;--tls-verify ... pre-authentication. Too early.&lt;br /&gt;&lt;br /&gt;--client-connect, --client-disconnect... straight after authentication, before client-specific config is read. Good enough, if we're a bit careful (i.e. don't change ip address assignments in client-specific config files), and easy to understand triggering conditions. Has all the parameters we need.&lt;br /&gt;&lt;br /&gt;--learn-address ... perhaps the architecturally correct place to put it. Somewhat harder to understand the triggering condition. Documented as "Run script or shell command cmd to validate client virtual addresses or routes."&lt;br /&gt;&lt;br /&gt;I know, I know, I promised perl hacking here... next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-7360972987722676492?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=7360972987722676492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7360972987722676492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7360972987722676492'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/03/openvpn-hooked.html' title='OpenVPN: Hooked!'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-5548168449141292964</id><published>2009-03-04T15:34:00.000+01:00</published><updated>2009-03-04T16:53:25.411+01:00</updated><title type='text'>OpenVPN: May I?</title><content type='html'>I was recently asked to look at an existing road-warrior OpenVPN implementation, and see how it could be improved to differentiate network access levels per-user. Some users should have basic access, some should have access to their department's privileged systems, some should have usual department accesses plus temporary specific access to a customer system for setup and upgrades. Fun!&lt;br /&gt;&lt;br /&gt;In computer security parlance, this is an authorization issue. Authentication is working, we know who you are, we don't know yet what you should have access to.&lt;br /&gt;&lt;br /&gt;Users on this network is stored in LDAP, and the third-party &lt;a href="http://code.google.com/p/openvpn-auth-ldap/"&gt;OpenVPN Auth-LDAP plugin&lt;/a&gt; is used for authentication. RADIUS is not used anywhere, and adding it to the mix would add complexity and, strangely, not seem to gain us much - the third-party OpenVPN &lt;a href="http://www.nongnu.org/radiusplugin/"&gt;Radiusplugin&lt;/a&gt; only does authentication and accounting, and not really the &lt;a href="http://en.wikipedia.org/wiki/AAA_protocol"&gt;"third A"&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The Auth-LDAP plugin has some *BSD-specific code for interacting with PF. I considered rewriting that code to match requirements, but it's written in a pretty unfamiliar language (Objective-C) and has a number of limitations. A user can only be a member of one group (first-match) and group membership can only give access to one set of resources.&lt;br /&gt;&lt;br /&gt;Thankfully, OpenVPN has lots of hooks for scripting. Perl hacking will ensue in next installment. Until then.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-5548168449141292964?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=5548168449141292964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/5548168449141292964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/5548168449141292964'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/03/openvpn-may-i.html' title='OpenVPN: May I?'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-7200457622089560087</id><published>2009-02-24T21:55:00.000+01:00</published><updated>2009-02-24T22:02:10.104+01:00</updated><title type='text'>Likely-sounding</title><content type='html'>$ HEAD http://isc.sans.org/&lt;br /&gt;200 OK&lt;br /&gt;Server: nc -l -p 80&lt;br /&gt;X-AspNet-Version: 1.1.4322&lt;br /&gt;&lt;br /&gt;...riiight. I believe you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-7200457622089560087?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=7200457622089560087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7200457622089560087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7200457622089560087'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/02/likely-sounding.html' title='Likely-sounding'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-4379422908018412082</id><published>2009-01-05T17:20:00.000+01:00</published><updated>2009-01-05T17:27:43.000+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='photos'/><title type='text'>Sunset spookiness</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_eOA7Wya9Iec/SWIz6nOn2OI/AAAAAAAAAAM/wo_3J72cHfI/s1600-h/sundistort.jpg"&gt;&lt;img style="margin:0px auto 10px; align:left;text-align:left;cursor:pointer; cursor:hand;width: 400px; height: 324px;" src="http://2.bp.blogspot.com/_eOA7Wya9Iec/SWIz6nOn2OI/AAAAAAAAAAM/wo_3J72cHfI/s400/sundistort.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5287845994542127330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now why is the sun sneaking rightwards along the hilltop? Can't see anything tasty in that direction...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-4379422908018412082?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=4379422908018412082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4379422908018412082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4379422908018412082'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2009/01/sunset-spookiness.html' title='Sunset spookiness'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_eOA7Wya9Iec/SWIz6nOn2OI/AAAAAAAAAAM/wo_3J72cHfI/s72-c/sundistort.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-2743438456312692585</id><published>2008-10-05T17:42:00.000+02:00</published><updated>2008-10-05T18:17:40.437+02:00</updated><title type='text'>Words, type and faces</title><content type='html'>&lt;a href="http://www.scribus.net/"&gt;Scribus&lt;/a&gt; is wonderful. It has turned into a pro publishing tool even I can use (but get a 1.3.3.12 backport into hardy, already! &lt;a href="http://bugs.scribus.net/view.php?id=6692"&gt;Bug 6692 is horrible&lt;/a&gt;!), and with a few hours of exploration I've managed to reproduce a rpg splatbook page exactly. Only difference I can tell now is that the book paper is thinner and a bit yellowed compared to my fresh new printer paper, and it is of course some American page size and not A4. Headers, footers, typefaces, spacing, etc. match exactly. Imagine that.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.myfonts.com/WhatTheFont/"&gt;WhatTheFont&lt;/a&gt; is handy for finding the correct fonts. Scan, crop, upload, browse. Copying fonts into ~/.fonts/ and having them show up is a convenient scribus-specific goodie, scribus knowing far more than the average program about fonts and preferring to handle them itself, TYVM.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://potrace.sourceforge.net/samples.html"&gt;potrace&lt;/a&gt; is handy, tracing a bitmap image into a fairly good SVG. (SVG not being an option in a scribus image frame is weird. Import=&gt;SVG is a bit less than intuitive.)&lt;br /&gt;&lt;br /&gt;Next step: automating things a bit with scripting. Mwahaha.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-2743438456312692585?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=2743438456312692585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2743438456312692585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2743438456312692585'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2008/10/words-type-and-faces.html' title='Words, type and faces'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-293231148103988459</id><published>2008-09-15T23:29:00.000+02:00</published><updated>2008-09-15T23:32:27.645+02:00</updated><title type='text'>continents crashing regularly</title><content type='html'>... &lt;a href="http://http://games.slashdot.org/comments.pl?sid=964479&amp;cid=25014151"&gt;sounds dramatic&lt;/a&gt;, doesn't it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-293231148103988459?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=293231148103988459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/293231148103988459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/293231148103988459'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2008/09/continents-crashing-regularly.html' title='continents crashing regularly'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3807003206854527992</id><published>2008-06-02T19:21:00.000+02:00</published><updated>2008-06-02T21:17:58.804+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='norsk'/><title type='text'>... mens jernet er varmt</title><content type='html'>Ikke at jeg har spesielt til smedfingre.&lt;br /&gt;&lt;br /&gt;Men dagens pjatt er om modding. Av spill. Mye annet som kan moddes - biler, vær, leiligheter... (Sjekk Været Via Blåtann På Badet! Nyhet!)... skal vi ikke snakke om.&lt;br /&gt;&lt;br /&gt;I dag er det spill som får unngjelde. En hamrer på dem til de buler som høygravide hobbiter. Som oftest får de også mange skarpe kanter og pigger, og oser litt svidd. Eller har en skjult alien som krøster seg ut, massakrerer alt ditt harde arbeid og litt til, og får den uheldige spilleren til å skrive fantasifulle dødstrusler på $WEBFORUM.&lt;br /&gt;&lt;br /&gt;Baldur's Gate II er et av Biowares mest anerkjente spill. Det er passelig enormt i omfang og har mer bevegelsesfrihet i historien enn de fleste. En skal vel ikke kalle det voldsomt modvennlig, men iherdig omvendt dataformatknørving og involvering fra *nix-entusiaster har gjort det til en levelig situasjon etter hvert.&lt;br /&gt;&lt;br /&gt;Hexredigering via script er gøy.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;WRITE_SHORT     %fxoff% + 0x30 * %fxnum% + 0x00 %opcode%&lt;br /&gt;WRITE_BYTE      %fxoff% + 0x30 * %fxnum% + 0x02 1           // target self&lt;br /&gt;WRITE_BYTE      %fxoff% + 0x30 * %fxnum% + 0x03 0           // power&lt;br /&gt;WRITE_LONG      %fxoff% + 0x30 * %fxnum% + 0x04 %param1%&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Spleise inn dialogvalg i et dekompilert dialogtre har sin sjarm.&lt;br /&gt;&lt;blockquote&gt;REPLACE_STATE_TRIGGER banomen 22 ~See(Player1)&lt;br /&gt;CombatCounter(0)&lt;br /&gt;!See([ENEMY])&lt;br /&gt;!StateCheck(Player1,CD_STATE_NOTVALID)&lt;br /&gt;!StateCheck(Myself,CD_STATE_NOTVALID)&lt;br /&gt;Global("BAnomen3","LOCALS",0)~&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Spleise inn en få-fienden-til-å-lyse-gusjegrønt-effekt i et våpen via scriptet hexredigering er en smule intrikat, når en skal ta hensyn til at tidligere modder i modstabelen kan ha gjort noe lignende.&lt;br /&gt;&lt;br /&gt;Få en beskrivende tekst til å ligne sannheten, med ~50 tidligere modder å ta hensyn til og regexp mest brukbare verktøy... morsomt :)&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;INNER_PATCH_SAVE newdescstr "%uniddesc%" BEGIN&lt;br /&gt;    REPLACE_EVALUATE ~%replacestring%~&lt;br /&gt;    BEGIN&lt;br /&gt;      SPRINT result ~%insertstring%~&lt;br /&gt;    END&lt;br /&gt;    ~%result%~&lt;br /&gt;END&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Scripte en grunnleggende endring som skal gjøres på alle ~3000 brukbare dingser i spillet, og ta hensyn til at ikke alle er like ... kompetente til å lage slikt når de lager en mod, men motoren er snill nok til vanligvis ikke å kræsje tross småfeil og delvis korrupte filer? Vi snakker snart rent underholdende ninjatriks.&lt;br /&gt;&lt;br /&gt;I bunnen her har vi et scriptorientert &lt;a href="http://www.weidu.org/~thebigg/README-WeiDU.html"&gt;moddeverktøy&lt;/a&gt; lagd av en tradisjonell unixgeek. I OCaml. Som holder styr på hvilke modder du legger inn og i hvilken rekkefølge. Og involverer minst tre forskjellige domenespesifikke språk, pluss hexredigering. Andre har så lagd nye makrospråk på toppen av dette igjen. Vi snakker iallfall fire generasjoner av moddere siden spillet kom ut. Første generasjon rakk ikke annet enn å omvendtknørve filformater før de ble drevet til vanvidd av all denne kunnskapen Man Was Not Meant To Know, og oppholdt seg siden mest på Arkham Asylum. Heldigvis ble kludringen på veggene bevart, så neste generasjon beholdt fatningen lenge nok til å få stormannsgalskap. De satte så i gang med dødsforakt, og ga noen år senere fra seg noen sørgelige rester av planene om verdensherredømme før de sjelevandret til neste plan av eksistens.&lt;br /&gt;&lt;br /&gt;Etter den tid begynte moroa.&lt;br /&gt;&lt;br /&gt;Senere generasjoner har dog fremdeles tilbakefall av galskap. Hvordan ellers kan denne syntaksen ha blitt til?&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;OUTER_INNER_PATCH_SAVE savevar buffString BEGIN patch  list END&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://modlist.pocketplane.net/"&gt;Modlista&lt;/a&gt; er i dag oppe i 697 oppføringer. Majoriteten av dem er relativt kompatible med hverandre og seg selv tross &lt;a href="http://anduin.net/~knan/bg2/AmberBug.jpg"&gt;uhell&lt;/a&gt; nå og da. Det begynner å bli folksomt i Athkatla.&lt;br /&gt;&lt;br /&gt;Spillmotoren er ganske imponerende, egentlig. Den takler fint å ha noen hundre AI-script på 1MB+, kompilert, kjørende. Til å være lagd i Y2K har den holdt seg godt.&lt;br /&gt;&lt;br /&gt;Har sin sjarm å hacke på slik über-gnarly kode. 2600 scriptlinjer and counting i min lille mod for tiden. For ikke å snakke om 789-linjers shellscriptet for å bygge min vanlige multimodinstall...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3807003206854527992?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3807003206854527992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3807003206854527992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3807003206854527992'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2008/06/mens-jernet-er-varmt.html' title='... mens jernet er varmt'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-2122967808191341401</id><published>2008-03-29T23:41:00.000+01:00</published><updated>2008-03-29T23:52:32.692+01:00</updated><title type='text'>Hardware 1 - hacker 0.</title><content type='html'>Note to self: grab datasheets and compatibility reports before buying. Development kits aren't as forgiving as consumer hardware. In my defense, the note ruling my target computer out was buried ten pages into a compatibility report pdf. (And the machine did boot ... it just malfunctioned in interesting ways.)&lt;br /&gt;&lt;br /&gt;No relation to the hardware in the previous post, by the way. That one works flawlessly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-2122967808191341401?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=2122967808191341401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2122967808191341401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2122967808191341401'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2008/03/hardware-1-hacker-0.html' title='Hardware 1 - hacker 0.'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-7713104638535028971</id><published>2008-03-27T13:54:00.000+01:00</published><updated>2008-03-27T14:00:37.336+01:00</updated><title type='text'>New toy</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.amfeltec.com/images/pci/2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://www.amfeltec.com/images/pci/2.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Yay! The intended-for-easter toy has arrived, finally, after a dose of New Adventures With Fedex.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-7713104638535028971?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=7713104638535028971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7713104638535028971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7713104638535028971'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2008/03/new-toy.html' title='New toy'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-4185484543193586427</id><published>2007-12-10T20:55:00.000+01:00</published><updated>2007-12-10T21:05:56.284+01:00</updated><title type='text'>Game of the day: Dwarf Fortress</title><content type='html'>&lt;a href="http://www.bay12games.com/dwarves/index.html"&gt;Dwarf Fortress&lt;/a&gt; ... freeware game for the os that must not be named. Works admirably in Wine.&lt;br /&gt;&lt;br /&gt;An obscure cross between &lt;a href="http://crawl-ref.sourceforge.net/"&gt;Dungeon Crawl&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/The_Settlers"&gt;The Settlers&lt;/a&gt;. Dig your own Moria. Then try to reclaim it after it inevitably falls - to war, famine, accidental magma flood, wandering dragon - or just adventure in the ruins.&lt;br /&gt;&lt;br /&gt;Alpha version, probably permanently. Quite addictive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-4185484543193586427?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=4185484543193586427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4185484543193586427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4185484543193586427'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/12/game-of-day-dwarf-fortress.html' title='Game of the day: Dwarf Fortress'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-4102470050839956622</id><published>2007-11-13T11:09:00.000+01:00</published><updated>2007-11-13T11:49:54.832+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='space'/><title type='text'>The very large and peculiar cats from Saturn</title><content type='html'>This is an &lt;a href="http://saturn.jpl.nasa.gov/multimedia/images/saturn/audio/pia07966-112203.wav"&gt;actual radio capture&lt;/a&gt;. From Saturn. By &lt;a href="http://saturn.jpl.nasa.gov/home/index.cfm"&gt;Cassini&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What's Titan &lt;a href="http://photojournal.jpl.nasa.gov/jpeg/PIA08398.jpg"&gt;hiding&lt;/a&gt; below that orange smog?&lt;br /&gt;&lt;br /&gt;*dreamy* I want to go out there...&lt;br /&gt;&lt;br /&gt;On that note, fellow Osloians: &lt;a href="http://www.astrofestival.no/buzz.php"&gt;Buzz Aldrin&lt;/a&gt; is here this coming Sunday, at Astrofestival 2007.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-4102470050839956622?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=4102470050839956622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4102470050839956622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/4102470050839956622'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/11/very-large-and-peculiar-cats-from.html' title='The very large and peculiar cats from Saturn'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3714734603053091519</id><published>2007-10-25T12:47:00.000+02:00</published><updated>2007-10-25T13:17:22.459+02:00</updated><title type='text'>Driver, test pilot, vague guiding lights?</title><content type='html'>The &lt;a href="http://www.linuxdriverproject.org/twiki/bin/view"&gt;Linux Driver Project&lt;/a&gt; is taking off a bit, with several hundred people signed up to help. And we have a few companies dipping their toes in. Getting involved in Linux kernel development has accreted some barriers to entry these last few years. It's difficult to find a worthwhile place to start contributing, and the review-and-resubmit process is drawn-out when no-one knows and trusts your judgement and good taste in coding yet. (Your good taste in most other aspects of life is naturally a given, despite occasional innuendos in heated discussions.)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://linuxdriverproject.org/twiki/bin/view/Main/OutOfTreeDrivers"&gt;OutOfTreeDrivers&lt;/a&gt; and &lt;a href="http://linuxdriverproject.org/twiki/bin/view/Main/DriversNeeded"&gt;DriversNeeded&lt;/a&gt; now collects things to do (and places to go?). Most places I've worked, I eventually end up adding out-of-tree, or even binary-only, drivers to support something someone needs done - which is a big maintenance pain. Collecting them here might inspire a brave soul to start the mainlining, lobby-for-opening, or reverse-engineering (where legal, like here) process.&lt;br /&gt;&lt;br /&gt;Do help out. I'm doing my part.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3714734603053091519?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3714734603053091519' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3714734603053091519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3714734603053091519'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/10/driver-test-pilot-vague-guiding-lights.html' title='Driver, test pilot, vague guiding lights?'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3975373928657106223</id><published>2007-10-11T22:17:00.000+02:00</published><updated>2007-10-11T22:40:52.568+02:00</updated><title type='text'>Ink, read while it's fresh</title><content type='html'>Just out: &lt;a href="http://www.amazon.co.uk/Halting-State-Charles-Stross/dp/0441014984/ref=pd_bbs_sr_1/203-1950181-6691127?ie=UTF8&amp;amp;s=books&amp;amp;qid=1192134656&amp;amp;sr=8-1"&gt;Halting State&lt;/a&gt; by Charles Stross. Extrapolates from today to 2018, and will certainly be outdated before then. Technothriller. Quirky sarcastic eloquence.&lt;br /&gt;&lt;br /&gt;Recommended reader qualifications: MMO gamer w/computer science degree.&lt;br /&gt;&lt;br /&gt;Enjoy. I did.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3975373928657106223?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3975373928657106223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3975373928657106223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3975373928657106223'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/10/ink-read-while-its-fresh.html' title='Ink, read while it&apos;s fresh'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-7684330464992333962</id><published>2007-10-08T10:50:00.000+02:00</published><updated>2007-10-09T13:02:15.271+02:00</updated><title type='text'>The Beast Remade: Niceties, wrapping up</title><content type='html'>&lt;a href="http://search.cpan.org/search?module=Text::Reform"&gt;Text::Reform&lt;/a&gt; took care of the rest of the pretty-printing I needed. The Perl builtin "format" command was more familiar, but the listings would not come out right. I have a sneaking suspicion that it does not like UTF-8 STDOUT much. Text::Reform was easier to get right:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$menu_form = "&amp;lt;&amp;lt; "&lt;br /&gt; ."&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; "&lt;br /&gt; ."&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; "&lt;br /&gt; ."&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;";&lt;br /&gt;&lt;br /&gt; print form $menu_form, $index, $from, $to, $subject;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Some manual command-line parsing were needed, in order to do labor-saving speedups like "rm 1-7,17". I expect everyone reinvents that sort of thing at need.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Wrapping up&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All this was wrapped up in a two-day hack that saves some time and much aggravation.&lt;br /&gt;&lt;br /&gt;I would like to see someone do a similar command-line stunt for interacting with an AJAX web application. Consider this a dare, fellow hacker. I'll owe you a beverage of your choice next time we meet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-7684330464992333962?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=7684330464992333962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7684330464992333962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/7684330464992333962'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/10/beast-remade-niceties-wrapping-up.html' title='The Beast Remade: Niceties, wrapping up'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-410470150689220508</id><published>2007-10-03T11:06:00.001+02:00</published><updated>2007-10-03T11:09:36.709+02:00</updated><title type='text'>The Beast Remade: Use your head</title><content type='html'>Now that "cat" and "rm" works, the quick hack is somewhat useful for its intended purpose. But a short practical test reveals issues. A "cat" dumps the whole mail to the console - while that works as intended, it also scrolls the top of the mail and headers far outside the scrollback buffer, if the mail is large. A "head" command soon looks desirable.&lt;br /&gt;&lt;br /&gt;First try is the naive "print first n lines". That approach is quickly thrown out the window. Grumbling ensues about the evils of HTML email. Spam promptly materializes containing roughly fourteen long paragraphs about random body part enlargement, without a line break anywhere in sight.&lt;br /&gt;&lt;br /&gt;I found a rather easy solution, after some thought - we run this on Linux, after all, so why not use the traditional Unix utilities:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; $spam = grabmsg($mailnum);&lt;br /&gt; open HEAD, "| fold | head -24";&lt;br /&gt; print HEAD $spam;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;No sense in reimplementing everything in Perl if you can think of something else that does the job already. There probably are twenty-five ways of doing this in pure Perl that would be more elegant, if you know of and remember them. I had two days to build this, so I grabbed the first approach I could think of that worked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-410470150689220508?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=410470150689220508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/410470150689220508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/410470150689220508'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/10/beast-remade-use-your-head.html' title='The Beast Remade: Use your head'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3250711886611273457</id><published>2007-09-24T19:19:00.000+02:00</published><updated>2007-09-24T19:24:51.132+02:00</updated><title type='text'>The Beast Remade: Do What I Mean</title><content type='html'>WWW::Mechanize is a subclass of LWP::UserAgent. LWP::UserAgent stops at the HTTP layer, and leaves the application to deal with HTML or whatever else the server sends us in its own way. WWW::Mechanize mixes in knowledge of HTML, and checks your HTTP conversations for error messages. (Now you know what the autocheck =&gt; 1 parameter in &lt;a href="http://useofwords.blogspot.com/2007/09/beast-remade-enter-wwwmechanize.html"&gt;Enter WWW::Mechanize&lt;/a&gt; is.) So using WWW::Mechanize feels like scripted use of a browser, which fits my problem. I am trying, after all, to abbreviate user interaction from several mouse clicks per suspected spam to a short command-line interaction.&lt;br /&gt;&lt;br /&gt;Intuitive methods like -&gt;tick() for checkboxes, -&gt;click() for buttons and -&gt;select() for radio buttons and listboxes helps me fill out the necessary forms quickly. In my "rm" function, I deal with the spam like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  foreach my $spamid (@spamid_arr)&lt;br /&gt;  {&lt;br /&gt;    $localmech-&gt;form_name("quarantine");&lt;br /&gt;    $localmech-&gt;tick("mailid", $spamid);&lt;br /&gt;  }&lt;br /&gt;  $localmech-&gt;click("delete");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;From inspection, the relevant checkboxes had "name=mailselected" and "value=" an id number that stayed constant even when the mail queue view changed. Which makes sense, from a robustness perspective.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3250711886611273457?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3250711886611273457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3250711886611273457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3250711886611273457'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/09/beast-remade-do-what-i-mean.html' title='The Beast Remade: Do What I Mean'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-2929315257124674184</id><published>2007-09-17T11:11:00.000+02:00</published><updated>2007-09-19T11:45:41.246+02:00</updated><title type='text'>The Beast Remade: Deep magic with Storable::dclone</title><content type='html'>The cat/head/rm/ok commands posed some difficulties. My naive "ls" implementation refreshed its view of the quarantine section every time you ran it, as a normal "ls" would.&lt;br /&gt;&lt;br /&gt;The underlying web interface happened to add any new spam that arrived in the meantime to the top of the numbered list. So a certain spam might be renumbered every time my hack looked at the index page. I certainly did not want the numbering to refresh between calls to "ls"; that could cause a quick "ls; cat 1; rm 1" sequence to delete the wrong mail!&lt;br /&gt;&lt;br /&gt;Both the deletion form and the "view mail" links, thankfully, used mail queue id as identifier, not the 1-20 numbered list. Keeping a cached copy of the deletion form seemed wise, for later use in the "rm" command. But I also wanted to make further use of the WWW::Mechanize object, in order to get a look at the suspected spam, and avoid any issues with multiple logins kicking each other out or similar.&lt;br /&gt;&lt;br /&gt;Storable::dclone is deep Perl magic, cloning an instantiated object and all its references, including internal state, functions and all. As such, it is not exactly lightweight or easy to wrap your head around. But it does exactly what I want in this case; it gives me a separate copy of the $mech WWW::Mechanize object to play around with that does not disturb the original:&lt;br /&gt;&lt;code&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;unless (defined ($Storable::Deparse))&lt;br /&gt;  { $Storable::Deparse = 1; }&lt;br /&gt;unless (defined ($Storable::Eval   ))&lt;br /&gt;  { $Storable::Eval    = 1; }&lt;br /&gt;my $localmech = dclone($main::mech);&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;... and then $localmech is mine to do with as I like. Below is a complete example of use. It extracts the spam from its detail page, pretty-prints it to a string and returns.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;# clone a $mech for viewing, keep&lt;br /&gt;# the old around for the index page&lt;br /&gt;sub grabmsg&lt;br /&gt;{&lt;br /&gt;my $spamindex = $_[0];&lt;br /&gt;&lt;br /&gt;unless (defined ($Storable::Deparse))&lt;br /&gt;  { $Storable::Deparse = 1; }&lt;br /&gt;unless (defined ($Storable::Eval   ))&lt;br /&gt;  { $Storable::Eval    = 1; }&lt;br /&gt;my $localmech = dclone($main::mech);&lt;br /&gt;&lt;br /&gt;$localmech-&gt;get($spam_viewurl[$spamindex]);&lt;br /&gt;my $content = decode("utf-8",$localmech-&gt;content);&lt;br /&gt;&lt;br /&gt;my $extractor = new HTML::TableExtract(&lt;br /&gt;                 depth =&gt; 1, count =&gt; 1);&lt;br /&gt;$extractor-&gt;parse($decoded);&lt;br /&gt;&lt;br /&gt;my $spam = "";&lt;br /&gt;my $table = $extractor-&gt;first_table_found();&lt;br /&gt;my @headerlist = qw(Received: Return-Path: Date:&lt;br /&gt;                    From: Reply-To: To: CC:&lt;br /&gt;                    Subject: Attachments);&lt;br /&gt;&lt;br /&gt;for (my $count = 0; $count&lt;@headerlist; $count++)&lt;br /&gt;{&lt;br /&gt;  if (defined (my $cell = $table-&gt;cell($count,1)))&lt;br /&gt;  {&lt;br /&gt;    $spam .= color ('BOLD') . $headerlist[$count]&lt;br /&gt;           . color ('RESET') . "\n" ;&lt;br /&gt;    $spam .= "$cell\n" ;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;$spam .= color ('BOLD') . "Mail body:"&lt;br /&gt;       . color ('RESET') . "\n" ;&lt;br /&gt;$spam .= $table-&gt;cell(10,0) . "\n" ;&lt;br /&gt;&lt;br /&gt;return $spam;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-2929315257124674184?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=2929315257124674184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2929315257124674184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2929315257124674184'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/09/beast-remade-deep-magic-with.html' title='The Beast Remade: Deep magic with Storable::dclone'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-1397853518236774407</id><published>2007-09-17T11:05:00.000+02:00</published><updated>2007-09-17T11:18:24.451+02:00</updated><title type='text'>The Beast Remade: The lay of the land</title><content type='html'>&lt;a href="http://www.mojotoad.com/sisk/projects/HTML-TableExtract/"&gt;HTML::TableExtract&lt;/a&gt; emerged as my poison of choice for doing the grunt work of HTML parsing. It was the easiest to improvise extraction criteria with, of the three or four Perl modules I tried in the course of a frustrating morning.&lt;br /&gt;&lt;br /&gt;The easiest way to pick out the table of interest from the quarantine main menu, for example, turned out to be:&lt;br /&gt;&lt;code&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;my $te = new HTML::TableExtract(&lt;br /&gt; attribs =&gt; { width =&gt; 525 }, keep_html =&gt; 1 );&lt;br /&gt;$te-&gt;parse($mech-&gt;content);&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;...since the attribute "width=525" was its only distinguishing feature. Once parsed, however, it was the work of moments to make a "cd" command to enter the quarantine section of interest. An "ls" command followed shortly behind, with momentary difficulties only.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-1397853518236774407?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=1397853518236774407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1397853518236774407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/1397853518236774407'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/09/beast-remade-lay-of-land.html' title='The Beast Remade: The lay of the land'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-3758857588360765192</id><published>2007-09-13T14:03:00.000+02:00</published><updated>2007-09-14T10:38:25.110+02:00</updated><title type='text'>The Beast Remade: Term::Shell Basics</title><content type='html'>Grabbing and parsing the web pages are all very well, but without a fast way to interact with them this is all just a waste of time and effort. &lt;a href="http://search.cpan.org/%7Eneilw/Term-Shell-0.02/lib/Term/Shell.pod"&gt;Term::Shell&lt;/a&gt; by Neil Watkiss has been at version 0.01 for half a decade (woo! recently updated to 0.02!), and is barely mentioned in a Google search. That does not deter a Perl-familiar sysadmin out to improve his daily routine. A non-interactive critical script would be another matter entirely.&lt;br /&gt;&lt;br /&gt;Term::Shell is excellent scaffolding and support when you do not want to muck around with Term::Readline yourself. As long as you have one of the Term::Readline:: alternatives installed, you get command-line editing and history for free.&lt;br /&gt;&lt;br /&gt;A demonstration:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;knan@viconia:~$ perl ./listing3.pl&lt;br /&gt;World domination. But first, take care of the spam.&lt;br /&gt;spsh:/&gt; ls&lt;br /&gt;No spam. Yet.&lt;br /&gt;spsh:/&gt; ?&lt;br /&gt;Unknown command '?'; type 'help' for a list.&lt;br /&gt;spsh:/&gt; help&lt;br /&gt;Type 'help command' for more detailed help.&lt;br /&gt;Commands:&lt;br /&gt; exit - exits the program&lt;br /&gt; help - prints this screen, or help on 'command'&lt;br /&gt; ls   - Is there any spam? - no help available&lt;br /&gt;spsh:/&gt; exit&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;So far so good. Add a help_ls subroutine if you feel like explaining the intricacies of spam listing to your fellow spam handlers.&lt;br /&gt;&lt;br /&gt;Source of the shell above:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;package main;&lt;br /&gt;&lt;br /&gt;Spsh-&gt;new-&gt;cmdloop;&lt;br /&gt;&lt;br /&gt;package Spsh;&lt;br /&gt;use base qw(Term::Shell);&lt;br /&gt;&lt;br /&gt;sub preloop&lt;br /&gt;{&lt;br /&gt;$state_path = "";&lt;br /&gt;binmode(STDOUT, ":utf8");&lt;br /&gt;&lt;br /&gt;print "World domination. But first,"&lt;br /&gt;     ."take care of the spam.\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub prompt_str&lt;br /&gt;{&lt;br /&gt;return "spsh:/$state_path&gt; ";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# Define an empty command, to avoid&lt;br /&gt;# "unknown command" on an empty&lt;br /&gt;# command-line.&lt;br /&gt;sub run_&lt;br /&gt;{&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub run_ls&lt;br /&gt;{&lt;br /&gt;print "No spam. Yet.\n";&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub smry_ls&lt;br /&gt;{&lt;br /&gt;return "Is there any spam?"&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-3758857588360765192?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=3758857588360765192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3758857588360765192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/3758857588360765192'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/09/beast-remade-termshell-basics.html' title='The Beast Remade: Term::Shell Basics'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-8130874656491917082</id><published>2007-09-11T14:57:00.000+02:00</published><updated>2007-09-12T11:45:45.888+02:00</updated><title type='text'>The Beast Remade: Enter WWW::Mechanize</title><content type='html'>I had recently seen something called WWW::Mechanize mentioned in Google Hacks, 2nd edition. So I determined to have a play around with it, to see if there was something to be gained. An initial look seemed promising. In fairly short order, I had the web interface yelling at me to use a civilized browser, not this scary WWW-Mechanize thingy.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;use WWW::Mechanize;&lt;br /&gt;&lt;br /&gt;my $url = "http://spamproxy:8888/login.php";&lt;br /&gt;&lt;br /&gt;$mech = WWW::Mechanize-&gt;new(autocheck =&gt; 1);&lt;br /&gt;&lt;br /&gt;$mech-&gt;get($url);&lt;br /&gt;print $mech-&gt;content;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;A quick adjustment to &lt;code&gt;$mech-&gt;agent&lt;/code&gt; took care of that ill temper. Adding invocations to &lt;code&gt;$mech-&gt;save_content()&lt;/code&gt; allowed me to get a look at what it expected of me - which was simple, at first. It just wanted a password in the single visible form element:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;my $password = "foobarword";&lt;br /&gt;$mech-&gt;submit_form(fields =&gt; { password =&gt; $password });&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;A &lt;code&gt;$mech-&gt;save_content()&lt;/code&gt; later, I had won a small victory. Next target had to be the web application's menu structure. The story so far:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;use WWW::Mechanize;&lt;br /&gt;&lt;br /&gt;my $url = "http://spamproxy:8888/login.php";&lt;br /&gt;my $password = "foobarword";&lt;br /&gt;&lt;br /&gt;$mech = WWW::Mechanize-&gt;new(autocheck =&gt; 1);&lt;br /&gt;&lt;br /&gt;# Yeah, sure, this is a tested and approved browser&lt;br /&gt;$mech-&gt;agent ("Mozilla/5.0 (X11; U; Linux i686;"&lt;br /&gt;."en-US; rv:1.7.13) Gecko/20060418 Firefox/1.0.8");&lt;br /&gt;&lt;br /&gt;# Get login page&lt;br /&gt;$mech-&gt;get($url);&lt;br /&gt;&lt;br /&gt;# Try to log in&lt;br /&gt;$mech-&gt;submit_form(fields =&gt; { password =&gt; $password });&lt;br /&gt;&lt;br /&gt;# Save the response page for a look around&lt;br /&gt;$mech-&gt;save_content("loggedin.html");&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;Starting out, I worried that extensive Javascript use would make this hard or impossible. As perldoc WWW::Mechanize::FAQ states, Javascript is not supported and not likely to be until someone looks seriously into it. It turned out that this particular web interface had followed web accessibility guidelines pretty well and was navigable without Javascript support. If your local friendly web interface is less accommodating, well, the FAQ has some tips.&lt;br /&gt;&lt;br /&gt;The menu structure turned out to be a mixed bag. Link names were constructed by Javascript, so I could not rely on them. Link URLs, however, were static and thus available for use. Some calls to &lt;code&gt;-&gt;follow_link()&lt;/code&gt; later, I had the quarantine main menu dumped to a HTML file for my perusal. This all looked very parsable and scriptable, and a sneak peek at the quarantine listings seemed to confirm my gut feeling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-8130874656491917082?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=8130874656491917082' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/8130874656491917082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/8130874656491917082'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/09/beast-remade-enter-wwwmechanize.html' title='The Beast Remade: Enter WWW::Mechanize'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-660024223227219722.post-2411756157163221045</id><published>2007-09-11T14:52:00.000+02:00</published><updated>2007-09-11T15:37:16.617+02:00</updated><title type='text'>The Beast Remade: Part the first</title><content type='html'>As web interfaces to various software have matured and multiplied, they have in many cases moved toward resembling traditional GUIs. Checkboxes, labeled buttons, client-side Javascript error checking and "do you really want to do this" dialogs point the way and do the required hand-holding for novice users. In many cases, this is a good thing - say, remote firmware updates or RAID configuration restores.&lt;br /&gt;&lt;br /&gt;System administrators, however, are usually not novice users. Especially not when the web interface in question is the only available interface for a routine daily task. The task in question? To inspect a spam quarantine for false positives - a tiring chore at best. A somewhat cumbersome web interface slowed us down, so grumbles, less than complimentary epithets, and searches for a better way were inevitable.&lt;br /&gt;&lt;br /&gt;The Powers That Be heard our grumbles, and were sympathetic to our point of view. This was not optimal, and we could use some time to find a way to speed this up. Nevertheless, any tricks to speed this up were to make use of The Official Interface, and not delve into product internals in the layers below - due to support contract clauses. So we could not manipulate the mail queue directly, even though that was the most obvious path to speedups.&lt;br /&gt;&lt;br /&gt;(scary cliffhanger - stay tuned for episode 2!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660024223227219722-2411756157163221045?l=useofwords.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=660024223227219722&amp;postID=2411756157163221045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2411756157163221045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/660024223227219722/posts/default/2411756157163221045'/><link rel='alternate' type='text/html' href='http://useofwords.blogspot.com/2007/09/beast-remade-part-first.html' title='The Beast Remade: Part the first'/><author><name>Erik Inge Bolsø</name><uri>http://www.blogger.com/profile/07276141948094162286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
