2 <html data-VERSION='
0.1'
>
4 ***************** ImgurFusker version 0.1 *****************
5 ******** imgurfusker@hmamail.com (expires 7/3/14) *********
6 **************** Written on July 4th, 2014. ***************
7 *********** God bless America. God bless nudes. ***********
11 This is a small utility to automatically search for nudes on Imgur via a brute force method.
12 (This is known as "fusking").
14 It was inspired by http://noisediary.com/.
16 I also refer to nudes as "nuuus" throughout this page because I don't fucking feel like putting 'nudes' everywhere.
21 The code was originally ripped right from NoiseDiary, but since then it has been heavily
22 modified and rewritten. Honestly, the person who wrote NoiseDiary can't fucking code anyway.
24 This page uses jQuery. If you don't know what jQuery is then fuck off.
26 The image detection is done by a library known as nude.js.
27 https://github.com/pa7/nude.js
31 Q: Why did you do this?
32 A: Hello? Fucking nudes.
34 Q: Why does it keep finding non-nudes and skip B&W nudes?
35 A: Because fuck you, that's why. I didn't write the library.
36 You think you can do better? Go write a better library and come back to me. I'll use your library.
38 Q: Why is it freezing up my computer? You fucking suck at this.
39 A: No YOU suck. Scanning the image is resource intensive and can freeze your browser if the FAIL_TIME option is set too low.
42 ~~~ LICENSING BULLSHIT ~~~
44 This program is free software. It comes without any warranty, to
45 the extent permitted by applicable law. You can redistribute it
46 and/or modify it under the terms of the Do What The Fuck You Want
47 To Public License, Version 2, as published by Sam Hocevar. See
48 http://www.wtfpl.net/ for more details.
52 <meta http-equiv=
"content-type" content=
"text/html; charset=UTF-8">
53 <meta charset=
"utf-8">
54 <meta http-equiv=
"X-UA-Compatible" content=
"IE=edge">
55 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
56 <meta name=
"description" content=
"">
57 <meta name=
"author" content=
"">
59 <title>ImgurFusker
</title>
60 <link rel=
"stylesheet" type=
"text/css" href=
"http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic">
63 font-family:
"Open Sans",
"Helvetica Neue",Helvetica,Arial,sans-serif;
65 @media (min-width:
1200px) { /* Large desktop */
66 body { padding:
0 50px; }
69 @media (min-width:
768px) and (max-width:
1199px) { /* Portrait tablet to landscape and desktop */
70 body { padding:
0 30px; }
73 @media (max-width:
767px) { /* Landscape phone to portrait tablet */
74 body { padding:
0 20px; }
77 @media (max-width:
480px) { /* Landscape phones and down */
78 body { padding:
0 5px; }
84 font-family: 'Open Sans','Courier';
92 font-family: 'Open Sans','Courier';
97 a:hover, a:visited, a:link, a:active {
98 text-decoration: none;
102 vertical-align: text-bottom;
106 display: inline-block;
110 vertical-align: middle;
112 background-image: none;
120 background-color: #E7E7E7;
121 border:
1px solid #DADADA;
124 background-color: #DADADA;
137 display:inline-block;
151 border:
2px solid transparent;
153 #images img:hover, .delort:hover{
154 border-color: #ff0000;
171 border:
2px solid transparent;
177 background-color: #
333;
179 .delort, .delort:focus, .delort:hover {
183 border-color: #ff0000;
198 background-color: #FFFFE0;
208 min-height:
100px; //adjust as per need
209 min-width:
350px; //adjust as per need
213 border:
2px solid #
999;
214 border-radius:
10px
10px;
232 <button id=
"bigass-button" class=
"btn btn-block">Start!
</button>
235 <h4 id=
"examining"></h4>
236 <img id=
"current-img">
239 <div id=
"images"></div>
241 <div onclick='document.getElementById(
"cache-popup").style.
visibility=
"visible";'
class=
"btn" style=
"float: right">
244 <div id=
"cache-popup" style=
"visibility: hidden;" >
245 <button onclick='document.getElementById(
"cache-popup").style.
visibility=
"hidden";'
class=
"btn" style=
"float:right; padding:0 2px; font-weight:100">x
</button>
247 <div id=
"cache-images">
251 <div class='thumb-container' id='img-template'
style=
"display:none">
252 <a href='' target='_blank' class='thumb'
>
253 <img src='' class=''
>
255 <span class='delort'
>x
</span>
256 <a href='' class='sauce' target='_blank' rel='noreferrer' alt='original imgur page'
>
257 <img src='http://imgur.com/favicon.ico'
>
260 <canvas id=
"myCvs" style=
"display:none"></canvas>
261 <!-- Popup itself -->
263 <script src=
"http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
264 <script src=
"nude.js" type=
"text/javascript"></script>
265 <script src=
"worker.nude.js" type=
"text/javascript"></script>
266 <!--<script src="noworker.nude.js" type="text/javascript"></script>-->
269 <script type=
"text/javascript">
272 var VERSION
= $(document
.getElementsByTagName("html")[0]).data('version')
275 DEBUG
: false, // Will flag EVERY image as a nuuu.
276 FAIL_TIME
: 500, // How long to wait, in ms, between tries (NOTE: Setting this too low may cause your browser to freeze)
277 SUCCESS_TIME
: 10000, // How long to wait, in ms, after finding a nuuu to continue searching (This is just for you to look at the nuuu.)
278 STOP_WHEN_FIND
: false, // Whether or not to automatically stop after
279 SCAN_THUMBNAILS
: false, // Scan the thumbnail instead of the full image. Will be a lot faster, but will lead to MANY more false positives.
280 SHOW_CURRENT
: true, // Whether or not to show the image currently being scanned.
283 var imgurcache
= new Array();
285 var thumb_link = function(id
) { return 'http://i.imgur.com/'+id
+'s.png'}
286 var img_link = function(id
) { return 'http://i.imgur.com/'+id
+'.jpg'}
289 $('h1').append(" v" + VERSION
);
290 document
.title
= document
.title
+ " v" + VERSION
;
292 $('h1').append("<small style='color:red; font-size:.3em;'>Debug mode</small>");
293 if(!opt
.SHOW_CURRENT
) {
294 $('#current').css('height', 'auto');
295 $('#current img').css('display', 'none');
302 status: function(txt
, clr
) {
303 $('#examining').text(txt
);
304 $('#examining').css('color', clr
);
310 console
.log(self
.stop());
314 var id
= self
.random(5),
316 img
.crossOrigin
= "Anonymous";
318 function fail(fail_id
, fail_reason
) {
320 self
.status("Checked " + fail_id
+ ". " + fail_reason
, '#333')
323 setTimeout(function(){self
.hunt()}, opt
.FAIL_TIME
);
326 img
.onload = function() {
327 // PHASE 1: Look for an actual image
328 if ((img
.width
==198 && img
.height
==160) || (img
.width
==161 && img
.height
==81)) {
329 // assume this is an imgur error image, and retry.
330 fail(id
, "Hunting for next image...");
333 //We've found AN image; now to do the actual checking
334 $('#cache-images').append('<a href="'+img_link(id
)+'"><img src="'+thumb_link(id
)+'"></a>');
336 var cvs
= document
.getElementById('myCvs'),
337 ctx
= cvs
.getContext('2d');
338 cvs
.height
= img
.height
;
339 cvs
.width
= img
.width
;
340 ctx
.drawImage( img
, 0, 0);
341 var datum
= cvs
.toDataURL();
345 var img2
= document
.getElementById('current-img');
346 img2
.onerror = function(wat
) {
347 self
.status("A horrible error occurred during Phase 2.", 'red')
352 img2
.onload = function() {
353 self
.status("Checking " + id
+ " for nuuity", '#000');
359 nude
.scan(function(is_nude
){
360 if(is_nude
|| opt
.DEBUG
)
363 fail(id
, "Not a nude.");
366 self
.status("Checking " + id
, '#000')
372 if(opt
.SCAN_THUMBNAILS
)
373 img
.src
= thumb_link(id
);
375 img
.src
= img_link(id
);
377 found: function(id
) {
380 var new_node
= $('#img-template').clone();
381 new_node
.css('display', 'inline');
382 new_node
.attr('id', "thumb" + id
);
383 new_node
.find('.thumb').attr("href", img_link(id
));
384 new_node
.find('.thumb img').attr("src", thumb_link(id
));
385 new_node
.find('.thumb img').addClass("thumb" + id
);
386 new_node
.find('.sauce').attr('href', "http://imgur.com/" + id
);
387 new_node
.find('.delort').click(function() { $(this).parent().remove() });
388 $('#images').append(new_node
);
390 self
.status("Aw yiss, found a nuuu at " + id
, '#3c0');
393 if(!(opt
.SUCCESS_TIME
>0)) {
397 // Wait a few seconds so we can view the nuuu
398 var until
= opt
.SUCCESS_TIME
;
399 $('#examining').append(' <b>' + (until
/100) + '</b
>');
400 var until_f = function() {
402 $('#examining b
').remove();
410 $('#examining b
').text((until/100));
411 console.log("Starting again in " + until);
412 setTimeout(until_f, 100);
415 setTimeout(until_f, 100);
417 random: function(len) {
418 var text = new Array();
419 var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
420 for (var i=0; i < len; i++) {
421 imgurchar = possible.charAt(Math.floor(Math.random() * possible.length));
422 possible.replace(imgurchar, '');
423 text.push(imgurchar);
425 text = text.join('');
426 if (imgurcache.indexOf(text) == -1) {
427 imgurcache.push(text);
435 console.log("The hunt is on");
436 self.stop_plz = false; //gooby, pls
438 $('#bigass
-button
').unbind('click
', self.start);
439 $('#bigass
-button
').bind('click
', function() {
440 console.log("Stopping");
441 self.stop_plz = true;
443 $('#examining i
').remove();
444 $("#bigass-button").text("Stop");
446 stop: function(nuuu_obtained) {
447 if(self.stop_plz || (nuuu_obtained!=undefined && opt.STOP_WHEN_FIND)) {
448 if($('#examining i
').remove())
449 $('#examining
').prepend("<i>[Stopped]</i> ");
450 $("#bigass-button").text("Resume");
451 $("#bigass-button").unbind('click
', self.stop);
452 $("#bigass-button").bind('click
', Imgur.start);
458 $('#bigass
-button
').click(Imgur.start);