吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 7713|回复: 39
收起左侧

[原创工具] [支持Openwrt] HustWebAuth 锐捷 WEB 认证跨平台工具

  [复制链接]
a76yyyy 发表于 2022-11-24 22:49
本帖最后由 a76yyyy 于 2023-3-25 23:33 编辑

2023.02.09更新: 支持直接安装为Windows或者OpenWrt系统服务

HustWebAuth

锐捷 WEB 认证跨平台工具

Gitee 地址

https://gitee.com/a76yyyy/HustWebAuth

Github 地址

https://github.com/a76yyyy/HustWebAuth

Web认证

当前很多学校使用了锐捷 Web 认证的方式来实现校园内有线网和无线网的网络认证和登录。

锐捷 Web 认证是一种对用户访问网络的权限进行控制的身份认证方法,这种认证方法不需要用户安装专用的客户端认证软件,使用普通的浏览器访问就可以进行身份认证。

未认证用户使用浏览器上网时,网络设备会强制浏览器访问特定站点,也就是Web认证服务器,通常称为Portal服务器。当用户需要访问认证服务器以外的其它网络资源时,就必须通过浏览器在Portal服务器上进行身份认证,只有认证通过后才可以使用网络资源。参考:Web认证概述

锐捷 WEB 认证跨平台工具的目的是方便用户使用 Linux 或配置 OpenWrt 路由器时,在不打开浏览器的前提下,通过命令行直接实现 Web 认证。

使用方法

  1. 安装

    方式一: 使用 go install 命令安装

    go install github.com/a76yyyy/HustWebAuth@latest

    方式二: 下载 release 可执行文件

    1. 下载指定架构的可执行文件
    2. 重命名可执行文件为 HustWebAuthHustWebAuth.exe
    3. 将文件权限修改为可执行权限, 如 chmod +x HustWebAuth
    4. (建议) 将可执行文件移动到 /usr/local/bin目录下 或 添加到Path环境变量中
  2. 命令行运行 HustWebAuth -h 查看帮助

  3. 命令行运行 HustWebAuth -a account -p password 进行认证测试

    Tips:

    1. 请确保你的账号密码正确
    2. 请确保你的网络连接正常, 且使用锐捷 Web 认证方式
    3. 可使用 HustWebAuth -a account -p password -o 进行认证并保存配置文件至 $HOME 文件夹下
    4. 可使用 HustWebAuth login -r 开启无感认证, 需提前下线你的设备
  4. (可选) 使用 HustWebAuth service install 安装系统服务

    Tips:

    1. 请确保你的配置文件 HustWebAuth.yaml 已正确写入至 $HOME 文件夹下
    2. Windows 系统请在配置文件中 log 选项下设置日志文件名以方便查看日志, 如 File: "HustWebAuth.log"
    3. 建议以服务方式运行时, log 选项下设置 connectedfalse 以避免无效信息导致日志过大

Help 命令

> HustWebAuth -h
HustWebAuth is a program used to implement Ruijie web authentication.

Usage:
  HustWebAuth [flags]
  HustWebAuth [command]

Available Commands:
  get         Get the login url from the redirect url
  help        Help about any command
  login       Hust web auth only once
  service     System service related commands

Flags:
  -a, --account string           Account for ruijie web authentication
  -f, --config string            Config file (default is $HOME/HustWebAuth.yaml)
  -c, --cycle                    Enable cycle mode
      --cycleDuration duration   Cycle duration (default 5m0s)
      --cycleRetry int           Cycle retry times, -1 means retry forever (default 3)
  -d, --daemon                   Enable daemon mode, not support windows
      --daemonPidFile string     Daemon pid file
  -h, --help                     help for main.exe
      --logAppend                Log file append mode.
                                 NOTE: if logRandom is true, it will be ignored (default true)
      --logConnected             Enable logging of "The network is connected" (default true)
      --logDir string            Log Directory (default Temp/HustWebAuth)
  -l, --logFile string           Log file name (default means output to os.stdout)
      --logRandom                Log file name with random string.
                                 NOTE: If logFile includes a "*", the random string replaces the last "*".
                                  (default true)
  -p, --password string          Password for ruijie web authentication
      --pingCount int            ping count (default 3)
      --pingIP string            IP address to ping (default "202.114.0.131")
      --pingPrivilege            Sets the type of ping pinger will send.
                                 false means pinger will send an "unprivileged" UDP ping.
                                 true means pinger will send a "privileged" raw ICMP ping.
                                 NOTE: setting to true requires that it be run with super-user privileges.
                                  (default true)
      --pingTimeout duration     Ping timeout (default 3s)
      --redirectURL string       Redirect URL (default "http://123.123.123.123")
  -o, --save                     Save config file
  -s, --serviceType string       Service Type, options: [internet, local] (default "internet")
      --syslog                   Enable syslog, not support windows

Use "HustWebAuth [command] --help" for more information about a command.

Service Help 命令

> HustWebAuth service -h
Use HustWebAuth as a system service: install, start, stop, uninstall, etc.

Usage:
  HustWebAuth service [flags]
  HustWebAuth service [command]

Available Commands:
  install     Install HustWebAuth service
  restart     Restart HustWebAuth service
  start       Start HustWebAuth service
  status      Get HustWebAuth service status
  stop        Stop HustWebAuth service
  uninstall   Uninstall HustWebAuth service from system

Flags:
  -h, --help   help for service

Use "HustWebAuth service [command] --help" for more information about a command.





Program.png

免费评分

参与人数 6吾爱币 +14 热心值 +5 收起 理由
微笑掩盖忧伤 + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
zhzng + 1 + 1 谢谢@Thanks!
aurora423 + 1 热心回复!
simon21 + 1 + 1 我很赞同!
风之暇想 + 7 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
笔墨纸砚 + 3 + 1 已经处理,感谢您对吾爱破解论坛的支持!

查看全部评分

本帖被以下淘专辑推荐:

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

lfordch 发表于 2022-11-25 06:23
可以增加一些使用介绍,供小白了解(也更符合版规)
 楼主| a76yyyy 发表于 2022-11-25 23:38
lfordch 发表于 2022-11-25 06:23
可以增加一些使用介绍,供小白了解(也更符合版规)

增加了web认证的相关介绍, 看还需要加点什么
WhitecatC36 发表于 2022-11-24 23:42
 楼主| a76yyyy 发表于 2022-11-25 00:46

用来实现后台自动完成锐捷web认证,校园网断线自动重连
Joe1921567817 发表于 2022-11-25 09:05
6,我们学校有两种方式,一种是拨号上网,用rasdial+计划任务就可以搞定。第二种是网页认证,应该和这种差不多,还没研究
trojankyo 发表于 2022-11-25 10:17
感谢可以学习了
x1135058151 发表于 2022-11-25 14:18
不明觉历
hurric 发表于 2022-11-25 14:38

不明觉历
头像被屏蔽
hwxq43 发表于 2022-11-26 05:17
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 提醒:禁止复制他人回复等『恶意灌水』行为,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-20 11:56

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表