CQBW(服务器部分)

计算检材 4-A.rar 的 MD5(128bit)校验值。(答案格式: 字母大写)

image-20240206205234577

请写出镜像中系统(用户名: root 密码: btLUN5Tb)的操作系统版本名称;(答案格式: redhat; 小写、不带空格、特殊字符及版本号)

image-20240206205329680

也可以仿真来看

sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config
service sshd restart

比武时可以使用

[root@localhost ~]# cat /etc/centos-release && cat /etc/redhat-release && cat /etc/issue
CentOS Linux release 7.6.1810 (Core) 
CentOS Linux release 7.6.1810 (Core) 
\S
Kernel \r on an \m

默认启动得图形界面改为字符界面

systemctl set-default multi-user.target
reboot

请写出系统搭建的集群中 namenode 节点的 id 是什么。(答案格式: 取前 12 位例 0123456789ab)

火眼看到了 docker 里面有,起一下

[root@localhost ~]# docker ps --no-trunc
CONTAINER ID                                                       IMAGE                  COMMAND                        CREATED             STATUS              PORTS               NAMES
ecb42063a46cb07c610765ed5691ef30b9390171900a7f445f2b2b9b412fdd1e   centos/hbase-cluster   "/etc/bootstrap.sh -d"         23 months ago       Up 6 seconds                            datanode2
db8d88d9c6e7a36a9a69a57b46ed5f355bae64b22db8fd22c0ce1eca9c50833a   centos/hbase-cluster   "/etc/bootstrap.sh -d"         23 months ago       Up 5 seconds                            datanode1
99131b4891b0197e6baa7e256281a338bd1e189530c05b5fe5f5771c643c5362   centos/hbase-cluster   "/etc/bootstrap.sh -dmaster"   23 months ago       Up 5 seconds                            namenode

一个主节点,两个子节点,检查一下

"Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/java/default/bin","JAVA_HOME=/usr/java/default","HADOOP_PREFIX=/usr/local/hadoop","HADOOP_COMMON_HOME=/usr/local/hadoop","HADOOP_HDFS_HOME=/usr/local/hadoop","HADOOP_MAPRED_HOME=/usr/local/hadoop","HADOOP_YARN_HOME=/usr/local/hadoop","HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop","YARN_CONF_DIR=/usr/local/hadoop/etc/hadoop","BOOTSTRAP=/etc/bootstrap.sh"],

这些环境变量可能会用到

进去看他 history

[root@namenode /]# history 1  cat /etc/bootstrap.sh 2  clear3  l s-l4  cd /tmp5  cat hosts6  vi hosts 7  clear8  ifconfig9  ls -l10  clear11  ls12  cd name13  ls14  cd current/15  ls16  clear17  cd 18  df -h19  clear

查看/etc/bootstrap.sh ,也印证了主节点和子节点

if [[ $1 == "-dmaster" ]]; thenecho "waiting for datanode..."
sleep 1;echo "I am master"echo "Start DFS:"
$HADOOP_PREFIX/sbin/start-dfs.shecho "Start YARN"
$HADOOP_PREFIX/sbin/start-yarn.shsleep 1/usr/local/hadoop/bin/hdfs dfsadmin -reportwhile true; do sleep 1000; donefiif [[ $1 == "-d" ]]; thenecho "I am datanode"while true; do sleep 1000; done
fiif [[ $1 == "-bash" ]]; then/bin/bash
fi

跟着他的history一步一步跟下来

[root@namenode /]# cat /tmp/hosts 
127.0.0.1 localhost
172.20.0.2 namenode
172.20.0.3  datanode1
172.20.0.4  datanode2
[root@namenode /]# ping -c 4 datanode1 && ping -c 4 datanode2
PING datanode1 (172.20.0.3) 56(84) bytes of data.
64 bytes from datanode1 (172.20.0.3): icmp_seq=1 ttl=64 time=0.117 ms
64 bytes from datanode1 (172.20.0.3): icmp_seq=2 ttl=64 time=0.106 ms
64 bytes from datanode1 (172.20.0.3): icmp_seq=3 ttl=64 time=0.093 ms
64 bytes from datanode1 (172.20.0.3): icmp_seq=4 ttl=64 time=0.065 ms--- datanode1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.065/0.095/0.117/0.020 ms
PING datanode2 (172.20.0.4) 56(84) bytes of data.
64 bytes from datanode2 (172.20.0.4): icmp_seq=1 ttl=64 time=0.044 ms
64 bytes from datanode2 (172.20.0.4): icmp_seq=2 ttl=64 time=0.097 ms
64 bytes from datanode2 (172.20.0.4): icmp_seq=3 ttl=64 time=0.085 ms
64 bytes from datanode2 (172.20.0.4): icmp_seq=4 ttl=64 time=0.095 ms--- datanode2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.044/0.080/0.097/0.022 ms

集群能互相连通

[root@namenode /]# cd /tmp/name/current/
[root@namenode current]# ls
edits_0000000000000000001-0000000000000000002  edits_inprogress_0000000000000000278  fsimage_0000000000000000002.md5  fsimage_0000000000000000277.md5  VERSION
edits_0000000000000000003-0000000000000000277  fsimage_0000000000000000002           fsimage_0000000000000000277      seen_txid
[root@namenode current]# cat VERSION
#Wed Feb 07 02:24:40 UTC 2024
namespaceID=166580657
clusterID=CID-8d5ed4d4-7eb8-473f-ba38-e8de8f3b9a27
cTime=0
storageType=NAME_NODE
blockpoolID=BP-2100813004-172.17.0.48-1453995058028
layoutVersion=-57

clusterID在这里

配置文件配置对象主要内容
hadoop-env.shhadoop运行环境用来定义Hadoop运行环境相关的配置信息;
core-site.xml集群全局参数定义系统级别的参数,包括HDFS URL、Hadoop临时目录等;
hdfs-site.xmlHDFS参数定义名称节点、数据节点的存放位置、文本副本的个数、文件读取权限等;
mapred-site.xmlMapReduce参数包括JobHistory Server 和应用程序参数两部分,如reduce任务的默认个数、任务所能够使用内存的默认上下限等;
yarn-site.xml集群资源管理系统参数配置ResourceManager ,nodeManager的通信端口,web监控端口等;

Hadoop启动datanode失败,clusterId有问题 - 汪神 - 博客园 (cnblogs.com)

请写出集群中存储的名称为 thomas 的手机号码;(答案格式: 13800000000)

  128  sh /usr/local/hadoop-2.5.2/sbin/start-all.sh 129  sh /usr/local/hbase-1.1.5/bin/start-hbase.sh 

启动服务的命令在history里面

[root@namenode hbase-1.1.5]# sh /usr/local/hbase-1.1.5/bin/stop-hbase.sh
stopping hbasecat: /tmp/hbase--master.pid: No such file or directorydatanode1: no zookeeper to stop because no pid file /tmp/hbase-root-zookeeper.pid
datanode2: no zookeeper to stop because no pid file /tmp/hbase-root-zookeeper.pid
namenode: no zookeeper to stop because no pid file /tmp/hbase-root-zookeeper.pid
[root@namenode hbase-1.1.5]# sh /usr/local/hadoop-2.5.2/sbin/start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [namenode]
namenode: starting namenode, logging to /usr/local/hadoop/logs/hadoop-root-namenode-namenode.out
datanode1: starting datanode, logging to /usr/local/hadoop/logs/hadoop-root-datanode-datanode1.out
datanode2: starting datanode, logging to /usr/local/hadoop/logs/hadoop-root-datanode-datanode2.out
Starting secondary namenodes [namenode]
namenode: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-root-secondarynamenode-namenode.out
starting yarn daemons
starting resourcemanager, logging to /usr/local/hadoop/logs/yarn--resourcemanager-namenode.out
datanode2: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-root-nodemanager-datanode2.out
datanode1: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-root-nodemanager-datanode1.out
[root@namenode hbase-1.1.5]# sh /usr/local/hbase-1.1.5/bin/start-hbase.sh
namenode: starting zookeeper, logging to /usr/local/hbase-1.1.5/bin/../logs/hbase-root-zookeeper-namenode.out
datanode1: starting zookeeper, logging to /usr/local/hbase-1.1.5/bin/../logs/hbase-root-zookeeper-datanode1.out
datanode2: starting zookeeper, logging to /usr/local/hbase-1.1.5/bin/../logs/hbase-root-zookeeper-datanode2.out
starting master, logging to /usr/local/hbase-1.1.5/bin/../logs/hbase--master-namenode.out
datanode1: starting regionserver, logging to /usr/local/hbase-1.1.5/bin/../logs/hbase-root-regionserver-datanode1.out
namenode: starting regionserver, logging to /usr/local/hbase-1.1.5/bin/../logs/hbase-root-regionserver-namenode.out
datanode2: starting regionserver, logging to /usr/local/hbase-1.1.5/bin/../logs/hbase-root-regionserver-datanode2.out

重启一下服务

[root@namenode hbase-1.1.5]# bin/hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hbase-1.1.5/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.5.2/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.1.5, r239b80456118175b340b2e562a5568b5c744252e, Sun May  8 20:29:26 PDT 2016hbase(main):001:0> list
TABLE                                                                                                                                                                          
contact                                                                                                                                                                        
zippass                                                                                                                                                                        
2 row(s) in 0.3000 seconds=> ["contact", "zippass"]
hbase(main):002:0> scan 'contact'
ROW                                          COLUMN+CELL                                                                                                                       001                                         column=UserInfo:name, timestamp=1645364086922, value=thomas                                                                       001                                         column=UserInfo:phone, timestamp=1645364120154, value=18930289713                                                                 
1 row(s) in 0.1980 secondshbase(main):003:0> scan 'zippass'
ROW                                          COLUMN+CELL                                                                                                                       001                                         column=PASSWORD:backup, timestamp=1645364259209, value=payment-backup.zip                                                         001                                         column=PASSWORD:pass, timestamp=1645364291404, value=OjSH79iA                                                                     
1 row(s) in 0.0360 secondshbase(main):004:0> 

HBase入门:shell 常用命令_列族前缀和列的名字-CSDN博客

镜像中保存了网站的数据备份文件, 请找出并计算备份文件的 md5 校验值。(答案格式: 字母大写)

[root@localhost ~]# find / -name 'payment-backup.zip'
/opt/payment-backup.zip
[root@localhost ~]# md5sum /opt/payment-backup.zip 
e250176cc6ff45f73467f03a7b4e81ea  /opt/payment-backup.zip

请写出支付网站代码的绝对路径目录;(答案格式:/var/log

[root@localhost ~]# systemctl start nginx
Failed to start nginx.service: Unit not found.
[root@localhost ~]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

没有nginx,是apache2

[root@localhost ~]# cat /etc/httpd/conf/httpd.conf | grep Root | grep -v '#'
ServerRoot "/etc/httpd"
DocumentRoot "/var/www/html"

请写出支付网站提供服务的端口号;(答案格式: 1234)

[root@localhost ~]# cat /etc/httpd/conf/httpd.conf | grep Listen | grep -v '#'
Listen 63201

请写出网站连接数据库的密码;(答案格式: 123456)

[root@localhost html]# cat Conf/db.php 
<?php
return array('DB_TYPE'               => 'mysql',     // 数据库类型'DB_HOST'               => 'localhost', // 服务器地址'DB_NAME'               => 'cGF5bWVudA==',          // 数据库名'DB_USER'               => 'emhpZnV1c2Vy',      // 用户名'DB_PWD'                => 'R1FyT2gqI0s=',          // 密码'DB_PORT'               => '3306',        // 端口'DB_PREFIX'             => 'pay_',    // 数据库表前缀);
?>
[root@localhost html]# systemctl status mysqld
● mysqld.service - MySQL ServerLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: active (running) since Tue 2024-02-06 18:22:42 PST; 24min agoDocs: man:mysqld(8)http://dev.mysql.com/doc/refman/en/using-systemd.htmlProcess: 6195 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)Process: 5541 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)Main PID: 6198 (mysqld)Tasks: 28Memory: 82.0MCGroup: /system.slice/mysqld.service└─6198 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pidFeb 06 18:22:37 localhost.localdomain systemd[1]: Starting MySQL Server...
Feb 06 18:22:42 localhost.localdomain systemd[1]: Started MySQL Server.
[root@localhost html]# mysql -uemhpZnV1c2Vy -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'emhpZnV1c2Vy'@'localhost' (using password: YES)

账密加密过了

[root@localhost html]# grep -rn "DB_USER"
Conf/db.php:7:  'DB_USER'               => 'emhpZnV1c2Vy',      // 用户名
ThinkPHP/Conf/convention.php:60:        'DB_USER'               => 'ZF59yjX1',      // 用户名
ThinkPHP/Extend/Driver/Session/SessionDb.class.php:62:       $DBUser = base64_decode(C('DB_USER'));
ThinkPHP/Extend/Engine/Sae/Conf/convention_sae.php:7:   'DB_USER'=> SAE_MYSQL_USER,    // 用户名
ThinkPHP/Extend/Engine/Sae/SaeImit/config.php:11:    'db_user'=>isset($appConfig['DB_USER'])?$appConfig['DB_USER']:'root',
ThinkPHP/Extend/Mode/Amf/Db.class.php:432:                'username'  =>   C('DB_USER'),
ThinkPHP/Extend/Mode/Cli/Db.class.php:430:                'username'  =>   C('DB_USER'),
ThinkPHP/Extend/Mode/Lite/Db.class.php:430:                'username'  =>   C('DB_USER'),
ThinkPHP/Extend/Mode/Phprpc/Db.class.php:428:                'username'  =>   C('DB_USER'),
ThinkPHP/Extend/Mode/Thin/Db.class.php:385:                'username'  =>   C('DB_USER'),
ThinkPHP/Lib/Core/Db.class.php:184:                    'username'  =>   base64_decode(C('DB_USER')),

请写出存储网站管理员信息的数据表名称;(答案格式: admin)

image-20240207105058780

密码在hbase里面

数据库skip-grant-tables绕个密,Navicat连接

image-20240207105221561

发现报错,搜一下

MySQL 报错 incorrect datetime value ‘0000-00-00 00:00:00‘ for column-CSDN博客

1 如果具备系统权限那么直接修改my.ini 配置文件,找到sql_mode行,修改为如下重启mysql即可。sql_mode = ‘STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER’

2 在没有系统权限,我们有本地库权限情况下如何处理,我们可以使用

  SELECT @@sql_mode;

就可以查到当前系统的SQL_mode配置,发现配置里有NO_ZERO_DATE,NO_ZERO_IN_DATE,这时我们使用以下命令,临时设置SQLmode模式,它只对本次会话有效,如果系统刷新后就需要我们重新设置。

SET @@sql_mode = 'STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER';

3 还有办法,不需要更改系统的SQL_mode模式,可以修改表结构,即将表中的date/datetime字段临时修改为VarChar字段,

ALTER TABLE mytemp CHANGE c10 c10 VARCHAR(100) NULL

这时进行数据更新,将‘0000-00-00’ 替换为正常的日期字符串,在使用ALTER 命令修改表字段,这时表中的字段会自动转为日期类型,字段中不能有非法字符,也可以在VarChar类型时将字段设为NULL再将字段改回日期类型。经过验证此方法不会丢失字段的值。这个方法对于系统影响最小,需要的系统权限也最小。

image-20240207105414397

导入成功

image-20240207105459870

请写出商户陈欧的的身份证号码;(答案格式: 18 位数字)

SELECT * FROM `payment`.`pay_listuser` WHERE `payment`.`pay_listuser`.`Shh` LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`UserName` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR `payment`.`pay_listuser`.`UserType` LIKE '%陈欧%' OR `payment`.`pay_listuser`.`status` LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`RegDate` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`qq` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`Compellation` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`MobilePhone` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`Tel` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`IdentificationCard` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`Address` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`Province` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`City` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR `payment`.`pay_listuser`.`Zt` LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`AffirmTitle` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR CAST(`payment`.`pay_listuser`.`AffirmAnswer` AS CHAR CHARACTER SET utf8) COLLATE utf8_general_ci LIKE '%陈欧%' OR `payment`.`pay_listuser`.`t0` LIKE '%陈欧%' OR `payment`.`pay_listuser`.`PayBank` LIKE '%陈欧%' OR `payment`.`pay_listuser`.`Diaodan_OnOff` LIKE '%陈欧%' OR `payment`.`pay_listuser`.`money` LIKE '%陈欧%' OR `payment`.`pay_listuser`.`Diaodan_User_OnOff` LIKE '%陈欧%'

513212521252325123
登录后台查看–商户 或者数据库中查询
SELECT IdentificationCard FROM pay_listuser where Compellation =‘陈欧’;

请写出商户编号为 10020 总的提款数额。(答案格式保留 3 位小数如: 0.123)

重构网站看起来直观一点,之前就差起apache2这一步了,查看报错

[root@localhost html]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@localhost html]# journalctl -xeDoallow this access for now by executing:# ausearch -c 'httpd' --raw | audit2allow -M my-httpd# semodule -i my-httpd.ppFeb 06 18:58:55 localhost.localdomain setroubleshoot[13533]: SELinux is preventing /usr/sbin/httpd from name_bind access on the tcp_socket port 63201. For complete SELinux mes
Feb 06 18:58:55 localhost.localdomain python[13533]: SELinux is preventing /usr/sbin/httpd from name_bind access on the tcp_socket port 63201.

开了selinux,关关掉掉再重启就行了

/etc/selinux/config

image-20240207110021621

[root@localhost ~]# systemctl status mysqld
● mysqld.service - MySQL ServerLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: active (running) since Tue 2024-02-06 19:01:05 PST; 10s agoDocs: man:mysqld(8)http://dev.mysql.com/doc/refman/en/using-systemd.htmlProcess: 6183 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)Process: 5525 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)Main PID: 6245 (mysqld)Tasks: 27CGroup: /system.slice/mysqld.service└─6245 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pidFeb 06 19:01:01 localhost.localdomain systemd[1]: Starting MySQL Server...
Feb 06 19:01:05 localhost.localdomain systemd[1]: Started MySQL Server.
[root@localhost ~]# systemctl start httpd
[root@localhost ~]# netstat -nlpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      6047/dnsmasq        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      5533/sshd           
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      5526/cupsd          
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      5925/master         
tcp6       0      0 :::3306                 :::*                    LISTEN      6245/mysqld         
tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd           
tcp6       0      0 :::22                   :::*                    LISTEN      5533/sshd           
tcp6       0      0 ::1:631                 :::*                    LISTEN      5526/cupsd          
tcp6       0      0 ::1:25                  :::*                    LISTEN      5925/master         
tcp6       0      0 :::63201                :::*                    LISTEN      6334/httpd   

image-20240207110210861

找后台

[root@localhost ~]# cat /var/log/httpd/access_log* | grep admin | head -n 10 | awk -F ' ' '{print $11}'
"-"
"http://192.168.100.151:63201/admin"
"http://192.168.100.151:63201/admin"
"http://192.168.100.151:63201/admin"
"http://192.168.100.151:63201/admin"
"http://192.168.100.151:63201/admin"
"-"
"-"
"http://192.168.100.151:63201/admin"
"-"

登录,抓包,查报错

image-20240207110559196

[root@localhost html]# grep -rn '账号或密码错误'
Lib/Action/User/AppAction.class.php:78:                            "ReturnMessage" => $this->TransCode("账号或密码错误")
Lib/Action/User/AppAction.class.php:135:                            "ReturnMessage" => $this->TransCode("账号或密码错误")
Runtime/Cache/Home/c88bee5f8db8fa729e887a4d64452806.php:35:                                     alert("账号或密码错误!"+data);
Runtime/Cache/SjtAdminSjt/c88bee5f8db8fa729e887a4d64452806.php:35:                                      alert("账号或密码错误!"+data);
Tpl/SjtAdminSjt/Index/login.html:35:                                    alert("账号或密码错误!"+data);
Tpl/SjtAdminSjt/Index/loginlogin.html:40:                                       alert("账号或密码错误!"+str);
[root@localhost html]# cat Tpl/SjtAdminSjt/Index/login.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><{:C("WEB_NAME")}>管理后台登录</title>
<js href='/Public/User/js/jquery-1.7.2.js' />
<script type="text/javascript">
function check(){if($("#UserName").val() == ""){alert("用户名不能为空!");$("#UserName").focus();return false;}if($("#PassWord").val() == ""){alert("密码不能为空!");$("#PassWord").focus();return false;}/$.ajax({type:'POST',url:"/SjtAdminSjt_Sjtadminsjt_denglu.html",data:"UserName="+ $("#UserName").val() + "&PassWord=" + $("#PassWord").val(),dataType:'text',success:function(data){if(data==1){alert("登录成功!");location.href = "/SjtAdminSjt";}else{alert("账号或密码错误!"+data);}///},error:function(str){//}});return false;}

和抓包的结果一样,向/SjtAdminSjt_Sjtadminsjt_denglu.html发起请求,应该是配置了伪静态

image-20240207111128751

   if($UserName == NULL || $UserName == "" || $PassWord == NULL || $PassWord == "" ){exit("no");}else{$Sjtadminsjt = M("Sjtadminsjt");$list = $Sjtadminsjt->where("SjtUserName = '".$UserName."' and SjtPassWord = '".md5($PassWord)."'")->select();$SjtUserType = $Sjtadminsjt->where("SjtUserName = '".$UserName."' and SjtPassWord = '".md5($PassWord)."'")->getField("SjtUserType");if($list){session("SjtUserName",$UserName);//$_SESSION["SjtUserName"] = $UserName;session("SjtUserType",$SjtUserType);//$_SESSION["SjtUserType"] = $SjtUserType;//exit("ok".session("SjtUserName")."|".session("SjtUserType"));echo 1;exit;}else{exit("no");}}

密码就是简单的md5加密,自己配一个123456加上去就可以了

image-20240207111247159

image-20240207111335908image-20240207112034574

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/731059.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

HarmonyOS 数据持久化 关系型数据库之 初始化操作

上文 HarmonyOS 数据持久化之首选项 preferences 我们有说用户首选项 但它只能处理一些比较简单的数据类型结构 的持久化处理 如果是一些批量较大 结构较为复杂的数据结构 那么 首选项就无法满足了 我们就要选择 关系型数据库 通过 SQLite 组件实现的一种本地数据库&#xff0…

10 事务控制

文章目录 事务控制事务概述事务操作事务四大特性事务隔离级别 事务控制 事务概述 MySQL 事务主要用于处理操作量大&#xff0c;复杂度高的数据。比如说&#xff0c;在人员管理系统中&#xff0c;你删除一个人员&#xff0c;既需要删除人员的基本资料&#xff0c;也要删除和该…

校园生活信息平台:Java+Vue+MySQL全栈实践

✍✍计算机编程指导师 ⭐⭐个人介绍&#xff1a;自己非常喜欢研究技术问题&#xff01;专业做Java、Python、微信小程序、安卓、大数据、爬虫、Golang、大屏等实战项目。 ⛽⛽实战项目&#xff1a;有源码或者技术上的问题欢迎在评论区一起讨论交流&#xff01; ⚡⚡ Java实战 |…

Mint_21.3 drawing-area和goocanvas的FB笔记(五)

FreeBASIC SDL图形功能 SDL - Simple DirectMedia Layer 是完整的跨平台系统&#xff0c;有自己的窗口、直接捕获键盘、鼠标和游戏操纵杆的事件&#xff0c;直接操作音频和CDROM&#xff0c;在其surface上可使用gfx, openGL和direct3D绘图。Window3.0时代&#xff0c;各种应用…

Webpack常用配置及作用

一 、 二、 三、 四、 五、 六、 七、 八、

防御保护--IPSEC VPPN实验

实验拓扑图 实验背景&#xff1a;FW1和FW2是双机热备的状态。 实验要求&#xff1a;在FW5和FW3之间建立一条IPSEC通道&#xff0c;保证10.0.2.0/24网段可以正常访问到192.168.1.0/24 IPSEC VPPN实验配置&#xff08;由于是双机热备状态&#xff0c;所以FW1和FW2只需要配置FW1…

LLM 构建Data Muti-Agents 赋能数据分析平台的实践之①:数据采集

一、 概述 在推进产业数字化的过程中&#xff0c;数据作为最重要的资源是优化产业管控过程和提升产业数字化水平的基础一环&#xff0c;如何实现数据采集工作的便利化、高效化、智能化是降低数据分析体系运转成本以及推动数据价值挖掘体系的基础手段。随着数字化在产业端的推进…

UDP实现文件的发送、UDP实现全双工的聊天、TCP通信协议

我要成为嵌入式高手之3月7日Linux高编第十七天&#xff01;&#xff01; ———————————————————————————— 回顾 重要程序 1、UDP实现文件的发送 发端&#xff1a; #include "head.h"int main(void) {int sockfd 0;struct sockaddr_i…

LeetCode-102.题: 二叉树的层序遍历(原创)

【题目描述】 给你二叉树的根节点 root &#xff0c;返回其节点值的 层序遍历 。 &#xff08;即逐层地&#xff0c;从左到右访问所有节点&#xff09;。 示例 1&#xff1a; 输入&#xff1a;root [3,9,20,null,null,15,7] 输出&#xff1a;[[3],[9,20],[15,7]] 【题目链接…

Apache服务的搭建与配置

一、apache安装 systemctl stop firewalldsystemctl disable firewalldsetenforce 0yum -y install httpdsystemctl start httpdnetstat -ntlp | grep 80 二、认识主配置文件 # vim /etc/httpd/conf/httpd.conf ServerRoot "/etc/httpd" #定义工作目…

【CSP试题回顾】202109-1-数组推导

CSP-202109-1-数组推导 解题代码 #include<iostream> #include<vector> #include<algorithm> using namespace std;long long maxSum, minSum;int main() { int n;cin >> n;vector<int>B(n);for (auto& it : B){cin >> it;maxSum …

HNU-计算机网络-甘晴void学习感悟

前言 计算机网络其实我没太学懂&#xff0c; 仅从应试来说&#xff0c;考试成绩也不太好。 这也是为什么一直没有更新这一学科的学习感悟。 大三下还是有点闲&#xff0c;一周三天小长假&#xff0c;闲来无事还是给写了。 教材使用这本&#xff1a; 总领 期中考试 30% 期…

Vue 项目性能优化指南:提升应用速度与效率

&#x1f90d; 前端开发工程师、技术日更博主、已过CET6 &#x1f368; 阿珊和她的猫_CSDN博客专家、23年度博客之星前端领域TOP1 &#x1f560; 牛客高级专题作者、打造专栏《前端面试必备》 、《2024面试高频手撕题》 &#x1f35a; 蓝桥云课签约作者、上架课程《Vue.js 和 E…

基于ACM32 MCU的胎压监测仪方案介绍,提高驾驶安全性

胎压监测仪设计方案 基于ACM32F070的胎压监测仪是一种智能化的汽车安全装置&#xff0c;它可以实时监测汽车轮胎的胎压&#xff0c;提高驾驶安全性&#xff0c;降低事故风险。该方案采用ACM32F070微控制器作为核心控制芯片&#xff0c;结合压力传感器、无线通信模块等外围设备&…

Javaweb day13 day14 day15

spring boot 快速入门 写法 http协议 请求协议 响应协议 协议解析 Tomcat

学习人工智能:吴恩达《AI for everyone》2019 第4周:歧视,攻击,发展中国家,就业

吴恩达 Andrew Ng&#xff0c; 斯坦福大学前教授&#xff0c;Google Brain项目发起人、领导者。 Coursera 的联合创始人和联合主席&#xff0c;在 Coursera 上有十万用户的《机器学习》课程&#xff1b;斯坦福大学计算机科学前教授。百度前副总裁、前首席科学家&#xff1b;谷…

机器学习开源分子生成系列(1)-DeepFrag的本地部署及使用

欢迎浏览我的CSND博客&#xff01; Blockbuater_drug …进入 文章目录 前言一、DeepFrag是什么&#xff1f;二、conda中安装DeepFrag CLI环境1. 创建环境并激活2. 下载pre-trained model3. DeepFrag CLI 使用方法必需参数&#xff1a;可选参数&#xff1a; 4. DeepFrag CLI 使用…

了解开源可视化表单的主要优势

为什么可视化表单深受大家喜爱&#xff1f;这就需要了解开源可视化表单的优势和特点了。在流程化办公深入人心的今天&#xff0c;提高办公协作效率早已成为大家的发展目标&#xff0c;低代码技术平台、开源可视化表单是提升办公协作效率的得力助手&#xff0c;一起来看看它的优…

windows关闭copilot预览版

如果用户不想在windows系统当中启用Copilot&#xff0c;可以通过以下三种方式禁用。 第一种&#xff1a;隐藏Copilot 按钮 右键点击任务栏&#xff0c;取消勾选“显示 Copilot&#xff08;预览版&#xff09;按钮”&#xff0c;任务栏则不再显示&#xff0c;用户可以通过快捷键…

换手机后日记不见了怎么恢复?换手机日记内容同步方法

曾经&#xff0c;我使用的是一款苹果手机&#xff0c;这部手机陪伴了我整整3年。随着时间的推移&#xff0c;手机内存不够用成为了我面临的一个大问题&#xff0c;因此我决定更换一部新手机——这次我选择了OPPO品牌。在更换手机的过程中&#xff0c;我利用手机搬家软件一键同步…