Update fastgate.py

This commit is contained in:
nicole 2024-11-16 21:34:15 +00:00
parent 4ca0221bba
commit 094d6fd196

View file

@ -4,7 +4,20 @@ import requests
import time
import json
import os
import argparse
# Initialize argument parser
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--user")
parser.add_argument("-p", "--password")
# Parse the argumentw
args = parser.parse_args()
user = args.user
password = args.password
# Initialize current folder
thisfolder = os.path.dirname(os.path.abspath(__file__))
cookies_file = os.path.join(thisfolder, "cookies.json")
@ -47,8 +60,8 @@ def login_and_save_tokens():
}
login_data = {
'cmd': '3',
'username': 'admin', # Replace with actual username
'password': '6453', # Replace with actual password
'username': user,
'password': password,
'remember_me': '1',
'act': 'nvset',
'service': 'login_confirm',