Skip to content

4.1 Bluetooh

Salvador Mendoza edited this page Jan 19, 2017 · 2 revisions

4.1 Bluetooth

SamyKam has integrated a special code to handle Bluetooth connections(1 connection at a time). Users can installed any Bluetooth app to send raw data to the socket and receives an answer back depending of the command. There are many different commands that users can execute.

  • run - Run MagSpoof
  • track[1-10] [track data] - Add MagSpoof track
  • clear - Clear all the MagSpoofPI tracks in the JSON file to add new ones
  • wifi [SSID] [password] - Add wifi configuration
  • quit - Close Bluetooth socket
  • any other command - Execute any command in the shell

If the user sends a command and it is not in the previous list, it will be execute it in the shell using this code:

def runCommandlog(command): #Mini-shell handler
    p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE)
    result = p.communicate()[0].strip()
    return result

Example of running a pwd command using Bluetooth spp pro Android app:

Bluetooth testing

Clone this wiki locally