{"id":163,"date":"2006-12-12T03:27:43","date_gmt":"2006-12-12T07:27:43","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/zeroday\/2006\/12\/12\/pirate-bay-strikes-back\/"},"modified":"2006-12-12T03:29:15","modified_gmt":"2006-12-12T07:29:15","slug":"pirate-bay-strikes-back","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/zeroday\/2006\/12\/12\/pirate-bay-strikes-back\/","title":{"rendered":"pirate bay strikes back"},"content":{"rendered":"<p>I found this to be a <a href=\"http:\/\/piratbyran.org\/perspektiv\/english.php\">unique form of protest by Swedish site The Pirate Bay<\/a>.  they are opposing the tactic of a swedish isp who has decided to block it&#8217;s customers from accessing allmymp3.com.  I won&#8217;t go into a long diatribe about the merits of imposing restrictions on your customers.  I will however share the code that The Pirate Bay has provided to help sites block anyone coming from Perspektiv Bredband.<\/p>\n<p>This is a unique form of protest in that if enough sites fought back with this methodology (essentially a kill file) then customers of the service would eventually leave and force the ISP to reconsider it&#8217;s stance.  It&#8217;s simply a brilliant methodology.<\/p>\n<p><code>if (get_perspektiv_ban(getenv(\"REMOTE_ADDR\"))) { Header(\"Location: http:\/\/piratbyran.org\/perspektiv\/blockad.php\"); exit; }<\/p>\n<p>function get_perspektiv_ban($iip) {<br \/>\n$a=explode(\".\", $iip);<br \/>\n$ip=str_pad(decbin($a[0]), 8, \"0\", STR_PAD_LEFT).str_pad(decbin($a[1]), 8, \"0\", STR_PAD_LEFT).str_pad(decbin($a[2]), 8, \"0\", STR_PAD_LEFT).str_pad(decbin($a[3]), 8, \"0\", STR_PAD_LEFT);<\/p>\n<p>$match[]=\"193.108.42.0\/23\";<br \/>\n$match[]=\"85.235.16.0\/21\";<br \/>\n$match[]=\"213.185.16.0\/20\";<br \/>\n$match[]=\"81.88.0.0\/20\";<br \/>\n$match[]=\"195.60.68.0\/23\";<br \/>\n$match[]=\"85.235.0.0\/20\";<br \/>\n$match[]=\"217.72.48.0\/20\";<br \/>\n$match[]=\"85.235.16.0\/20\";<br \/>\n$match[]=\"81.186.240.0\/20\";<br \/>\n$match[]=\"213.185.0.0\/19\";<br \/>\n$match[]=\"89.236.0.0\/18\";<\/p>\n<p>while (list(, $value) = each($match)) {<br \/>\n$c=explode(\"\/\", $value);<br \/>\n$b=explode(\".\", $c[0]);<br \/>\n$net=str_pad(decbin($b[0]), 8, \"0\", STR_PAD_LEFT).str_pad(decbin($b[1]), 8, \"0\", STR_PAD_LEFT).str_pad(decbin($b[2]), 8, \"0\", STR_PAD_LEFT).str_pad(decbin($b[3]), 8, \"0\", STR_PAD_LEFT);<\/p>\n<p>if (!strncmp($ip, $net, $c[1])) {<br \/>\nreturn 1;<br \/>\n}<br \/>\n}<br \/>\nreturn 0;<br \/>\n}<\/code><\/p>\n<p><a href=\"http:\/\/duggmirror.com\/tech_news\/Piratebay_strikes_back_blocks_Swedish_ISP\/\"> digg mirror of the story<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I found this to be a unique form of protest by Swedish site The Pirate Bay. they are opposing the tactic of a swedish isp who has decided to block it&#8217;s customers from accessing allmymp3.com. I won&#8217;t go into a long diatribe about the merits of imposing restrictions on your customers. I will however share [&hellip;]<\/p>\n","protected":false},"author":214,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[272,271],"tags":[],"class_list":["post-163","post","type-post","status-publish","format-standard","hentry","category-digital-warfare","category-rights-online"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/users\/214"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":0,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}