Secrets & Global Site Configuration
This commit is contained in:
@@ -3,6 +3,10 @@ import requests
|
||||
from urllib3.exceptions import InsecureRequestWarning
|
||||
import jq
|
||||
import json
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
# Function to authenticate and get token
|
||||
def authenticate(device_ip, payload):
|
||||
@@ -275,13 +279,15 @@ requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
|
||||
# get_API(device_ip_address_https, token)
|
||||
# print("\n")
|
||||
|
||||
default_user = str(os.getenv("DEFAULT_MOXA_USER"))
|
||||
default_password = str(os.getenv("DEFAULT_MOXA_PASSWORD"))
|
||||
|
||||
for i in range(193, 222):
|
||||
upgrade_url = "https://files.thingsprocloud.com/package/Upgrade_AIG-301_2.4.0-4020_IMG_1.4_to_1.5.deb.yaml"
|
||||
payload_auth = {
|
||||
"acceptEULA": True,
|
||||
"name": "admin",
|
||||
"password": "admin@123"
|
||||
"name": default_user,
|
||||
"password": default_password
|
||||
}
|
||||
|
||||
device_ip_address = str("10.84.171." + str(i))
|
||||
|
||||
Reference in New Issue
Block a user