Ben's posterous http://bradleyit.com Most recent posts at Ben's posterous posterous.com Mon, 21 May 2012 18:20:12 -0700 Thunderbolt Destroyer 2 http://bradleyit.com/thunderbolt-destroyer-2 http://bradleyit.com/thunderbolt-destroyer-2

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 21 May 2012 18:19:00 -0700 Mark's Thunderbolt Destroyer http://bradleyit.com/marks-thunderbolt-destroyer http://bradleyit.com/marks-thunderbolt-destroyer
Imag0609

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 14 May 2012 14:35:00 -0700 SwirlyProxy http://bradleyit.com/swirlyproxy http://bradleyit.com/swirlyproxy

So I had written up a nice long post about this, then my browser crashed & I lost it, so I'm going to skip the pleasentries and get right to the good stuff:

To do this to an unsuspecting user:

Swirlyproxy

Do this to your system:

  1. install node.js
  2. make sure you have curl and imagemagik
  3. save and run the code below (download)
  4. point your user's browser proxy at <your ip>:8080
  5. ?
  6. profit
var http = require('http'), fs = require('fs'), url = require('url'), exec = require('child_process').exec;

var imgActions = { /* these are some of the more fun mogrify actions that I found, feel free to add */
 maxblur: 'blur 100', blur: 'blur 50', minblur: 'blur 25',
 flip: 'flip', flop: 'flop', swirl: 'swirl 50'
}
var iAction = imgActions.swirl; /* I chose to swirl the pictures by default */
var exts = [ '\.jpg','\.gif','\.png','\.ico' ] /* these are all the image extensions */

http.createServer(function(req, res) {
 var isImage = false;
 var pUrl = url.parse(req.url,true);

 for (ext in exts) { /* determine if the file is an image */
  var regmatch = new RegExp(exts[ext],'i');
  isImage = (pUrl.path.match(regmatch)) ? true : isImage;
 }
 
 if (isImage) { /* if the file is an image */
  var fName = pUrl.pathname.replace(/.*\//,'');
  var curl = exec('curl -L '+req.url+' -o ./images/'+fName,function(err,stdout,stderr){ /* download it */
   var mogrify = exec('mogrify -'+iAction+' ./images/'+fName, function(err,stdout,stderr){ /* mogrify it */
    fs.readFile('./images/'+fName,function(err, data){
     if (err) { console.log(err); res.end(); } /* catch errors */
     else { response(res,data); } /* send the new picture to the user */
    });
   });
  });
 } else { /* everything not an image is written to the browser */
  var curl = exec('curl -L '+req.url, function(err,stdout,stderr){ /* sends stdout to the browser */
   response(res,stdout);
  });
 }
}).listen(8080);

function response(res,data) {
 res.writeHead(200);
 res.write(data);
 res.end();
}

*C-ing my A* : there are probably legal implications if you spoof/poison a network, don't do anything illegal.

The more detailed explanation is that when you run the node, it will set up an HTTP listener on port 8080, any requests that it gets, it converts into curl requests.  If it's requesting an image, it downloads the image to your machine, modifies it, and sends it on to the user.  If the file isn't a picture, it's sent on to the user.

This will NOT do HTTPS, so don't bother with it.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Tue, 08 May 2012 13:37:41 -0700 LEGO Buddy - May 8th http://bradleyit.com/lego-buddy-may-8th http://bradleyit.com/lego-buddy-may-8th

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 07 May 2012 13:23:45 -0700 LEGO buddy - May 7th http://bradleyit.com/lego-buddy-may-7th-66075 http://bradleyit.com/lego-buddy-may-7th-66075

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Wed, 25 Apr 2012 08:57:28 -0700 Attack of the LEGO Drones http://bradleyit.com/attack-of-the-lego-drones http://bradleyit.com/attack-of-the-lego-drones

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 23 Apr 2012 08:24:00 -0700 Software Updates and your OS http://bradleyit.com/software-updates-and-your-os http://bradleyit.com/software-updates-and-your-os
Media_httpmthruffiles_ybbyn

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Tue, 17 Apr 2012 08:31:04 -0700 LEGO buddies for the today http://bradleyit.com/lego-buddies-for-the-today http://bradleyit.com/lego-buddies-for-the-today

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Thu, 12 Apr 2012 12:34:32 -0700 Working hard or ... http://bradleyit.com/working-hard-or http://bradleyit.com/working-hard-or
Imag0582

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 26 Mar 2012 09:37:06 -0700 LEGO Distraction of the Day http://bradleyit.com/lego-distraction-of-the-day http://bradleyit.com/lego-distraction-of-the-day

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Sun, 18 Mar 2012 16:04:00 -0700 Mark's Mech - Dark Sparrow http://bradleyit.com/marks-mech-dark-sparrow http://bradleyit.com/marks-mech-dark-sparrow
Imag0575

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Fri, 16 Mar 2012 14:06:38 -0700 Today's LEGO Buddy http://bradleyit.com/todays-lego-buddy http://bradleyit.com/todays-lego-buddy

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Tue, 13 Mar 2012 09:23:38 -0700 Spider Mech LEGO http://bradleyit.com/spider-mech-lego http://bradleyit.com/spider-mech-lego

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 12 Mar 2012 14:18:38 -0700 Today's LEGO Distraction http://bradleyit.com/todays-lego-distraction http://bradleyit.com/todays-lego-distraction

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Sat, 10 Mar 2012 15:10:37 -0800 Battle Ground Library Star Wars Party http://bradleyit.com/battle-ground-library-star-wars-party http://bradleyit.com/battle-ground-library-star-wars-party

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 05 Mar 2012 18:21:11 -0800 Bacon Hotdog Macaroni & Cheese http://bradleyit.com/bacon-hotdog-macaroni-cheese http://bradleyit.com/bacon-hotdog-macaroni-cheese

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Tue, 28 Feb 2012 15:35:00 -0800 Monkey see... http://bradleyit.com/monkey-see http://bradleyit.com/monkey-see

I lol'd =)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Tue, 21 Feb 2012 08:22:00 -0800 Geeks vs. Hipsters http://bradleyit.com/geeks-vs-hipsters http://bradleyit.com/geeks-vs-hipsters
Media_httpwwwbecomeca_dhxrl

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Wed, 15 Feb 2012 11:22:26 -0800 It's Bring Your LEGO to Work Day! http://bradleyit.com/its-bring-your-lego-to-work-day http://bradleyit.com/its-bring-your-lego-to-work-day
Imag0532

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley
Mon, 13 Feb 2012 23:17:48 -0800 Legos Creations from Cactus Jack http://bradleyit.com/legos-creations-from-cactus-jack http://bradleyit.com/legos-creations-from-cactus-jack

For everyone who doesn't know, Cactus Jack is a story that I made up to entertain the kiddos.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/122924/4321_1_.jpg http://posterous.com/users/4aQPyRBylZW9 Ben Bradley Ben Ben Bradley