Exemple #1
0
from tkinter import *
from CDevice_H3C_ER3200G2 import CDevice_H3C_ER3200G2
from CDeviceType import CDeviceVersion, CAPTemplateType
from const import Const
from pip._internal import self_outdated_check
import threading
from _overlapped import NULL
from tkinter import ttk  #装载tkinter.ttk模块,用于Python3

const = Const()
const.ROUTER_MANAGERMENT_URL = "http://172.16.1.203:8080/"
#"http://192.168.1.1/";#"http://172.16.1.1/";
const.ROUTER_MANAGERMENT_USERNAME = "******"
#"admin";
const.ROUTER_MANAGERMENT_PASSWORD = "******"
#"admin@123@";


class CMenu:

    #构造函数
    def __init__(self, oWindowMain):
        self.m_oWindowMain = oWindowMain
        self.m_varRadioAccessMode = StringVar()
        self.m_varVLANInterfaceDHCPIsEnabled = IntVar()
        self.m_varSmartAPTemplateIsEnabled = IntVar()
        self.m_oNoteBook = ttk.Notebook(oWindowMain)
        self.m_otabLineConnection = Frame(self.GetNoteBook(), bg='#F0F0F0')
        self.GetNoteBook().add(self.GetTabLineConnection(), text='有线配置')
        self.m_otabWifiConnection = Frame(self.GetNoteBook(), bg='#F0F0F0')
Exemple #2
0
'''
Created on 2020-10-14

@author: Dizzy
'''

from CDevice_H3C_ER3200G2 import CDevice_H3C_ER3200G2
from CDeviceType import CDeviceVersion
from const import Const

const = Const()
const.ROUTER_MANAGERMENT_URL = "http://192.168.1.1/"
#"http://172.16.1.1/";
const.ROUTER_MANAGERMENT_USERNAME = "******"
#"admin";
const.ROUTER_MANAGERMENT_PASSWORD = "******"
#"admin@123@";

if __name__ == "__main__":
    device = CDevice_H3C_ER3200G2(CDeviceVersion.H3C_ERHMG2_MNW100_R1118)
    device.LoginPrepare(const.ROUTER_MANAGERMENT_URL,
                        const.ROUTER_MANAGERMENT_USERNAME,
                        const.ROUTER_MANAGERMENT_PASSWORD)
    device.LoginInputUsernamePassword()
    device.LoginSubmit()
    print(device.GetUsername(), device.GetPassword())

    #configure static line
    #device.InitConnectToInternet_StaticLine("10.1.1.3", "255.255.255.0", "10.1.1.1", "218.2.135.1", "61.147.37.1");#IP mask gateway DNS1 DNS2
    #device.ConnectToInternet_StaticLine();
    #device.CloseBrowser();