Esempio n. 1
0
def zte_cdn_omc():
    cookie = 'ERROR'
    url = 'https://39.134.88.198:8443/frame/loginOut.action'
    cj = ww.get_cookie_without_form(url)  # 这个函数默认输出结果
    for item in cj:
        cookie = item.name + '=' + item.value
    print(cookie)

    # cookie = 'JSESSIONID=4CD5A39212EAA84F77E3BE9817B6AC09'
    # url = 'https://39.134.88.198:8443/authimg'
    # ww.get_validate_code(url, cookie)

    url = 'https://39.134.88.198:8443/frame/login.action'

    # pwd = input('输入验证码,谢谢')

    form = {
        'authCodeable': 'false',
        'password': '******',
        'userName': '******',
        # 'validateCode': pwd
    }

    ww.post_web_page_ssl(url, form, cookie)

    return cookie
Esempio n. 2
0
def sqm_117_auto_recognize_captcha():
    cookie = 'ERROR'
    # 获取cookie
    url = 'http://117.144.107.165:8088/evqmaster/CheckCode'
    cj = ww.get_cookie_without_form(url)
    for item in cj:
        cookie = item.name + '=' + item.value
    print(cookie)

    # 获取验证码 加random 是为了改一下请求 那样就不会去缓存中获取这张图片了
    url = 'http://117.144.107.165:8088/evqmaster/CheckCode?' + str(
        random.random())
    im = ww.return_validate_code(url, cookie)
    captcha = mp.recognize_sqm_captcha(mp.cut_sqm_captcha(im))
    exit()
    pwd = input('输入验证码,谢谢')

    # 提交登入表单
    url = 'http://117.144.107.165:8088/evqmaster/configaction!login.action'
    form = {
        'username': '******',
        'password': '******',
        'checkcode': pwd
    }

    f = ww.post_web_page(url, form, cookie)
    print(f)
    return cookie
Esempio n. 3
0
def sqm_10():
    # 获取cookie
    url = 'http://10.222.4.87:8088/evqmaster/CheckCode'
    cj = ww.get_cookie_without_form(url)
    cookie = ''
    for item in cj:
        cookie = item.name + '=' + item.value
    print(cookie)
    # cookie = 'JSESSIONID=859D1BE9728F46E71C2B765186B593A1'

    # 获取验证码 加random 是为了改一下请求 那样就不会去缓存中获取这张图片了
    url = 'http://10.222.4.87:8088/evqmaster/CheckCode?' + str(random.random())
    ww.get_validate_code(url, cookie)
    pwd = input('输入验证码,谢谢')

    # 提交登入表单
    url = 'http://10.222.4.87:8088/evqmaster/configaction!login.action'
    form = {
        'username': '******',
        'password': '******',
        'checkcode': pwd
    }

    ww.post_web_page(url, form, cookie)
    return cookie
Esempio n. 4
0
def sqm():
    cookie = 'ERROR'
    # 获取cookie
    url = 'http://106.14.197.84:65009/evqmaster/CheckCode'
    cj = ww.get_cookie_without_form(url)
    for item in cj:
        cookie = item.name + '=' + item.value
    print(cookie)

    # 获取验证码 加random 是为了改一下请求 那样就不会去缓存中获取这张图片了
    url = 'http://106.14.197.84:65009/evqmaster/CheckCode?' + str(
        random.random())
    ww.get_validate_code(url, cookie)
    pwd = input('输入验证码,谢谢')

    # 提交登入表单
    url = 'http://106.14.197.84:65009/evqmaster/configaction!login.action'
    form = {
        'username': '******',
        'password': '******',
        'checkcode': pwd
    }

    f = ww.post_web_page(url, form, cookie)
    print(f)
    return cookie
Esempio n. 5
0
def zte_anyservice_uniportal_v2():
    cookie = 'ERROR'
    url = 'https://117.135.56.61:8443/frame/loginOut.action'
    cj = ww.get_cookie_without_form(url)
    for item in cj:
        cookie = item.name + '=' + item.value
    # print(cookie)
    url = 'https://117.135.56.61:8443/frame/login.action'
    form = {
        'authCodeable': 'false',
        'password': '******',
        'userName': '******'
    }
    ww.post_web_page_ssl(url, form, cookie)
    return cookie
Esempio n. 6
0
def login_wangluoquanjingkeshihua():
    cookie = 'ERROR'
    url = 'https://117.136.129.122/cmnet/index.htm'
    cj = ww.get_cookie_without_form(url)
    for item in cj:
        cookie = item.name + '=' + item.value
    print(cookie)
    # cookie = 'JSESSIONID=3276F5B76C95383468C71976890DF58C'
    date = int(time.time() * 1000)
    temp = myPackages.number_base_conversion.base_n(date, 36)
    url = 'https://117.136.129.122/cmnet/validateCode.htm?temp=' + temp
    ww.get_validate_code(url, cookie)

    url = 'https://117.136.129.122/cmnet/login.htm'

    pwd = input('输入验证码,谢谢')
    form = {
        'username': r'Xw1OfZDqN27WleNrhSAYAQ==',
        'password': r'gS4MY8BMAeRRfMVQswEVWA==',
        'exPassword': pwd
    }
    ww.post_web_page_ssl(url, form, cookie)

    return cookie
Esempio n. 7
0
            pixdata[x, y] = 255
    for x in range(w - width, w):
        for y in range(0, h):
            pixdata[x, y] = 255
    for x in range(0, w):
        for y in range(0, width):
            pixdata[x, y] = 255
    for x in range(0, w):
        for y in range(h - width, h):
            pixdata[x, y] = 255
    return img


# 识别验证码就是为了获取cookie
url = 'http://117.144.107.165:8088/evqmaster/CheckCode'
cj = ww.get_cookie_without_form(url)
cookie = ''
for item in cj:
    cookie = item.name + '=' + item.value
print(cookie)
# cookie = 'JSESSIONID=859D1BE9728F46E71C2B765186B593A1'


# 获取验证码 加random 是为了改一下请求 那样就不会去缓存中获取这张图片了
url = 'http://117.144.107.165:8088/evqmaster/CheckCode?' + str(random.random())
f = ww.get_img_ssl(url, cookie)   # 不是特别懂,but it works.
# 是否传入文件名,来判断是普通验证,还是下载验证码
filename = 'validateCode0.png'
g = open(filename, 'wb')
g.write(f)
g.close()