[Techtalk] Pan newsreader "User-Agent" line quip

Anne Wainwright anotheranne at fables.co.za
Tue Jul 1 18:29:54 UTC 2008

Conor, hi.

Thank you for the words of wisdom.

Today I learnt 'which', 'files', & 'strings' a la grep pipe. great!

See below

On Tue, 1 Jul 2008 10:10:11 +0100
Conor wrote:

|> On Wed, Jun 25, 2008 at 10:16:35PM +0200 or thereabouts, Anne
|Wainwright wrote: > > Hi,
|> > 
|> > I can find no help on this, although it is fairly intuitive.
|> > 
|> > What really bugs me is the annoying 'funny' quote that comes up on
|the > > "User-Agent" line of the post. I can't find where to turn this
|off, does > > any one know, please.
|> > 
|> > I get:
|> > 
|> > User-Agent:    Pan/ (As She Crawled Across the Table
|(Debian > > GNU/Linux))
|> > 
|> > or 
|> > 
|> > User-Agent:    Pan/0.14.0 (I'm Being Nibbled to Death by Cats!)
|> > 
|> > 
|> > I updated inbetween the posts. The two posts were to different
|groups. > 
|> The hint was in this line ^^^.  In cases like this, where you cannot
|find > any way to change, I start to think that it's hard-coded in the
|binary.  I > went and installed the latest pan and went searching...
|> [cdaly at bofh ~]$ which pan
|> /usr/bin/pan
|> This is the executable.  Then I checked what type it was, if it was a
|> script, I would have do search further...
|> [cdaly at bofh ~]$ file /usr/bin/pan
|> /usr/bin/pan: ELF 32-bit LSB executable, Intel 80386, version 1
|(SYSV), for > GNU/Linux 2.6.9, dynamically linked (uses shared libs),
|for GNU/Linux 2.6.9, > stripped
|> Grand, it's an executable.  So I ran strings on the executable and
|grepped > for 'Crawl'...
|> [cdaly at bofh ~]$ strings /usr/bin/pan | grep Crawl
|> Pan/ (As She Crawled Across the Table)
|> So the User agent string is hard-coded.  
|> You now have two options:
|> 1.  Get the sources, edit them and recompile.
|> 2.  Do a binary edit on the executable.
|> I tried option 2.  I copied /usr/bin/pan to my home directory and
|edited it > with gvim.  When it opens it looks like garbage but if you
|search for the > word 'Crawl' the string comes up in plain text.  
|> Now, you cannot just delete that because this will change the
|internal > addresses of the rest of the program so you must change the
|string instead. > I just substituted with spaces.  Save and run the
|modified version using > './pan' rather than just 'pan'.  Try a post
|and see how it turns out.  If > you're happy, copy the modified
|executable in place of the original (maybe > backup the original
|first...). > 

I modified the file, and am checking it out. Thanks for the very clear
exposition of working.

|> While poking, I did notice under the 'More Headers' tab in the 'New
|Message' > window, an 'Add "User-Agent" header' checkbox which is
|checked by default. > Would it be enough just to uncheck this? 
|Everytime?  Maybe it will remember > if you uncheck it?...

To my shame i didn't notice this  :(

 ... but my own quote added in place of the quote by the
programmes coders will be more suitable!

|> Conor


More information about the Techtalk mailing list