栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

tampermonkey脚本:自动登录北理工移动宽带

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

tampermonkey脚本:自动登录北理工移动宽带

在tampermonkey界面下新建两个脚本:
1、首先是跳转到登录界面的:

// ==Userscript==
// @name         跳转到中国移动登录界面
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://10.0.0.55/srun_portal_pc_yys.php?ac_id=1&
// @match        http://10.0.0.55/srun_portal_pc.php?ac_id=1&
// @match        http://10.0.0.55/srun_portal_pc.php?ac_id=8&
// @grant        none
// ==/Userscript==

(function() {
    'use strict';
    window.location.href = 'http://10.0.0.55/srun_portal_pc_yys.php?ac_id=8&';
    // Your code here...
})();

2、然后是在登录界面自动输入账号密码的:

// ==Userscript==
// @name         自动登录中国移动
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://10.0.0.55/srun_portal_pc_yys.php?ac_id=8&
// @grant        none
// ==/Userscript==

(function() {
    'use strict';
    // 找到select
    var select = document.getElementsByName('portal-domain')[0];
    // 更改为中国移动
    select.value = '@yidong';
    // 填写账号密码
    document.getElementById('username').value = '账号';
    document.getElementById('password').value = '密码';
    // 登录
    document.getElementById('button').click();
    // Your code here...
})();

3、然后每次打开浏览器,输入10.0.0.55,就会自动跳转到登录界面,并且自动输入账号密码、登录。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/268627.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号