1.1.1.1校园网_突破校园网限制,开启寝室Wifi

d7c8a874-b415-eb11-8da9-e4434bdf6706.png

1.前言

由于学校的上网费用过于昂贵,所以和室友拼了一个学期的上网套餐,准备共享宽带账号并开启路由器。

2.准备

  • 一台刷好老毛子系统的路由器
  • 一台正常上网的电脑
  • 一根网线
  • 工具:链接:https://pan.baidu.com/s/1mOFfFZkNupI-M0upVPCl8A

提取码:tteg

3.路由器设置部分(1)

  • 按照下图的方式连接和启动路由器

d9c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 电脑连接到WIFI,默认的wifi名称是PDCN,默认的wifi密码是1234567890,打开浏览器,输入以下网址 http://my.router ,账号和密码均是:admin
  • 登录完成后单击小地球,记录好箭头表示的信息

dac8a874-b415-eb11-8da9-e4434bdf6706.png
  • 单击左侧的 外部网络(WAN) 按照以下图片的步骤设置相关信息:
    外网连接类型 = Ipoe 静态IP
    IP地址 = 记录的1号信息
    子网掩码 = 255.255.255.0
    默认网关 = 记录的2号信息
    DNS服务器1 = 记录的3号信息
    DNS服务器2 = 114.114.114.114
    MAC地址 = 按一下旁边的+按钮
    设置好参数后如下并单击应用本页面设置

dbc8a874-b415-eb11-8da9-e4434bdf6706.png
  • 在地址栏输入http://www.baidu.com等浏览器自动跳转到上网认证页面,输入好账号密码,先不要点连接Login

dec8a874-b415-eb11-8da9-e4434bdf6706.png
  • 打开审查元素(按F12键),切换到Network,并按下图方式勾选

dfc8a874-b415-eb11-8da9-e4434bdf6706.png
  • 点击连接Login按钮,等待跳转成功,观察审查元素出现的第一个项目(也有可能是第二个),是Interface.do?,右键单击项目----copy----copy as cURL(bash),提示:不是copy as cURL(cmd),具体操作如下图

e0c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 打开记事本,右键复制,在开头加上这几个文字 ,curl -s -X POST ,拉到底部,删除 --compressed --insecure 这几个文字,其他的保持原样,操作完成如下图

e1c8a874-b415-eb11-8da9-e4434bdf6706.png

e2c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 如果上述步骤已成功完成,恭喜你离成功不远了
  • 再开一个记事本,复制以下的文本内容进去(工具里面有模板,直接在工具里面替换内容也可):
#!/bin/sh
  • 把上图中第11行中 ######### 的内容替换成 刚才记事本中的内容,复制完如下

e5c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 打开winscp软件,填写以下信息,点击登陆,账号和密码都是admin(工具已放在网盘)

e6c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 登录成功之后,通过双击黄色箭头的按钮可以回到上一层目录,最终切换到以下路径 /etc/storage

e8c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 在空白处右键单击 新建---文件,命名为ruijie.sh,确定

eac8a874-b415-eb11-8da9-e4434bdf6706.png

ebc8a874-b415-eb11-8da9-e4434bdf6706.png
  • 把刚才第7步制作好的文本复制进去,复制完如下,PS:注意红框内的内容是否和你的一致,不一致请切换到正确的路径 , cctrl + s 保存,关闭窗口

ecc8a874-b415-eb11-8da9-e4434bdf6706.png
  • 单击ruijie.sh文件,再单击属性,并按下图设置权限,设置完之后确定

edc8a874-b415-eb11-8da9-e4434bdf6706.png

efc8a874-b415-eb11-8da9-e4434bdf6706.png
  • 打开浏览器,输入192.168.123.1进入路由器后台
  • 由于学校6.00-22.30之间有网,所以我们要设置每天6.00自动去连接校园网,步骤如下:(1)高级设置---(2)系统管理---(3)系统设置---(4)定时重启---(5)设置重启时间为6时2分---(6)应用本页面设置。

f0c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 设置自动去认证,步骤如下:(1)高级设置---(2)自定义设置---(3)脚本---(4)在 WAN 上行/下行启动后执行:---(5)换行 添加一句话 /etc/storage/ruijie.sh---(6)应用本页面设置

f1c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 防止路由器重启之后ruijie.sh消失,需要把文件写入闪存,步骤如下:(1)高级设置---(2)系统管理---(3)恢复/导出/上传设置---(4)保存 /etc/storage/ 内容到闪存 提交---(5)应用本页面设置

f2c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 至此,路由器设置完成,然后重启路由器,等待3-4分钟

f4c8a874-b415-eb11-8da9-e4434bdf6706.png
  • 把路由器上的LAN口的网线拔下来,插到WAN口去,把插在电脑上的网线拔下来,插到墙壁上的网口上去,然后路由器断电---通电,静待3-4分钟,你会发现你可以上网了。

f5c8a874-b415-eb11-8da9-e4434bdf6706.png

4.结束语

原理是让路由器去自动访问这个认证网页,并向认证的服务器发送我们的账号和密码。(如何修改自己的wifi名字和wifi密码:

Padavan/老毛子/PDCN系统修改WIFI名称和密码详细图文教程 - Padavan / 老毛子 - 你好多多DIY​www.duomingxing.com
f7c8a874-b415-eb11-8da9-e4434bdf6706.png

f8c8a874-b415-eb11-8da9-e4434bdf6706.png

5.参考

老毛子实现校园网锐捷认证脚本24小时不断网 - 小时光's Blog​www.longzc.cn
fbc8a874-b415-eb11-8da9-e4434bdf6706.png
使用 Padavan 路由器实现校园网自动 Web 认证 - 少数派​sspai.com
fec8a874-b415-eb11-8da9-e4434bdf6706.png
  • 11
    点赞
  • 66
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
抱歉,作为AI语言模型,我无法为您编写完整的安卓应用程序。但是,以下是您可以使用的基本框架和功能: 1. 登录/注册页面:用户可以注册新账户或使用现有的账户登录。 2. 主页:显示所有寝室和已分配的学生列表。 3. 寝室信息页面:显示特定寝室的详细信息,如寝室号,床位数量和已分配的学生列表。 4. 学生信息页面:显示特定学生的详细信息,如姓名,学号,寝室号和床位号。 5. 分配床位:管理员可以将学生分配到可用的床位。 6. 退宿:管理员可以将学生从当前寝室中删除并释放其床位。 7. 编辑寝室信息:管理员可以编辑寝室信息,如寝室号,床位数量等。 8. 编辑学生信息:管理员可以编辑学生信息,如姓名,学号,寝室号和床位号。 以下是可能用到的代码段: 1. 登录/注册页面: ``` EditText usernameEditText = findViewById(R.id.username_edittext); EditText passwordEditText = findViewById(R.id.password_edittext); Button loginButton = findViewById(R.id.login_button); Button registerButton = findViewById(R.id.register_button); loginButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Check if the entered username and password match with the database // If yes, start the main activity // If no, show an error message } }); registerButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Start the registration activity } }); ``` 2. 主页: ``` ListView dormListView = findViewById(R.id.dorm_listview); // Initialize the dorm list with data from the database List<Dorm> dormList = database.getDormList(); // Create a custom adapter to display the dorm list DormAdapter dormAdapter = new DormAdapter(this, dormList); // Set the adapter for the list view dormListView.setAdapter(dormAdapter); dormListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // Start the dorm information activity with the selected dorm's ID } }); ``` 3. 寝室信息页面: ``` TextView dormNumberTextView = findViewById(R.id.dorm_number_textview); TextView bedCountTextView = findViewById(R.id.bed_count_textview); ListView studentListView = findViewById(R.id.student_listview); // Get the dorm ID from the intent int dormId = getIntent().getIntExtra("dorm_id", -1); // Get the dorm object from the database using the dorm ID Dorm dorm = database.getDormById(dormId); // Set the dorm information on the text views dormNumberTextView.setText(dorm.getDormNumber()); bedCountTextView.setText(String.valueOf(dorm.getBedCount())); // Initialize the student list with data from the database List<Student> studentList = database.getStudentListByDormId(dormId); // Create a custom adapter to display the student list StudentAdapter studentAdapter = new StudentAdapter(this, studentList); // Set the adapter for the list view studentListView.setAdapter(studentAdapter); ``` 4. 学生信息页面: ``` TextView nameTextView = findViewById(R.id.name_textview); TextView idTextView = findViewById(R.id.id_textview); TextView dormNumberTextView = findViewById(R.id.dorm_number_textview); TextView bedNumberTextView = findViewById(R.id.bed_number_textview); Button editButton = findViewById(R.id.edit_button); Button checkoutButton = findViewById(R.id.checkout_button); // Get the student ID from the intent int studentId = getIntent().getIntExtra("student_id", -1); // Get the student object from the database using the student ID Student student = database.getStudentById(studentId); // Set the student information on the text views nameTextView.setText(student.getName()); idTextView.setText(student.getId()); dormNumberTextView.setText(student.getDormNumber()); bedNumberTextView.setText(String.valueOf(student.getBedNumber())); editButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Start the edit student information activity with the student's ID } }); checkoutButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Remove the student from the dorm and release the bed } }); ``` 5. 分配床位: ``` Spinner studentSpinner = findViewById(R.id.student_spinner); Spinner bedSpinner = findViewById(R.id.bed_spinner); Button assignButton = findViewById(R.id.assign_button); // Initialize the student spinner with data from the database List<Student> studentList = database.getStudentList(); ArrayAdapter<Student> studentAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, studentList); studentSpinner.setAdapter(studentAdapter); // Initialize the bed spinner with available bed numbers for the selected dorm int dormId = getIntent().getIntExtra("dorm_id", -1); List<Integer> availableBedNumbers = database.getAvailableBedNumbers(dormId); ArrayAdapter<Integer> bedAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, availableBedNumbers); bedSpinner.setAdapter(bedAdapter); assignButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Get the selected student and bed numbers // Update the student's dorm and bed numbers in the database // Update the bed status to "occupied" in the database } }); ``` 6. 退宿: ``` Button checkoutButton = findViewById(R.id.checkout_button); checkoutButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Remove the student from the dorm and release the bed } }); ``` 7. 编辑寝室信息: ``` EditText dormNumberEditText = findViewById(R.id.dorm_number_edittext); EditText bedCountEditText = findViewById(R.id.bed_count_edittext); Button saveButton = findViewById(R.id.save_button); // Get the dorm ID from the intent int dormId = getIntent().getIntExtra("dorm_id", -1); // Get the dorm object from the database using the dorm ID Dorm dorm = database.getDormById(dormId); // Set the dorm information on the text views dormNumberEditText.setText(dorm.getDormNumber()); bedCountEditText.setText(String.valueOf(dorm.getBedCount())); saveButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Update the dorm information in the database } }); ``` 8. 编辑学生信息: ``` EditText nameEditText = findViewById(R.id.name_edittext); EditText idEditText = findViewById(R.id.id_edittext); Spinner dormSpinner = findViewById(R.id.dorm_spinner); Spinner bedSpinner = findViewById(R.id.bed_spinner); Button saveButton = findViewById(R.id.save_button); // Get the student ID from the intent int studentId = getIntent().getIntExtra("student_id", -1); // Get the student object from the database using the student ID Student student = database.getStudentById(studentId); // Set the student information on the text views nameEditText.setText(student.getName()); idEditText.setText(student.getId()); // Initialize the dorm spinner with data from the database List<Dorm> dormList = database.getDormList(); ArrayAdapter<Dorm> dormAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, dormList); dormSpinner.setAdapter(dormAdapter); // Initialize the bed spinner with available bed numbers for the selected dorm int dormId = student.getDormId(); List<Integer> availableBedNumbers = database.getAvailableBedNumbers(dormId); ArrayAdapter<Integer> bedAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, availableBedNumbers); bedSpinner.setAdapter(bedAdapter); saveButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Update the student information in the database } }); ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值