/    Sign up×
Community /Pin to ProfileBookmark

stopping server ping

i want to be able to track clicks even if scripting is disabled, so i wrote the below as a test. it works.

but now, i am not sure i want [U]my[/U] clicks snooped like this, so i am hoping someone here knows/can figure a way to stop this. i have been through the settings menus of all major browsers, and short of disabling CSS, i can’t seem to stop it.

i would like to hear any opinions about the balance of operator control / user rights, as it pertains to the concept.
– do i have a right to monitor usage of my own site?
– do users have a right to privacy on any site?

-the scriptless click ping:

client html

[CODE]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>scriptless ping</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<style type=’text/css’>
a { color: blue; }
a.ping { background-image: url(“”); }
a.ping1:visited { background-image: url(“http://192.168.8.2/pub/pinglog.asp?link=noaa.gov”); }
</style>
</head>

<body >

this will ping when you click the link: <a target=”_blank” href=’http://www.noaa.gov/’ class=”ping1″>noaa</a> <br />

</body>
</html>[/CODE]

server jscript (not cut-and-paste ready, but should demo the gist)

[CODE]
<!–#include file=”XXX.asp”–>
<script language=”jscript” runat=”server”>

Response.ContentType=”text/plain”

var dtt = ( new Date() ).toString();
var key=String(Request.querystring(“link”) ) || “” ;
var ipt=String(Request.ServerVariables(“remote_addr”)) || “err”;
var uat=String(Request.ServerVariables(“http_user_agent”)) || “err”;

var buff= ({ dt: dtt,
ua :uat,
ip :ipt,
link:key});

print( apFile(“pinglog.txt” , buff.toSource() + “,rn” ) )

</script>[/CODE]

example of log file:

[CODE]
({dt:”Mon Jul 21 22:17:43 CDT 2008″, ua:”Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.1) Gecko/2008070208 [COLOR=”Red”]Firefox/3.0.1[/COLOR]”, ip:”192.168.8.3″, link:”noaa.gov”}),
({dt:”Mon Jul 21 22:20:28 CDT 2008″, ua:”Mozilla/4.0 (compatible; [COLOR=”Red”]MSIE [/COLOR]7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)”, ip:”192.168.8.3″, link:”noaa.gov”}),
({dt:”Mon Jul 21 22:30:36 CDT 2008″, ua:”Mozilla/5.0 (Windows; U; Windows NT 6.0; en) AppleWebKit/522.15.5 (KHTML, like Gecko) Version/3.0.3 [COLOR=”Red”]Safari[/COLOR]/522.15.5″, ip:”192.168.8.3″, link:”noaa.gov”}),
({dt:”Mon Jul 21 22:29:10 CDT 2008″, ua:”Mozilla/5.0 (Windows NT 6.0; U; en; rv:1.8.0) Gecko/20060728 Firefox/1.5.0 [COLOR=”Red”]Opera [/COLOR]9.23″, ip:”192.168.8.3″, link:”noaa.gov”}),

[/CODE]

do no evil!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@HoboScriptJul 22.2008 — I think its more of a question of how you use the information, not how you obtain it.
Copy linkTweet thisAlerts:
@A1ien51Jul 22.2008 — You can use the visited trick to see if users went to any sort of site such as Google, Yahoo, etc. What you have shown is really nothing new. We have been using tracking on images for years.

Eric
Copy linkTweet thisAlerts:
@rnd_meauthorJul 22.2008 — You can use the visited trick to see if users went to any sort of site such as Google, Yahoo, etc. What you have shown is really nothing new. We have been using tracking on images for years.

Eric[/QUOTE]

I consider history snooping highly unethical, and firefox is taking steps to stop it.

i am not terribly concerned with when this comae about, it is new to me.

i hadn't seen anything that would report [U]when [/U] the user clicked a link, and most image pings use new Image(), which i block with noscript.

i thought i was doing well to disable js, now it appears CSS has to go also...


so i guess you are saying that users don't care, since this is an established practice. not sure if that makes me feel better or not. it's something to think about...


my goal is innocent enough: monitor usage / count users of .htm files on a server without editing the html. i can block third-party referrals, so that only my links work, and my links get counted...

if there is any better way to do this, i am all ears.
×

Success!

Help @rnd_me spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...