Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Anti_Cookieban
- // @description Cookieban subversion on 4chan
- // @namespace anon.ops
- // @include *://*.4chan.org/*
- // @author Anonymous
- // @version 1
- // ==/UserScript==
- (function(){
- // Generate a random 4chan_pass value
- function gen_rnd(){
- var pass, chars, i, len, rnd;
- chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- len = chars.length;
- pass = '';
- for (var i = 0; i < 32; i++) {
- rnd = Math.floor(Math.random() * len);
- pass += chars.substring(rnd,rnd + 1);
- }
- return '_' + pass;
- }
- // Continuously assign a new value to the cookie in order to subvert user identification
- setInterval(function() {
- var d = new Date(), _days = 30;
- d.setTime(d.getTime() + (_days*24*60*60*1000));
- document.cookie = '4chan_pass='+gen_rnd()+';expires='+d.toGMTString()+';';
- }, 1000);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement