Article View: news.software.readers
Article #216601Re: [tin] How to change default User-Agent line?
From: Sqwertz
Date: Fri, 08 Feb 2008 03:53
Date: Fri, 08 Feb 2008 03:53
63 lines
3475 bytes
3475 bytes
On Fri, 08 Feb 2008 01:30:12 +0000, Peter J Ross wrote:
> In news.software.readers on Fri, 8 Feb 2008 00:18:39 +0000 (UTC), Urs
> JanΓen <urs@buil.tin.org> wrote:
>
>> In <slrnfqn4rv.ore.pjr@pjr.motzarella.org>, Peter J Ross wrote:
>>> If I post with tin, my User-Agent header looks like this:
>>>
>>> User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
>>> (Linux/2.6.22-3-686 (i686))
>>>
>>> I don't want all that information to be shown. In particular, I think
>>> my kernel version is my business, not my readers', and I'm not running
>>> UNIX, and I have no idea what "Dalaruan" means.
>>>
>>> I'd like to be able to replace the line with
>>>
>>> User-Agent: tin/1.9.2-20070201
>>>
>>> but my efforts at editing src/config.c, include/version.h etc have so
>>
>> the relevant code is in post.c:checknadd_headers()
>>
>> fprintf(fp_out, "User-Agent: %s/%s-%s (\"%s\") (%s)%s\n",
>> PRODUCT, VERSION, RELEASEDATE, RELEASENAME, OSNAME, suffix);
>
> Thank you. So this should give me what I want:
>
> #v+
> fprintf(fp_out, "User-Agent: %s/%s-%s\n",
> PRODUCT, VERSION, RELEASEDATE);
> #v-
>
> Am I right?
That would do the same as advertising=off. If you still wanted
advertising of the newsreader but not the OS/Version, change it
to:
fprintf(fp_out, "User-Agent: %s/%s-%s (\"%s\")\n",
PRODUCT, VERSION, RELEASEDATE, RELEASENAME);
Would result in the header:
User-Agent: tin/1.9.2-20070201 ("Dalaruan")
Another "fancy" option is to just edit your existing executable
(/usr/local/bin/tin, or whatever) with a binary/hex editor - or
Emacs is what I'd use - and search for the string:
User-Agent: %s/%s-%s (\"%s\") (%s)%s\n
and replace the last 9 characters of that string with
"\n "
That's \n with 7 spaces after it - no quotes
It's the brute forth method: Ugly, but it works. And saves you
from building it from scratch, possibly breaking something else
in the meantime.
-sw
Technical Details
Message-ID:
<1lkqzb3igw8vm$.dlg@sqwertz.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!newscon04.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr27.news.prodigy.net.POSTED!666d6152!not-for-mailReferences:
<slrnfqn4rv.ore.pjr@pjr.motzarella.org> <fog74v$6h2$1@news2.rz.uni-karlsruhe.de> <slrnfqnc54.ore.pjr@pjr.motzarella.org>Show Full Headers
Complete Article Headers
Message-ID: <1lkqzb3igw8vm$.dlg@sqwertz.com> Subject: Re: [tin] How to change default User-Agent line? Date: Fri, 08 Feb 2008 03:53:54 GMT From: Sqwertz <swertz@cluemail.compost> References: <slrnfqn4rv.ore.pjr@pjr.motzarella.org> <fog74v$6h2$1@news2.rz.uni-karlsruhe.de> <slrnfqnc54.ore.pjr@pjr.motzarella.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!newscon04.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr27.news.prodigy.net.POSTED!666d6152!not-for-mail Newsgroups: news.software.readers Content-Transfer-Encoding: 8bit X-No-Archive: yes X-WebTV-Stationery: Standard; BGColor=red; Background="http://i26.tinypic.com/25polj9.gif"; TextColor=red Lines: 63 NNTP-Posting-Host: 70.253.85.148 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr27.news.prodigy.net 1202442834 ST000 70.253.85.148 (Thu, NNTP-Posting-Date: Thu, 07 Feb 2008 22:53:54 EST Organization: SBC http://yahoo.sbc.com X-UserInfo1: [[PAPDCAOXRQS]\Y\BNPNFXBWR\HPCTL@XT^OBPLAH[\BPIB_NVUAH_[BL[\IRKIANGGJBFNJF_DOLSCENSY^U@FRFUEXR@KFXYDBPWBCDQJA@X_DCBHXR[C@\EOKCJLED_SZ@RMWYXYWE_P@\\GOIW^@SYFFSWHFIXMADO@^[ADPRPETLBJ]RDGENSKQQZN