Пример #1
0
 def __init__(self, addr, port, username, password, session, debug=False):
     BaseSetter.__init__(self, addr, port, username, password, session, debug)
     auth_cookie = base64.b64encode(self.try_username + ':' + self.try_passwd)
     self.headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'
     self.headers['Accept-Language'] = 'en-US'
     self.headers['Referer'] = ''
     self.headers['Cookie'] = 'tLargeScreenP=1; subType=pcSub; Authorization=Basic ' + auth_cookie
    def __init__(self, addr, port, username, password, session, debug):
        BaseSetter.__init__(self, addr, port, username, password, session, debug)

        self.headers = {
            b'User-Agent': b'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
            b'Accept-Language': b'en-US',
            b'Referer': '',
        }
        self.base_url = 'http://' + self.addr + ':' + str(port)
Пример #3
0
    def __init__(self, addr, port, username, password, session, debug):
        BaseSetter.__init__(self, addr, port, username, password, session, debug)

        self.headers = {
            b'User-Agent': b'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
            b'Accept-Language': b'en-US',
            b'Referer': '',
        }
        self.base_url = 'http://' + self.addr + ':' + str(port)
Пример #4
0
    def __init__(self, addr, port, username, passwd, session, debug=False):
        BaseSetter.__init__(self, addr, port, username, passwd, session, debug)
        auth_cookie = base64.b64encode(self.username + ':' + self.password)
        self.headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
        self.headers['Accept-Language'] = 'en-US',
        self.headers['Referer'] = '',
        self.headers['Cookie'] = 'tLargeScreenP=1; subType=pcSub; Authorization=Basic ' + auth_cookie

        self.wan_type_search = '/userRpm/WanCfgRpm.htm'
        self.dyna_para = '?Save=save&dnsserver=[dns1]&dnsserver2=[dns2]&manual=2&mtu=1500&wantype=0'
        self.dyna_ref = '/userRpm/WanDynamicIpCfgRpm.htm?wan=0'
        self.ppp_para = "?wan=0&lcpMru=1480&ServiceName=&AcName=&EchoReq=0" \
                        "&manual=2&dnsserver=[dns1]&dnsserver2=[dns2]&Save=Save&Advanced=Advanced"
        self.ppp_ref = '/userRpm/PPPoECfgAdvRpm.htm?Advanced=Advanced&wan=0'
        self.static_para = "?wan=0&wantype=1&ip=[ip]&mask=[mask]" \
                           "&gateway=[gateway]&mtu=1500&dnsserver=[dns1]&dnsserver2=[dns2]&Save=save"
        self.static_ref = '/userRpm/WanStaticIpCfgRpm.htm'
Пример #5
0
    def __init__(self, addr, port, username, passwd, session, debug=False):
        BaseSetter.__init__(self, addr, port, username, passwd, session, debug)
        auth_cookie = base64.b64encode(self.username + ':' + self.password)
        self.headers[
            'User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
        self.headers['Accept-Language'] = 'en-US',
        self.headers['Referer'] = '',
        self.headers[
            'Cookie'] = 'tLargeScreenP=1; subType=pcSub; Authorization=Basic ' + auth_cookie

        self.wan_type_search = '/userRpm/WanCfgRpm.htm'
        self.dyna_para = '?Save=save&dnsserver=[dns1]&dnsserver2=[dns2]&manual=2&mtu=1500&wantype=0'
        self.dyna_ref = '/userRpm/WanDynamicIpCfgRpm.htm?wan=0'
        self.ppp_para = "?wan=0&lcpMru=1480&ServiceName=&AcName=&EchoReq=0" \
                        "&manual=2&dnsserver=[dns1]&dnsserver2=[dns2]&Save=Save&Advanced=Advanced"
        self.ppp_ref = '/userRpm/PPPoECfgAdvRpm.htm?Advanced=Advanced&wan=0'
        self.static_para = "?wan=0&wantype=1&ip=[ip]&mask=[mask]" \
                           "&gateway=[gateway]&mtu=1500&dnsserver=[dns1]&dnsserver2=[dns2]&Save=save"
        self.static_ref = '/userRpm/WanStaticIpCfgRpm.htm'