From f0dd8df0d714b79afbae25a92e579f60d8fd5e17 Mon Sep 17 00:00:00 2001 From: wang_chengh <13383929+wang_chengh@user.noreply.gitee.com> Date: Fri, 22 Sep 2023 15:09:18 +0800 Subject: [PATCH] =?UTF-8?q?router=5Femulator=E9=A1=B9=E7=9B=AE=EF=BC=8C?= =?UTF-8?q?=E5=90=8E=E7=AB=AF.cgi=E9=83=A8=E5=88=86=EF=BC=8C=E6=9C=80?= =?UTF-8?q?=E7=BB=88=E7=89=88=E5=AE=8C=E6=95=B4=E4=BB=A3=E7=A0=81=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/cgi-bin/create_table.sql | 20 ++++++++++++++++++++ www/cgi-bin/readme.md | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 www/cgi-bin/create_table.sql create mode 100644 www/cgi-bin/readme.md diff --git a/www/cgi-bin/create_table.sql b/www/cgi-bin/create_table.sql new file mode 100644 index 0000000..ec30347 --- /dev/null +++ b/www/cgi-bin/create_table.sql @@ -0,0 +1,20 @@ +-- 创建管理员登录表 +CREATE database if NOT EXISTS router; +USE router; +-- 创建用户登录密码表 +CREATE TABLE if not exists users ( + id INT AUTO_INCREMENT PRIMARY KEY, + username VARCHAR(50) NOT NULL, + password VARCHAR(255) NOT NULL +); +-- 创建ARP映射表 +CREATE TABLE if not exists ip_mac( + id INT AUTO_INCREMENT PRIMARY KEY, + ip VARCHAR(50) NOT NULL, + mac VARCHAR(50) NOT NULL +); +-- 创建防火墙表 +CREATE TABLE if not exists ip_fw( + id INT AUTO_INCREMENT PRIMARY KEY, + ip VARCHAR(50) NOT NULL +); \ No newline at end of file diff --git a/www/cgi-bin/readme.md b/www/cgi-bin/readme.md new file mode 100644 index 0000000..0e5463f --- /dev/null +++ b/www/cgi-bin/readme.md @@ -0,0 +1,5 @@ +执行该项目后端部分: +需要在Mysql数据库中先执行一次'create_table.sql' +四个.c文件的匹配作用已写在文件顶部的注释中 +使用'make all'命令将所有的.c文件编译成对应的.cgi文件 +使用'make clean'命令清除编译 \ No newline at end of file