Cookies and Spam - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Cookies and Spam

Description:

How are cookies constructed. www.buy.com FALSE / FALSE 1034233570 buycountry us ... First FALSE says that the cookie is NOT available throughout the domain ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 15
Provided by: DPD5
Category:
Tags: cookies | spam

less

Transcript and Presenter's Notes

Title: Cookies and Spam


1
Cookies and Spam
2
Why cookies?
  • Give a form of local storage for remote sites
  • Can remember
  • Name
  • Time of last visit
  • Store data from previous visits
  • Identify page changes since you were there
  • Use CGI scripts to identify user patterns through
    pages.

3
How are cookies constructed
  • www.buy.com FALSE / FALSE
    1034233570 buycountry us
  • www.buy.com is the URL
  • First FALSE says that the cookie is NOT available
    throughout the domain
  • Second FALSE says that the cookie can be
    transmitted over secure and innsecure channels.
  • 1034233570 gives the expiration time (in
    milliseconds since 1970)

4
Sample cookies
  • cm.bell-labs.com FALSE /cm/ms/who/wim
    FALSE 1215755792 count 1
  • www.sendwine.com FALSE /order FALSE
    2136081693 SecureGate Yes
  • .amazon.com TRUE / FALSE
    2082787201 ubid-main
    1428-1515523-803182
  • .netscape.com TRUE / FALSE
    1293839999 UIDC 128.112.92.4709094306740
    76028
  • yp.yahoo.com TRUE / FALSE
    1262383200 YP.us v2mcityd01Princeton
    01NJ01085400140.35530101-74.64959701501c020
    1LaJolla01CA010132.84719801-117.27330001401
    c
  • tv.yahoo.com TRUE / FALSE
    1271361600 YTV lus_NJ29510v1zip08540
  • .doubleclick.net TRUE / FALSE
    1920499187 id 63d4e550

5
Cookie code
First Visit Popup Window or Splash Page Code
for index.html if (getCookie("visited")) //
if they've already been here go straight to the
content self.location.href "main.html"
else // record that they've been here
setCookie ("visited", true) On the first
visit the page is displayed and the cookie set.
The next time the visitor is forwarded to
main.html. If you use a proper setCookie() call
with an expiry date then you can have the splash
page not display again for a week, a month, a
year, .... From http//members.ozemail.com.au/dc
rombie/cookie3.html
6
Building a page with a cookie
  • ltHEADgt
  • ltTITLEgtMy Cookie Pagelt/TITLEgt
  • ltSCRIPT language"JavaScript"gt
  • lt!-- Hide from older browsers
  • // Original JavaScript code by Duncan Crombie
    dcrombie at chirp.com.au
  • var bikky document.cookie
  • function getCookie(name) // use
    getCookie("name")
  • var index bikky.indexOf(name "")
  • if (index -1) return null
  • index bikky.indexOf("", index) 1
  • var endstr bikky.indexOf("", index)
  • if (endstr -1) endstr bikky.length
  • return unescape(bikky.substring(index, endstr))

7
Cookie code (cont.)
  • var today new Date()
  • var expiry new Date(today.getTime() 28 24
    60 60 1000) // plus 28 days
  • function setCookie(name, value) // use
    setCookie("name", value)
  • if (value ! null value ! "")
  • document.cookiename "" escape(value) "
  • expires" expiry.toGMTString()
  • bikky document.cookie // update bikky
  • // Your code goes here ...
  • // Stop Hiding --gt
  • lt/SCRIPTgt
  • lt/HEADgt

8
Spam
  • Underlying assumptions for spam removal
  • Humans cannot effectively send spam
  • Spam contains bad words

9
Spam
  • Underlying assumptions for spam removal
  • Humans cannot effectively send spam
  • Determine if the message came from a human
  • Spam contains bad words
  • Block messages that contain those words

10
Alan Turing 1912-1954
  • PU PhD 1938
  • Invented the theory underlying modern computing
    (Turing test)
  • Led code breaking during WW 2 (enigma)
  • Set tone for artificial intelligence with Turing
    test

11
The Turing test
  • Turing held that computers would in time be
    programmed to acquire abilities rivalling human
    intelligence.
  • As part of his argument Turing put forward the
    idea of an 'imitation game', in which a human
    being and a computer would be interrogated under
    conditions where the interrogator would not know
    which was which, the communication being entirely
    by textual messages. Turing argued that if the
    interrogator could not distinguish them by
    questioning, then it would be unreasonable not to
    call the computer intelligent.

12
(No Transcript)
13
Reverse turing test
  • You recently sent email to dpd_at_mailblocks.net. In
    order to verify that you are a qualified email
    sender please go to http//www.mailblocks.net/conf
    irm.htm?todpduid18330 to confirm. If you have
    not confirmed within one week then your message
    will be treated as spam.

14
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com