Update fastgate.py
This commit is contained in:
parent
4ca0221bba
commit
094d6fd196
1 changed files with 15 additions and 2 deletions
17
fastgate.py
17
fastgate.py
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue