Skip to content

GDUTMeow/GDUT-Wlan-Login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDUT-Wlan-Login

一个登录 gdut 无线网络的脚本

因为这个破网的登录门户在我的黑苹果上显示不全,我点不到登录按钮,然后就想着用别人的,结果发现别人的还没法获取到 IP 地址,遂改了一个能获取到 IP 地址的版本

使用说明

推荐使用 uv 来管理包,用 uv sync 同步即可

你也可以使用 pip,用 pip install -r requirements.txt 安装所需要的组件

然后需要配置一下 .env 文件,你需要把 .example.env 复制一份改名为 .env,并在其中填写一下信息

username=
password=
device=
  • username 是你的登录名,一般为学号
  • password 为密码,为统一身份验证登录密码
  • device 为你的网卡,是用来连接无线网的网卡,推荐用 ipconfig 或者 ifconfig 看一下,有 ip 地址的那个就是了,例如
╰─ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
	inet 127.0.0.1 netmask 0xff000000
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
	nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=40b<RXCSUM,TXCSUM,VLAN_HWTAGGING,CHANNEL_IO>
	ether 54:ee:75:fd:07:27
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect (<unknown type>)
	status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=400<CHANNEL_IO>
	ether 34:41:5d:ca:d1:63
	inet6 fe80::c73:2add:f611:d61%en1 prefixlen 64 secured scopeid 0x5
	inet6 2001:da8:2018:2000:cf0:f310:e6a1:62e0 prefixlen 64 autoconf secured
	inet6 2001:da8:2018:2000:2d89:4758:d5c8:4002 prefixlen 64 autoconf temporary
	inet 10.33.54.38 netmask 0xffff8000 broadcast 10.33.127.255
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
	inet6 fe80::485e:4702:4f2b:64f0%utun0 prefixlen 64 scopeid 0x6
	nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
	inet6 fe80::b8b4:c823:522f:ee1%utun1 prefixlen 64 scopeid 0x7
	nd6 options=201<PERFORMNUD,DAD>
utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
	inet6 fe80::dfb2:8f6d:2997:d8a5%utun2 prefixlen 64 scopeid 0x8
	nd6 options=201<PERFORMNUD,DAD>
utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1000
	inet6 fe80::ce81:b1c:bd2c:69e%utun3 prefixlen 64 scopeid 0x9
	nd6 options=201<PERFORMNUD,DAD>
utun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
	options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>

在这里可以看到 en1 是有 ip 地址的,所以填 en1 就行,注意根据实际情况填写

运行结果应该如下

╰─ uv run main.py
[*] Starting login process...
[*] Loaded environment variables
[*] Trying to login with account your_username and password your_password
[*] Local IP address is 10.33.54.38
[*] Login successful!

Credit

https://github.com/lin-snow/GDUT-Login

About

广东工业大学无线网络登录脚本

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages