Skip to content
Snippets Groups Projects
Commit b353c9b6 authored by Younus Salman's avatar Younus Salman
Browse files

trying to fix wifi

parent 26284f6b
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ def location_update(gpsd: GpsPoller, iroha: DripIrohaAccount, flight_id): ...@@ -109,7 +109,7 @@ def location_update(gpsd: GpsPoller, iroha: DripIrohaAccount, flight_id):
) )
if is_wifi: if is_wifi:
beacon_wifi(mac_arr, payload=payload) beacon_wifi(mac_arr, payload)
else: else:
# Set (Extended) Advertising command # Set (Extended) Advertising command
if is_bt5: if is_bt5:
...@@ -250,10 +250,9 @@ def main(): ...@@ -250,10 +250,9 @@ def main():
) )
parser.add_argument( parser.add_argument(
"--wifi", "--wifi",
dest="activate_wifi" dest="activate_wifi",
default= False, default= False,
action= "store_true" action= "store_true",
type= bool
) )
parser.add_argument( parser.add_argument(
"--gps", "--gps",
......
from scapy.layers.dot11 import Dot11, Dot11Beacon, RadioTap, sendp, Dot11Elt from scapy.all import *
#from scapy.layers.dot11 import Dot11, Dot11Beacon, RadioTap, sendp, Dot11Elt
# from scapy.all import hexdump # Used in commented code so uncomment when you uncomment the code # from scapy.all import hexdump # Used in commented code so uncomment when you uncomment the code
from uuid import getnode as get_mac from uuid import getnode as get_mac
import os import os
...@@ -54,7 +55,7 @@ def beacon_wifi(mac_address, element_info): ...@@ -54,7 +55,7 @@ def beacon_wifi(mac_address, element_info):
# '\x00\x00')) # '\x00\x00'))
# frame = RadioTap()/dot11/dot_11_beacon/ dot_11_element /rsn # frame = RadioTap()/dot11/dot_11_beacon/ dot_11_element /rsn
# frame.show() # Prints a readable version of the frame that is being sent frame.show() # Prints a readable version of the frame that is being sent
# hexdump(frame) # Prints a hexdump of the frame that is being sent. # hexdump(frame) # Prints a hexdump of the frame that is being sent.
...@@ -64,5 +65,5 @@ def beacon_wifi(mac_address, element_info): ...@@ -64,5 +65,5 @@ def beacon_wifi(mac_address, element_info):
mac = hex(get_mac()) # fetches device mac address mac = hex(get_mac()) # fetches device mac address
mac_arr = list(bytearray.fromhex(mac[2:])) # converts it into int mac_arr = list(bytearray.fromhex(mac[2:])) # converts it into int
#vendor_info = '130042200100250B3FA14C1CEE522E25ADD5B000000000000000' # Static message to send vendor_info = '130042200100250B3FA14C1CEE522E25ADD5B000000000000000' # Static message to send
#beacon_wifi(mac_arr, vendor_info) # Actual call to the method beacon_wifi(mac_arr, vendor_info) # Actual call to the method
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment