Hello, I am trying to use this script to change the password on a given Wireless SSID. I have installed the python modules: meraki & requests . Customized according to my ORG Info. like API_Key, Network_ID, SSID_Number When I run the script, I get error as : python3 pwdmeraki.py === File "/home/user/Desktop/pwdmeraki.py", line 21 return ''.join(random.choice(character_types) for i in range(stringlength)) ^ IndentationError: expected an indented block after function definition on line 20 === The lines 19 to 22 look like === gmail_password = "My_Gmail_App_Password" # enter the generated gmail app password here sender_email = "App_Password_User@gmail.com" # sending gmail address receiver_email = "receive@gmail.com" # receiving address(es) # the below two lines are line 20 and 21 def random_string(stringlength=password_length): return ''.join(random.choice(character_types) for i in range(stringlength)) def set_new_psk(new_psk, ssid=ssid_number): url = "https://api.meraki.com/api/v0/networks/"+network_id+"/ssids/"+str(ssid) payload = "{\r\n \"psk\": \""+str(new_psk)+"\"\r\n}" headers = { 'Accept': "*/*", 'Content-Type': "application/json", 'cache-control': "no-cache", 'X-Cisco-Meraki-API-Key': api_key } === How to solve this ?
... View more