{"id":16179697,"url":"https://github.com/mivinci/cqupt","last_synced_at":"2025-03-19T01:31:00.045Z","repository":{"id":43638650,"uuid":"347955220","full_name":"mivinci/cqupt","owner":"mivinci","description":"📶 CQUPT 校园网登录脚本","archived":false,"fork":false,"pushed_at":"2023-09-29T06:27:39.000Z","size":455,"stargazers_count":26,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T01:41:22.677Z","etag":null,"topics":["bash","cqupt","curl","fuckxyw","python","shell","xyw"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mivinci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-15T12:11:49.000Z","updated_at":"2024-12-19T03:46:48.000Z","dependencies_parsed_at":"2024-10-27T19:23:12.599Z","dependency_job_id":"1418470e-0d94-4008-ad3f-e631826d0a94","html_url":"https://github.com/mivinci/cqupt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivinci%2Fcqupt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivinci%2Fcqupt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivinci%2Fcqupt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivinci%2Fcqupt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mivinci","download_url":"https://codeload.github.com/mivinci/cqupt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244336149,"owners_count":20436775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","cqupt","curl","fuckxyw","python","shell","xyw"],"created_at":"2024-10-10T05:43:47.111Z","updated_at":"2025-03-19T01:30:59.720Z","avatar_url":"https://github.com/mivinci.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📶 CQUPT 校园网登录脚本\n\n该脚本用来给 CQUPT 内网设备登录校园网，给你自己电脑用也行，随便你。另外，该脚本仅供学习，出现的任何问题和作者无关。\n\n该 Shell 脚本专为 Linux 设备准备，如果你用的是 Windows 或 macOS 设备，请使用 Python3 重制版 [cqupt.py](./cqupt.py)，并直接查看该 [重制版的使用说明](#python3-重制版)。\n\n![screenshot](./shot.png)\n\n## 特点\n\n- [x] 支持移动、电信、联通校园网\n- [x] 支持自定义 [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent)，可能能用于多设备同时登录（\n- [x] 是我写的\n\n## 使用\n\n在使用前先连上该校有线或无线校园网，并确定你的设备装有\n- Bash 5 或更高的版本\n- [cURL](https://curl.se/)\n\n检查 Bash 版本\n\n```bash\nbash --version\n```\n\n下载并进入该仓库\n\n```bash\ngit clone https://github.com/mivinci/cqupt.git\ncd cqupt\n```\n\n运行脚本并根据提示操作\n```bash\nbash cqupt.sh\n```\n\n## Python3 重制版\n\nPython3 重制版为跨平台通用版本，需要你的设备上预先装有 Python3 环境。假设你的统一认证码为 111111，密码为 222222，网络服务提供商为中国电信，介绍四种使用方式，区别在于密码的输入。\n\n方法一（手动现输入）\n\n```bash\npython cqupt.py 111111 --isp telecom\n```\n\n然后根据提示输入密码（输入过程密码不可见）\n\n方法二（通过管道）\n\n```bash\necho -n '222222' | python cqupt.py 111111 --isp telecom\n```\n\n方法三（通过环境变量）\n\n```bash\nexport CQUPT_UAC_PASSWORD=222222  # on Linux or macOS\npython cqupt.py 111111 --isp telecom \n```\n\n方法四（通过命令行参数，不推荐）\n\n```bash\npython cqupt.py 111111 --isp telecom --force-password 222222\n```\n\n其中，`--isp` 参数指定网络服务提供商名称，支持的名称如下：\n\n- 中国电信：`telecom`\n- 中国联通：`unicom`\n- 中国移动：`cmcc` (默认)\n- 教师账号：`xyw`\n\n当然，你可以运行\n\n```\npython cqupt.py -h\n```\n\n来查看完整参数，如自定义 IP/MAC 地址，自定义 UA 等。\n\n## FAQ\n\n1. 问：我的设备是通过自己的路由器连接的校园网还能用该脚本吗？\n\n   答：可以，但需要自行输入路由器的内网 IPv4 地址。\n\n2. 问：怎么设置该脚本为开机自启或定时运行？\n   \n   答：Linux, macOS, Windows 有各自开机自启和定时运行的方式和工具，自行谷歌。\n\n3. 问：我不在内网里怎么通过 ssh 登录内网设备？\n\n   答：这不在该脚本的涉及范围，但极力推荐使用 [Tailscale](https://tailscale.com)。\n\n4. 问：这个脚本会影响我开法拉利吗？\n\n   答：应该不会。\n\n## 反馈\n\nBug 发 [这儿](https://github.com/mivinci/cqupt/issues)，想法发 [这儿](https://github.com/mivinci/cqupt/discussions)，或直接通过 QQ 0x51768d60 通知我 :)\n\n## License\n\n本项目使用 Apache 2.0 开源协议\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmivinci%2Fcqupt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmivinci%2Fcqupt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmivinci%2Fcqupt/lists"}