EzDevInfo.com

evercookie

evercookie is a javascript API that produces extremely persistent, respawning cookies in a browser. Its goal is to identify a client even after they've removed standard cookies, Flash cookies (LSOs), HTML5 storage, SilverLight storage, and others. evercookie - virtually irrevocable persistent cookies

How to use Django and Evercookie to create very simple and anonymous voting system?

I am trying to create a basic up down voting system for anonymous users that do not need to be signed in so any visitor can push once and a vote is entered. Obviously we have to restrict people to one vote. After some research and no luck with the djangoratings module, I found that evercookie for django is the most promising approach to this ability. However, I need a bit of help writing the part of the code that compares the evercookies of the votes currently cast on an object with a possible incoming code. I have a lot of the other things figured out I think.

My basic django model object at its core is a submitted URL with an IntegerField for keeping track of the likes:

 class newlink(models.Model):

    linktag = models.ForeignKey(‘pagename’) #the page the link belongs in
    linkcomment = models.CharField(max_length=128) #comment to go along with post
    postlinkdate = models.DateTimeField(auto_now_add=True) #submission datestamp
    url = models.URLField(max_length = 1024) 
    linklikescounter = models.IntegerField(null=False, default=0) #this is what will be changed up or down per vote
    # Do I need another field(s) in this model to store evercookie data? Or maybe a new "likevote" class that has a ForeignKey relationship to the newlink class? 


def __unicode__(self):
    return self.url

I have this simple button/form in my template:

<form action="/{{pagename_param}}" method="post">
     {% csrf_token %}
     <input type="hidden" name="linkset_likeid" value="{{ linkset.id }}">
     <input type="submit" class="btn" value="like" name="linklikebtn"/>
     </form>

And my views for getting this going:

if (request.POST.get('linklikebtn')):
        linkid = request.POST[‘linkset_likeid’] #retrieve the ID from the form
        url = newlink.objects.get(id=commentid) #get an instance of the desired url
        url.linklikescounter += 1 #increase the IntegerField by 1
        url.save() #save to the db

Source: (StackOverflow)

Get EverCookie value from ASP.NET Codebehind

I have a Reason to use the Evercookie, It works fine in HTML pages but i am unable to get its value from codebehind after a postback.

I have found a workaround by using a hidden field however it's always loses its value after a postback:

<input type="hidden" id="hfimageurl" name="hfimageurl" value="" />
<script>
    var ec2 = new evercookie();
    document.getElementById('hfimageurl').value = "User";
    ec2.get("id", function (value) { if (value == '10') {   
      document.getElementById('hfimageurl').value = "BadUser"; } 
    });

    ec2.get("id", function (value) { alert(value); });
</script> 

In codebehind after a postback i always get val = '' :

string val = Request.Form("hfimageurl");

if (val != "BadRequest") {
}

Please note that the alert shows the value correctly.

What do i missing here?


Source: (StackOverflow)

Advertisements

Issues Creating cookie with evercookie using js api in php

I want to create permanent cookie with ever cookie but when i run ever cookie program on localhost (Php wamp server) it does not create any cookie and following error is displayed

Not Found
The requested URL /php/evercookie_etag.php was not found on this server.

Not Found
The requested URL /php/evercookie_cache.php was not found on this server.

I have downloaded it from this link http://github.com/samyk/evercookie

I want to create a permanent cookie so that i can recognize the system on which i run my web page below is my code, Please help to sort out my issue, thanks in advance....

<html>
<head>
<script type="text/javascript" src="js/swfobject-2.2.min.js"></script>
<script type="text/javascript" src="js/evercookie.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script>
//var ec = new evercookie();  
var ec = new evercookie({
        baseurl: '/test', http://localhost/test
        asseturi: '/assets', http://localhost/test/assets
        phpuri: '/php' http://localhost/test/php
    });


ec.set("id", "12345");


ec.get("id", function(value) { alert("Cookie value is " + value) });


