Exemple #1
0
def redirest_network(self):
    result1 = network_control.ssh_wifidog()
    assert result1, u"wifidog进程没起来,无法进行下一步"
    result2 = network_control.rand_redirect(self)
    assert result2, u"网页认证不成功,无法进行下一步"
    result3 = network_control.rand_network(self)
    assert result3, u"认证后网页访问失败,无法进行下一步"
    data = privoxy_control.get_js(self)
    return data
Exemple #2
0
def add_weblist(self, weblist):
    weblist_control.tabmenu_weblist(self)
    for i in weblist:
        weblist_control.add_button(self)
        weblist_control.set_web(self, 0, i)
    weblist_control.apply(self)
    time.sleep(40)
    result = network_control.ssh_wifidog()
    assert result, "wifidog进程没起来,无法进行下一步"
Exemple #3
0
def remove_web(self):
    weblist_control.tabmenu_weblist(self)
    weblist = weblist_control.get_weblist(self)
    while 1:
        weblist_control.remove_button(self, 1)
        tmp = weblist_control.get_weblist(self)
        if tmp == [""]:
            break
    weblist_control.apply(self)
    time.sleep(40)
    result = network_control.ssh_wifidog()
    assert result, "wifidog进程没起来,无法进行下一步"
    web = random.sample(weblist, 1)
    print u"现在验证删除网站白名单的%s,是否生效" % web
    return network_control.redirect(self, web)
Exemple #4
0
def edit_hostname(self, hostname):
    general_control.set_wifidog_hostname(self, hostname)
    general_control.apply(self)
    time.sleep(40)
    result = network_control.ssh_wifidog()
    assert result, u"wifidog进程没起来,无法进行下一步"
Exemple #5
0
def edit_wifidog(self, status):
    general_control.set_wifidog_enable(self, status)
    general_control.apply(self)
    time.sleep(40)
    return network_control.ssh_wifidog()