On 20.07.2012 23:35, Dave Land wrote:
Another approach would be to make a request to any service that is
available only on the private network. If the request succeeds, bail
out of the script, because you're on the LAN. This might require some
fancier coding because the request to the LAN-based service would
constitute XSS from the perspective of whatever page is being loaded
by the browser.
var i = new Image();
i.onload = function () {
// executes only if resource on the LAN is accessible
};
i.onerror = function () {
// executes only if resource on the LAN is accessible
};
i.src = "http://lan.example.com/someresource";
Note that the error path will also be chosen when connected to the LAN
but unable to access the resource.
--
Klaus Johannes Rusch
[email protected]
http://klausrusch.atmedia.net/
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.