Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/jackit
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def confirm_root():
@click.option('--autopwn', is_flag=True, help="Automatically find and attack all targets")
@click.option('--all-channels', is_flag=True, help="Send attack to all detected channels")
@click.option('--keylogging', is_flag=True, help="Log keystrokes for XOR encrypted MS keyboards")
def cli(debug, script, lowpower, interval, layout, address, vendor, reset, autopwn, all_channels, keylogging):
@click.option('--index', default=0, help="Dongle index to use")
def cli(debug, script, lowpower, interval, layout, address, vendor, reset, autopwn, all_channels, keylogging, index):

banner()
confirm_root()
Expand Down Expand Up @@ -172,7 +173,7 @@ def cli(debug, script, lowpower, interval, layout, address, vendor, reset, autop

# Initialize the radio
try:
jack = mousejack.MouseJack(lowpower, debug, reset)
jack = mousejack.MouseJack(lowpower, debug, reset, index)
except Exception as e:
if e.__str__() == "Cannot find USB dongle.":
_print_err("Cannot find Crazy PA USB dongle.")
Expand Down
10 changes: 5 additions & 5 deletions jackit/mousejack.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
class MouseJack(object):
''' Class for scanning, pinging and fingerprint devices '''

def __init__(self, disable_lna=False, debug=False, reset=False):
def __init__(self, disable_lna=False, debug=False, reset=False, index=0):
self.channels = range(2, 84)
self.channel_index = 0
self.debug = debug
self.devices = {}
self.ping = [0x0f, 0x0f, 0x0f, 0x0f]
self.plugins = [microsoft, microsoft_enc, logitech, amazon]
self.init_radio(disable_lna, reset)
self.init_radio(disable_lna, reset, index)

def _debug(self, text):
if self.debug:
Expand All @@ -28,11 +28,11 @@ def from_display(self, data):
def to_display(self, data):
return ':'.join('{:02X}'.format(x) for x in data)

def init_radio(self, disable_lna, reset):
def init_radio(self, disable_lna, reset, index):
if reset:
self._debug("Resetting USB dongle")
nrf24_reset.reset_radio(0)
self.radio = nrf24.nrf24(0)
nrf24_reset.reset_radio(index)
self.radio = nrf24.nrf24(index)
if not disable_lna:
self._debug("Enabled LNA")
self.radio.enable_lna()
Expand Down