[text] date

Viewer

  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. from scapy.all import *
  5. from bluetooth import *
  6.  
  7.  
  8. def retBtAddr(addr):
  9.     btAddr=str(hex(int(addr.replace(':', ''), 16) + 1))[2:]
  10.     btAddr=btAddr[0:2]+":"+btAddr[2:4]+":"+btAddr[4:6]+":"+\
  11.     btAddr[6:8]+":"+btAddr[8:10]+":"+btAddr[10:12]
  12.     return btAddr
  13.  
  14. def checkBluetooth(btAddr):
  15.     btName = lookup_name(btAddr)
  16.     if btName:
  17.         print '[+] Detected Bluetooth Device: ' + btName
  18.     else:
  19.         print '[-] Failed to Detect Bluetooth Device.'
  20.  
  21.  
  22. def wifiPrint(pkt):
  23.     iPhone_OUI = 'd0:23:db'
  24.     if pkt.haslayer(Dot11):
  25.         wifiMAC = pkt.getlayer(Dot11).addr2
  26.         if iPhone_OUI == wifiMAC[:8]:
  27.             print '[*] Detected iPhone MAC: ' + wifiMAC
  28.             btAddr = retBtAddr(wifiMAC)
  29.             print '[+] Testing Bluetooth MAC: ' + btAddr
  30.             checkBluetooth(btAddr)
  31.  
  32.  
  33. conf.iface = 'mon0'
  34. sniff(prn=wifiPrint)
  35.  

Editor

You can edit this paste and save as new:


File Description
  • date
  • Paste Code
  • 10 Dec-2023
  • 928 Bytes
You can Share it: