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

Conor Daly c.daly at met.ie
Tue Jul 1 09:10:11 UTC 2008

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

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,

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...).

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?...

Conor Daly,                   
Met Eireann, Glasnevin Hill,  
Dublin 9, Ireland             
Ph +3531 8064276 Fax +3531 8064247

This e-mail and any files transmitted with it are confidential and intended solely for the addressee. If you have received this email in error please notify the sender.
This e-mail message has also been scanned for the presence of computer viruses.

Ta an riomhphost seo, agus aon chomhad ata nasctha leis, faoi run agus is don te a seoladh chuige amhain e. Ma tharla go bhfuair tu an riomhphost seo tri dhearmad cuir in iul don te a sheol e led' thoil.

Ta an teachtaireacht riomhphoist seo scuabtha le bogearrai frithvireas.
NorthBridge Mail Server id e9yrhg43fncvj3974vjenw

More information about the Techtalk mailing list