function getCookie(best_candidate, all_candidates)
{
    alert("The retrieved cookie is: " + best_candidate + "\n" +
        "You can see what each storage mechanism returned " +
        "by looping through the all_candidates object.");

    for (var item in all_candidates)
        document.write("Storage mechanism " + item +
            " returned " + all_candidates[item] + " votes<br>");
}
ec.get("id", getCookie);
</script>
</head>
</html>

Source: (StackOverflow)

Web SQL - Why is my Web SQL database got deleted when I clear browsing data on Chrome (not like evercookie)?

I'm populating an API like samy's evercookie. Currently my own API uses the following methods for storing cookies in the client's browser:

- Standard HTTP cookie
- HTML5 session storage
- HTML5 local storage
- HTML5 Web SQL database
- HTML5 IndexedDB

When it comes to implementing Web SQL database, I referenced (quite carefully) from samy's github repository and some other resources. My Web SQL database works well with the initializing, adding or removing data tasks.
But one thing that make me confuse is that although my implementation of mine and samy's evercookie on Web SQL database is nearly the same, when I use Google Chrome to Clear browsing data (all of them), the results are different (I checked them by go to Chrome Developer Tools > Resources tab > Web SQL):

  • On my site, the Web SQL database is totally gone!
  • On samy's site, the Web SQL still there! This is one of the reason why the cookie on samy's page can recover on the next page load.

I read samy's evercookie code carefully and the Web SQL implementation are almost the same (this is my code), so I completely have no idea why the Web SQL data on his page doesn't get deleted when I Clear browsing data.
I've been stuck at this for hours, so I really hope you guys can help ! Thanks so much in advanced !


Source: (StackOverflow)

Remember visitor PHP [closed]

I develop website and want to remember visitor already vote for my site like this website.

After i research, evercookie is a method to remember visitor.

In the website they protect only once they can vote on a song, even they clear standard cookie, use others browser...

Question: Can it's have other methods to remember beside of evercookie?


Source: (StackOverflow)

Evercookie for longterm sessions and session hijack prevention

I am implementing classroom check-in system that is tied to specific desktops. Unfortunately all I have is a public facing webserver to work with and don't want students able to copy the checking url and falsify check-ins, or login with staff credentials and get access to other tools on the site. Also the computers are on a network where they DHCP regularly reassigns ip's so pinning on IP is not a reliable method of client validation. So I was thinking evercookies, I could have a staff member log into the check-in website from the computer set an evercookie then logout to prevent use of lat login for accessing other tools on the website. When the check-in site is loaded it does a check for the evercookie and as long as a certain threshold is met the check-in page is presented. This has the added benefit of bypassing php/apache's session timeouts.

Or am I barking up the wrong tree and there is a better way to fingerpint the authorized client?


Source: (StackOverflow)

Want to create a new application for website traffic monitoring ( analysis ) [closed]

I want to create my own application for monitoring traffic of my website without using any third party tools like google analytics. In which I want to log screenshots, user details, page details and cookies. So what technology should I opt so as to achieve this goal and which will be best suited and what work flow should I follow.

I've never done this kind of work previously so I'm new to this. Any help would be greatly appreciated.

The technologies I know are : javascript, nodejs, django(python).


Source: (StackOverflow)

Evercookie browser security

I've just discovered Evercookie project on Github.

Evercookie is a Javascript API that produces extremely persistent cookies in a browser. Its goal is to identify a client even after they've removed standard cookies, Flash cookies (Local Shared Objects or LSOs), and others.

This is accomplished by storing the cookie data as many browser storage mechanisms as possible. If cookie data is removed from any of the storage mechanisms, evercookie aggressively re-creates it in each mechanism as long as one is still intact.

If the LSO mechanism is available, Evercookie may even propagate cookies between different browsers on the same client machine!

I tested it online, on this example page. I clicked "Create evercookie" button, I deleted all browsing data and I refreshed the page. The cookies that were deleted by deleting browsing data returned again there.

Where is the browser security in this thing? Is this secured?


Source: (StackOverflow)