Re: Netsaint emulate Mozilla
Stanley Hopcroft <[email protected]>
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Message-ID | <[email protected]> |
Dear Sir,
I am writing to thank you for your letter, apologise for the belated
response and say that I think you have two alternatives,
On Tue, Oct 15, 2002 at 02:34:36PM -0700, Justin Pratt wrote:
> Hello,
> some of the sites I would like to monitor have checks in place that look for IE or Mozilla and redirect you to an error message if neither is found.
> is there any way to modify the check_http script to make it look like IE or mozilla, or have any of you fine folks found a way around this issue?
> BTW: modifying the source code on the web site is the last thing we want to do..
> thanks,
Yep. Don't modify your web server pages.
You could
1 patch the source of check_http.c
Here's the bit you want to 'fix'
pc09011> grep -i -3 agent check_http.c
}
}
/* send user agent */
sprintf (buffer,
"User-Agent: check_http/%s (netsaint-plugins %s)\r\n",
clean_revstring
(REVISION), PACKAGE_VERSION);
You need to understand the format of the 'user-agent' string: a complete
guess would be replacing 'check_http' with 'Mozilla' but you will
almost certainly need to set the version string also.
Try this
sprintf(buffer, "User-Agent: Mozilla/x.y");
where x.y are whatever recent Mozillas send.
2 Use a different way of monitoring your web server eg Perl with the LWP
module.
The LWP::UserAgent constructor lets you set the user-agent string. I set
mine to
use constant AGENT => 'Mozilla/4.7' ;
>
> Justin
>
HTH,
Yours sincerely.
--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------
'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'
from Meditation 17, J Donne.
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en