Re: Browser Limited web application

2008-09-17 Thread Mark Thomas
karthikn wrote:
> Hi
> 
> Some experimentation was done for the same
> 
> But some Browsers provide modification of "User-Agent"
> 
> Is this fool proof ?

No.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: Browser Limited web application

2008-09-17 Thread Peter Crowther
[Marked off-topic as this now has nothing to do with Tomcat]

> From: karthikn [mailto:[EMAIL PROTECTED]
> But some Browsers provide modification of "User-Agent"
>
> Is this fool proof ?

No.  You have no control over the client; you cannot determine what it really 
is, only what it says it is.  AVG8, for example, can pretend pretty 
convincingly to be Internet Explorer.

The only way to be relatively certain is to send a page to the browser that 
uses Javascript to check for known bugs or quirks in the browser, and sends 
back to you a status report.  Of course, a hacker has control over the client, 
so could change the Javascript code you send (or run it under a debugger) to 
report whatever they wanted... you can never be *certain*.

If you told us what you were trying to do, and what is an acceptable level of 
confidence in the result, we might be able to help more.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Browser Limited web application

2008-09-17 Thread karthikn
Hi

Some experimentation was done for the same

But some Browsers provide modification of "User-Agent"

Is this fool proof ?


With regards
Karthik

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2008 5:09 PM
To: users@tomcat.apache.org
Subject: Re: Browser Limited web application

For # 1, try this in your filter:

 if(httpservletrequest.getHeader("User-Agent").indexOf("MSIE
6.0")!= -1)
filterchain.doFilter(servletrequest, servletresponse);
else
httpservletresponse.getWriter().print("This browser
version is not supported!!!");

This will ensure that your app is only accessible on IE 6.

-Original Message-
From: karthikn <[EMAIL PROTECTED]>
To: users@tomcat.apache.org 
Sent: Wed, 17 Sep 2008 4:28 pm
Subject: Browser Limited  web application










Hi

Spec :  TOMCAT 6.0.18
O/s:  HP UNIX 11i
J2SDK : j2sdk1.6  or jre 1.6


An application deployed on the env  as 'XYZ.war'

Question 1 :  How  to  implement a  Filter in the application for
Browsers
limitation
 The web application should be visible only in IE-6
or Fire
Fox 2.0  ?

Question 2:  How to fetch the MAC address (Physical address) of
  the clients using web application  ?


Note:- Spent 3 days on Google / yahoo for the same yet no answers.


Please  suggest me ...

With regards
Karthik









You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Browser Limited web application

2008-09-17 Thread karthikn
Hi

>> For computers in the local network you could execute "ping ip", and then
"arp -a", and parse the result. Or you could look for an Java ARP
implementation, there are some of them on the internet, but are not very
simple to use.

Correct but HOW via a JSP at run time 


With regards
Karthik

-Original Message-
From: Ognjen Blagojevic [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2008 5:57 PM
To: Tomcat Users List
Subject: Re: Browser Limited web application

Peter Crowther wrote:
>> From: karthikn [mailto:[EMAIL PROTECTED]
>> Question 2:  How to fetch the MAC address (Physical address) of
>>   the clients using web application  ?
>
> You can not do this at the server.  Some clients may not even have one - a 
> computer with no network card using a dial-up modem to access the Internet 
> has no MAC address.  If you look at the OSI 7-layer model, the MAC address 
> exists in some Datalink (layer 2) implementations, but need not exist on all.
>
> If you really, *really* need the MAC address, you would have to write a piece 
> of code to download to the client computer and run on the client computer to 
> get it.  I suspect most anti-malware programs would recognise that software 
> as spyware and stop it running.

In other words, you can only get the mac address from the computers in
LAN. Everything that comes outside your LAN does not have mac address.

For computers in the local network you could execute "ping ip", and then
"arp -a", and parse the result. Or you could look for an Java ARP
implementation, there are some of them on the internet, but are not very
simple to use.

Regards,
Ognjen

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Browser Limited web application

2008-09-17 Thread Ognjen Blagojevic

Peter Crowther wrote:

From: karthikn [mailto:[EMAIL PROTECTED]
Question 2:  How to fetch the MAC address (Physical address) of
  the clients using web application  ?


You can not do this at the server.  Some clients may not even have one - a 
computer with no network card using a dial-up modem to access the Internet has 
no MAC address.  If you look at the OSI 7-layer model, the MAC address exists 
in some Datalink (layer 2) implementations, but need not exist on all.

If you really, *really* need the MAC address, you would have to write a piece 
of code to download to the client computer and run on the client computer to 
get it.  I suspect most anti-malware programs would recognise that software as 
spyware and stop it running.


In other words, you can only get the mac address from the computers in 
LAN. Everything that comes outside your LAN does not have mac address.


For computers in the local network you could execute "ping ip", and then 
"arp -a", and parse the result. Or you could look for an Java ARP 
implementation, there are some of them on the internet, but are not very 
simple to use.


Regards,
Ognjen

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Browser Limited web application

2008-09-17 Thread bhooshanpandit

For # 1, try this in your filter:

if(httpservletrequest.getHeader("User-Agent").indexOf("MSIE 
6.0")!= -1)

   filterchain.doFilter(servletrequest, servletresponse);
   else
   httpservletresponse.getWriter().print("This browser 
version is not supported!!!");


This will ensure that your app is only accessible on IE 6.

-Original Message-
From: karthikn <[EMAIL PROTECTED]>
To: users@tomcat.apache.org 
Sent: Wed, 17 Sep 2008 4:28 pm
Subject: Browser Limited  web application










Hi

Spec :  TOMCAT 6.0.18
O/s:  HP UNIX 11i
J2SDK : j2sdk1.6  or jre 1.6


An application deployed on the env  as 'XYZ.war'

Question 1 :  How  to  implement a  Filter in the application for  
Browsers

limitation
The web application should be visible only in IE-6  
or Fire

Fox 2.0  ?

Question 2:  How to fetch the MAC address (Physical address) of
 the clients using web application  ?


Note:- Spent 3 days on Google / yahoo for the same yet no answers.


Please  suggest me ...

With regards
Karthik









You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Browser Limited web application

2008-09-17 Thread Jim Cox
On Wed, Sep 17, 2008 at 6:58 AM, karthikn
<[EMAIL PROTECTED]>wrote:

>
> Question 1 :  How  to  implement a  Filter in the application for  Browsers
>  limitation
>The web application should be visible only in IE-6  or
> Fire Fox 2.0  ?
>

You can write & deploy a Filter that examines the "User-Agent" HTTP request
header field, though that's far from foolproof -- see 14.43 of:
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html


> Question 2:  How to fetch the MAC address (Physical address) of
>  the clients using web application  ?
>

Can  you map the client IP via the ARP cache? See "man arp" and:
  http://en.wikipedia.org/wiki/Address_Resolution_Protocol


RE: Browser Limited web application

2008-09-17 Thread Peter Crowther
> From: karthikn [mailto:[EMAIL PROTECTED]
> Question 2:  How to fetch the MAC address (Physical address) of
>   the clients using web application  ?

You can not do this at the server.  Some clients may not even have one - a 
computer with no network card using a dial-up modem to access the Internet has 
no MAC address.  If you look at the OSI 7-layer model, the MAC address exists 
in some Datalink (layer 2) implementations, but need not exist on all.

If you really, *really* need the MAC address, you would have to write a piece 
of code to download to the client computer and run on the client computer to 
get it.  I suspect most anti-malware programs would recognise that software as 
spyware and stop it running.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Browser Limited web application

2008-09-17 Thread karthikn
Hi

Spec :  TOMCAT 6.0.18
O/s:  HP UNIX 11i
J2SDK : j2sdk1.6  or jre 1.6


An application deployed on the env  as 'XYZ.war'

Question 1 :  How  to  implement a  Filter in the application for  Browsers  
limitation
The web application should be visible only in IE-6  or Fire 
Fox 2.0  ?

Question 2:  How to fetch the MAC address (Physical address) of
  the clients using web application  ?


Note:- Spent 3 days on Google / yahoo for the same yet no answers.


Please  suggest me ...

With regards
Karthik