Skip to content

Commit

Permalink
first usable commit
Browse files Browse the repository at this point in the history
  • Loading branch information
diylxy committed Sep 26, 2024
0 parents commit 5e45ebc
Show file tree
Hide file tree
Showing 12 changed files with 10,564 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build*
.vscode
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cipher"]
path = cipher
url = ./cipher
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.5)

project(Portal)

add_compile_options(-O2)
add_subdirectory(cipher)
target_include_directories(cipher PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/cipher)
add_executable(Portal main.cpp xenEncode.cpp memBlock.cpp)

target_link_libraries(Portal cipher)
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 华北电力大学srun portal 校园网认证程序-C++语言实现
一种基于C++的华北电力大学校园网自动认证服务程序。支持自动检测故障并尝试重连。
##
## 免责声明
**校园网认证系统可能会更新,本程序也可能因此失效,因此造成的损失由使用者承担。本人保证程序中未刻意加入恶意代码,但因为程序需获取用户账号密码,并且访问互联网,请自行审核源代码并编译此项目**
## 参数
```bash
Portal 用户名 密码 [网卡IP地址 | 网卡接口名,默认eth0]
```
## 克隆到本地
```bash
git clone --recursive
```

## 直接编译
本项目使用CMake构建系统
```bash
mkdir build
cd build
cmake ..
make
```

## 交叉编译
此处以OpenWRT(X-WRT)为例。请先编译路由器固件,并使用得到的编译器和staging_dir编译此程序
```bash
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake
export STAGING_DIR=/home/lxy/x-wrt/staging_dir/ # 替换为你的openwrt staging_dir
make
```
1 change: 1 addition & 0 deletions cipher
Submodule cipher added at 0661ce
Loading

0 comments on commit 5e45ebc

Please sign in to comment.