NanoyMaster Posted May 2, 2010 Share Posted May 2, 2010 (edited) heres my phukducky.. designed to be modular, and capable of doing a lot. hopefully easy code to read if you create any modules/snipits or have inprovements please chuck me an email I will hopefully be updating this soon, literally got my teensy 12 hrs ago and made this also soldered on a dip switch to pins 14 - 21 (analog) this will perform 1 module at a time but capable of doing up to 128 :S .. early.. math bad if you have any questions, please post them below void setup() { pinMode(11, OUTPUT); pinMode(14, INPUT_PULLUP); // Dip - debug switch pinMode(15, INPUT_PULLUP); // Dip pinMode(16, INPUT_PULLUP); // Dip pinMode(17, INPUT_PULLUP); // Dip pinMode(18, INPUT_PULLUP); // Dip pinMode(19, INPUT_PULLUP); // Dip pinMode(20, INPUT_PULLUP); // Dip pinMode(21, INPUT_PULLUP); // Dip } void loop(){ delay(4000); int pin_struct[] = { 0, 200, 64, 32, 16, 8, 4, 2, 1 }; int multiplier = 0; int binary = 0; char* description[500]; description[0] = "\r-----end-----\r" "Phukducky 1.0 By NanoyMaster\r" "For help/support/documentation Please visit http://www.nanoy.org\r" "Designed to be Modular and Easy.\r" "Feel free to email nanoymaster[at]gmail[dot]com"; description[1] = "CrazyMouse - moves and clicks mouse randomly\r"; description[2] = "end"; // need to keep the last one as "end" for(int thispin=14; thispin < 22;thispin++){ // get the binary value (including debug bit) if(!digitalRead(thispin)){ digitalWrite(ledPin, HIGH); multiplier = thispin - 13; binary = binary + (1 * pin_struct[multiplier]); } } if(binary >= 200 ){ // if debuging enabled then run debug delay(3000); Keyboard.print("\rDIP Binary = "); Keyboard.print(binary - 200); for(int debugno=1; debugno <=129; debugno++){ if(description[debugno] != "end"){ Keyboard.print(debugno); Keyboard.print(") "); Keyboard.print(description[debugno]); delay(1000); }else{ Keyboard.print(description[0]); die(); } } } // main program functions go here if(binary == 1){ Mouse.move(random(-100, 100) ,random(-100, 100) ); Mouse.click(); } // end main functions } void die(){ // failsafe... if you need to exit the main loop, or just want to run once while(1){ digitalWrite(ledPin, LOW); delay(250); digitalWrite(ledPin, HIGH); delay(250); } } as you can see you just have to add modules under main functions and add the description in the descriptions section. Edited May 3, 2010 by NanoyMaster Quote Link to comment Share on other sites More sharing options...
NanoyMaster Posted May 2, 2010 Author Share Posted May 2, 2010 --space for updates-- Quote Link to comment Share on other sites More sharing options...
NanoyMaster Posted May 2, 2010 Author Share Posted May 2, 2010 --space for updates-- Quote Link to comment Share on other sites More sharing options...
NanoyMaster Posted May 2, 2010 Author Share Posted May 2, 2010 --space for updates-- Quote Link to comment Share on other sites More sharing options...
Sl45h3R Posted May 2, 2010 Share Posted May 2, 2010 --space for updates-- Your lucky you havn't been warned for this, as this is spamming, if you need more space, just edit you first post. The descriptions are just a waste of space as far as I can tell, just use comments. Quote Link to comment Share on other sites More sharing options...
NanoyMaster Posted May 2, 2010 Author Share Posted May 2, 2010 (edited) not quite the feedback I was expecting. but I'll roll with it. if you know how I can delete them I will, but I can't find the "delete post" button and as for the descriptions. if you've got your stick "in the feild" you can just set the debug switch, check what you want to run and go for it, without having to remember all the modules/snippits you have added in if you don't want to add them then don't, just set description[1] = "end"; and leave them out Edited May 2, 2010 by NanoyMaster Quote Link to comment Share on other sites More sharing options...
Sl45h3R Posted May 2, 2010 Share Posted May 2, 2010 Yeah, sorry that didn't come out properly. Ill try again: It looks good and promising, but some of the things you could improve on are... Quote Link to comment Share on other sites More sharing options...
Seshan Posted May 2, 2010 Share Posted May 2, 2010 (edited) If you don't go to m.twitter.com you don't need tab, twitter.com will put the cursor in the tweet box. See here. http://www.hak5.org/forums/index.php?showtopic=16453 Oh and if you are going to plain right up copy irongeeks code, you should give him credit. Edited May 2, 2010 by Seshan Quote Link to comment Share on other sites More sharing options...
NanoyMaster Posted May 2, 2010 Author Share Posted May 2, 2010 (edited) updated that wasn't really the point they were just examples of modules.. how to code them or whatever, removed now. Edited May 3, 2010 by NanoyMaster Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.