《云计算》-安全策略-使用gpg实现加密/界面及软件功能、验证数据的来源正确性

1 案例1:加密与解密应用
1.1 问题

本案例要求采用gpg工具实现加/解密及软件签名等功能,分别完成以下任务:

检查文件的MD5校验和
使用GPG实现文件机密性保护,加密和解密操作
使用GPG的签名机制,验证数据的来源正确性

     
     
  • 1
  • 2
  • 3

1.2 方案

加密算法主要有以下几种分类:

1.为确保数据机密性算法:

a) 对称加密算法(AES,DES)

b) 非对称加密算法(RSA,DSA)

2.为确保数据完整性算法:

a) 信息摘要(MD5,SHA256,SHA512)
1.3 步骤

实现此案例需要按照如下步骤进行。

步骤一:检查文件的MD5校验和

1) 查看文件改动前的校验和,复制为新文件其校验和不变

[root@svr5 ~]# vim file1.txt
abcdef
123456779
[root@svr5 ~]# cp file1.txt file2.txt
[root@svr5 ~]# cat file1.txt > file3.txt
[root@svr5 ~]# md5sum file?.txt                  //文件内容一致,则校验和也不变
b92aa0f8aa5d5af5a47c6896283f3536  file1.txt
b92aa0f8aa5d5af5a47c6896283f3536  file2.txt
b92aa0f8aa5d5af5a47c6896283f3536  file3.txt

     
     
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

2) 对文件内容稍作改动,再次检查校验和,会发现校验和已大不相同

[root@svr5 ~]# echo "x" >> file1.txt
[root@svr5 ~]# md5sum file?.txt
6be3efe71d8b4b1ed34ac45f4edd2ba7  file1.txt
b92aa0f8aa5d5af5a47c6896283f3536  file2.txt
b92aa0f8aa5d5af5a47c6896283f3536  file3.txt

     
     
  • 1
  • 2
  • 3
  • 4
  • 5

步骤二:使用GPG对称加密方式保护文件

GnuPG是非常流行的加密软件,支持所有常见加密算法,并且开源免费使用。

1)确保已经安装了相关软件(默认已经安装好了)

[root@svr5 ~]# yum -y install gnupg2            //安装软件
[root@svr5 ~]# gpg --version                    //查看版本
gpg (GnuPG) 2.0.22

     
     
  • 1
  • 2
  • 3

2) gpg使用对称加密算法加密数据的操作

执行下列操作:

[root@svr5 ~]# gpg -c file2.txt
.. ..

     
     
  • 1
  • 2

根据提示依次输入两次密码即可。如果是在GNOME桌面环境,设置密码的交互界面会是弹出的窗口程序,如图-1所示:
在这里插入图片描述
图-1

如果是在tty终端执行的上述加密操作,则提示界面也是文本方式的,如图-2所示。
在这里插入图片描述
图-2

根据提示输入两次口令,加密后的文件(自动添加后缀 .gpg)就生成了,传递过程中只要发送加密的文件(比如 file2.txt.gpg)就可以了。

[root@svr5 ~]# cat file2.txt.gpg                    //查看加密数据为乱码

     
     
  • 1

3)使用gpg对加密文件进行解密操作

收到加密的文件后,必须进行解密才能查看其内容。

[root@client ~]# gpg -d file2.txt.gpg > file2.txt      //解密后保存
gpg: 3DES 加密过的数据
.. ..                                              //根据提示输入正确密码
[root@client ~]# cat file2.txt                      //查看解密后的文件
abcdef
123456779

     
     
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

步骤三:使用GPG非对称加密方式保护文件

非对称加密/解密文件时,UserA生成私钥与公钥,并把公钥发送给UserB,UserB使用公钥加密数据,并把加密后的数据传给UserA,UserA最后使用自己的私钥解密数据。

实现过程如下所述。

1)接收方UserA创建自己的公钥、私钥对(在192.168.4.100操作)

执行gpg --gen-key操作,根据提示选择并创建密钥:

[root@client ~]# gpg --gen-key
… …
请选择您要使用的密钥种类:
   (1) RSA and RSA (default)                            //默认算法为RSA
   (2) DSA and Elgamal
   (3) DSA (仅用于签名)
   (4) RSA (仅用于签名)
您的选择?                                              //直接回车默认(1)
RSA 密钥长度应在 1024 位与 4096 位之间。
您想要用多大的密钥尺寸?(2048)                              //接受默认2048位
您所要求的密钥尺寸是 2048 位
请设定这把密钥的有效期限。
         0 = 密钥永不过期
      <n>  = 密钥在 n 天后过期
      <n>w = 密钥在 n 周后过期
      <n>m = 密钥在 n 月后过期
      <n>y = 密钥在 n 年后过期
密钥的有效期限是?(0)                                          //接受默认永不过期
密钥永远不会过期
以上正确吗?(y/n)y                                          //输入y确认
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) <[email protected]>"
真实姓名:UserA
电子邮件地址:[email protected]
注释:UserA
您选定了这个用户标识:
    “UserA (UserA) <[email protected]>”
更改姓名(N)、注释(C)、电子邮件地址(E)或确定(O)/退出(Q)?O          //输入大写O确认
您需要一个密码来保护您的私钥。
我们需要生成大量的随机字节。这个时候您可以多做些琐事(像是敲打键盘、移动
鼠标、读写硬盘之类的),这会让随机数字发生器有更好的机会获得足够的熵数。
gpg: 正在检查信任度数据库
gpg: 需要 3 份勉强信任和 1 份完全信任,PGP 信任模型
gpg: 深度:0 有效性:  1 已签名:  0 信任度:0-,0q,0n,0m,0f,1u
pub   2048R/421C9354 2017-08-16
密钥指纹 = 8A27 6FB5 1315 CEF8 D8A0  A65B F0C9 7DA6 421C 9354
uid                  UserA (UserA) <[email protected]>
sub   2048R/9FA3AD25 2017-08-16

     
     
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39

2)UserA导出自己的公钥文件(在192.168.4.100操作)

用户的公钥、私钥信息分别保存在pubring.gpg和secring.gpg文件内:

[root@client ~]# gpg --list-keys                          //查看公钥环
/root/.gnupg/pubring.gpg
------------------------------
pub   2048R/421C9354 2017-08-16
uid                  UserB (User B) <[email protected]>
sub   2048R/9FA3AD25 2017-08-16

     
     
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

使用gpg命令结合–export选项将其中的公钥文本导出,传给发送方UserA:

[root@client ~]# gpg -a --export UserB > /tmp/UserA.pub
//--export的作用是导出密钥,-a的作用是导出的密钥存储为ASCII格式
[root@client ~]# scp /tmp/UserA.pub 192.168.4.5:/tmp/    //将密钥传给UserB

     
     
  • 1
  • 2
  • 3

3)UserB导入接收的公钥信息

使用gpg命令结合–import选项导入发送方的公钥信息,以便在加密文件时指定对应的公钥。

[root@svr5 ~]# gpg --import /tmp/UserA.pub
gpg: 密钥 421C9354:公钥“UserA (UserA) <[email protected]>”已导入
gpg: 合计被处理的数量:1
gpg:           已导入:1  (RSA: 1) 

     
     
  • 1
  • 2
  • 3
  • 4
  1. UserB使用导入的公钥加密数据,并把加密后的数据传给UserA

    [root@svr5 ~]# echo “I love you .” > love.txt
    [root@svr5 ~]# gpg -e -r UserA love.txt
    无论如何还是使用这把密钥吗?(y/N)y //确认使用此密钥加密文件
    [root@svr5 ~]# scp love.txt.gpg 192.168.4.100:/root //加密的数据传给UserA

4)UserA以自己的私钥解密文件

[root@client ~]# gpg -d love.txt.gpg > love.txt
您需要输入密码,才能解开这个用户的私钥:“UserA (UserA) <[email protected]>”
2048 位的 RSA 密钥,钥匙号 9FA3AD25,建立于 2017-08-16 (主钥匙号 421C9354)
                                                  //验证私钥口令
gpg: 由 2048 位的 RSA 密钥加密,钥匙号为 9FA3AD25、生成于 2017-08-16
      “UserA (UserA) <[email protected]>”
[root@client ~]# cat love.txt                      //获得解密后的文件内容
I love you.

     
     
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

步骤四:使用GPG的签名机制,检查数据来源的正确性

使用私钥签名的文件,是可以使用对应的公钥验证签名的,只要验证成功,则说明这个文件一定是出自对应的私钥签名,除非私钥被盗,否则一定能证明这个文件来自于某个人!

1)在client(192.168.4.100)上,UserA为软件包创建分离式签名

将软件包、签名文件、公钥文件一起发布给其他用户下载。

[root@client ~]# tar zcf log.tar /var/log              //建立测试软件包
[root@client ~]# gpg -b log.tar                      //创建分离式数字签名
[root@client ~]# ls -lh log.tar* UserA.pub
-rw-rw-r--. 1 root root 170 8月  17 21:18 log.tar
-rw-rw-r--. 1 root root 287 8月  17 21:22 log.tar.sig
[root@client ~]# scp log.tar* 192.168.4.5:/root        //将签名文件与签名传给UserB

     
     
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

2)在192.168.4.5上验证签名

[root@svr5 ~]# gpg --verify log.tar.sig log.tar
gpg:于2028年06月07日 星期六 23时23分23秒 CST 创建的签名,使用 RSA,钥匙号 421C9354
gpg: 完好的签名,来自于“UserA (UserA) <[email protected]>”
.. ..

     
     
  • 1
  • 2
  • 3
  • 4
                                </div>
            <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-b6c3c6d139.css" rel="stylesheet">
                                            <div class="more-toolbox">
            <div class="left-toolbox">
                <ul class="toolbox-list">
                    
                    <li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true">
                        <use xlink:href="#csdnc-thumbsup"></use>
                    </svg><span class="name">点赞</span>
                    <span class="count"></span>
                    </a></li>
                    <li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_824&quot;}"><svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-csdnc-Collection-G"></use>
                    </svg><span class="name">收藏</span></a></li>
                    <li class="tool-item tool-active is-share"><a href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;1582594662_002&quot;}"><svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-csdnc-fenxiang"></use>
                    </svg>分享</a></li>
                    <!--打赏开始-->
                                            <!--打赏结束-->
                                            <li class="tool-item tool-more">
                        <a>
                        <svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg>
                        </a>
                        <ul class="more-box">
                            <li class="item"><a class="article-report">文章举报</a></li>
                        </ul>
                    </li>
                                        </ul>
            </div>
                        </div>
        <div class="person-messagebox">
            <div class="left-message"><a href="https://blog.csdn.net/xie_qi_chao">
                <img src="https://profile.csdnimg.cn/B/F/6/3_xie_qi_chao" class="avatar_pic" username="xie_qi_chao">
                                        <img src="https://g.csdnimg.cn/static/user-reg-year/1x/2.png" class="user-years">
                                </a></div>
            <div class="middle-message">
                                    <div class="title"><span class="tit"><a href="https://blog.csdn.net/xie_qi_chao" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}" target="_blank">解启超</a></span>
                                        </div>
                <div class="text"><span>发布了329 篇原创文章</span> · <span>获赞 52</span> · <span>访问量 3万+</span></div>
            </div>
                            <div class="right-message">
                                        <a href="https://im.csdn.net/im/main.html?userName=xie_qi_chao" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信
                    </a>
                                                        <a class="btn btn-sm attented bt-button personal-watch" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}">已关注</a>
                                </div>
                        </div>
                </div>
</article>
发布了179 篇原创文章 · 获赞 180 · 访问量 7066

1 案例1:加密与解密应用
1.1 问题

本案例要求采用gpg工具实现加/解密及软件签名等功能,分别完成以下任务:

检查文件的MD5校验和
使用GPG实现文件机密性保护,加密和解密操作
使用GPG的签名机制,验证数据的来源正确性

  
  
  • 1
  • 2
  • 3

1.2 方案

加密算法主要有以下几种分类:

1.为确保数据机密性算法:

a) 对称加密算法(AES,DES)

b) 非对称加密算法(RSA,DSA)

2.为确保数据完整性算法:

a) 信息摘要(MD5,SHA256,SHA512)
1.3 步骤

实现此案例需要按照如下步骤进行。

步骤一:检查文件的MD5校验和

1) 查看文件改动前的校验和,复制为新文件其校验和不变

[root@svr5 ~]# vim file1.txt
abcdef
123456779
[root@svr5 ~]# cp file1.txt file2.txt
[root@svr5 ~]# cat file1.txt > file3.txt
[root@svr5 ~]# md5sum file?.txt                  //文件内容一致,则校验和也不变
b92aa0f8aa5d5af5a47c6896283f3536  file1.txt
b92aa0f8aa5d5af5a47c6896283f3536  file2.txt
b92aa0f8aa5d5af5a47c6896283f3536  file3.txt

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

2) 对文件内容稍作改动,再次检查校验和,会发现校验和已大不相同

[root@svr5 ~]# echo "x" >> file1.txt
[root@svr5 ~]# md5sum file?.txt
6be3efe71d8b4b1ed34ac45f4edd2ba7  file1.txt
b92aa0f8aa5d5af5a47c6896283f3536  file2.txt
b92aa0f8aa5d5af5a47c6896283f3536  file3.txt

  
  
  • 1
  • 2
  • 3
  • 4
  • 5

步骤二:使用GPG对称加密方式保护文件

GnuPG是非常流行的加密软件,支持所有常见加密算法,并且开源免费使用。

1)确保已经安装了相关软件(默认已经安装好了)

[root@svr5 ~]# yum -y install gnupg2            //安装软件
[root@svr5 ~]# gpg --version                    //查看版本
gpg (GnuPG) 2.0.22

  
  
  • 1
  • 2
  • 3

2) gpg使用对称加密算法加密数据的操作

执行下列操作:

[root@svr5 ~]# gpg -c file2.txt
.. ..

  
  
  • 1
  • 2

根据提示依次输入两次密码即可。如果是在GNOME桌面环境,设置密码的交互界面会是弹出的窗口程序,如图-1所示:
在这里插入图片描述
图-1

如果是在tty终端执行的上述加密操作,则提示界面也是文本方式的,如图-2所示。
在这里插入图片描述
图-2

根据提示输入两次口令,加密后的文件(自动添加后缀 .gpg)就生成了,传递过程中只要发送加密的文件(比如 file2.txt.gpg)就可以了。

[root@svr5 ~]# cat file2.txt.gpg                    //查看加密数据为乱码

  
  
  • 1

3)使用gpg对加密文件进行解密操作

收到加密的文件后,必须进行解密才能查看其内容。

[root@client ~]# gpg -d file2.txt.gpg > file2.txt      //解密后保存
gpg: 3DES 加密过的数据
.. ..                                              //根据提示输入正确密码
[root@client ~]# cat file2.txt                      //查看解密后的文件
abcdef
123456779

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

步骤三:使用GPG非对称加密方式保护文件

非对称加密/解密文件时,UserA生成私钥与公钥,并把公钥发送给UserB,UserB使用公钥加密数据,并把加密后的数据传给UserA,UserA最后使用自己的私钥解密数据。

实现过程如下所述。

1)接收方UserA创建自己的公钥、私钥对(在192.168.4.100操作)

执行gpg --gen-key操作,根据提示选择并创建密钥:

[root@client ~]# gpg --gen-key
… …
请选择您要使用的密钥种类:
   (1) RSA and RSA (default)                            //默认算法为RSA
   (2) DSA and Elgamal
   (3) DSA (仅用于签名)
   (4) RSA (仅用于签名)
您的选择?                                              //直接回车默认(1)
RSA 密钥长度应在 1024 位与 4096 位之间。
您想要用多大的密钥尺寸?(2048)                              //接受默认2048位
您所要求的密钥尺寸是 2048 位
请设定这把密钥的有效期限。
         0 = 密钥永不过期
      <n>  = 密钥在 n 天后过期
      <n>w = 密钥在 n 周后过期
      <n>m = 密钥在 n 月后过期
      <n>y = 密钥在 n 年后过期
密钥的有效期限是?(0)                                          //接受默认永不过期
密钥永远不会过期
以上正确吗?(y/n)y                                          //输入y确认
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) <[email protected]>"
真实姓名:UserA
电子邮件地址:[email protected]
注释:UserA
您选定了这个用户标识:
    “UserA (UserA) <[email protected]>”
更改姓名(N)、注释(C)、电子邮件地址(E)或确定(O)/退出(Q)?O          //输入大写O确认
您需要一个密码来保护您的私钥。
我们需要生成大量的随机字节。这个时候您可以多做些琐事(像是敲打键盘、移动
鼠标、读写硬盘之类的),这会让随机数字发生器有更好的机会获得足够的熵数。
gpg: 正在检查信任度数据库
gpg: 需要 3 份勉强信任和 1 份完全信任,PGP 信任模型
gpg: 深度:0 有效性:  1 已签名:  0 信任度:0-,0q,0n,0m,0f,1u
pub   2048R/421C9354 2017-08-16
密钥指纹 = 8A27 6FB5 1315 CEF8 D8A0  A65B F0C9 7DA6 421C 9354
uid                  UserA (UserA) <[email protected]>
sub   2048R/9FA3AD25 2017-08-16

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39

2)UserA导出自己的公钥文件(在192.168.4.100操作)

用户的公钥、私钥信息分别保存在pubring.gpg和secring.gpg文件内:

[root@client ~]# gpg --list-keys                          //查看公钥环
/root/.gnupg/pubring.gpg
------------------------------
pub   2048R/421C9354 2017-08-16
uid                  UserB (User B) <[email protected]>
sub   2048R/9FA3AD25 2017-08-16

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

使用gpg命令结合–export选项将其中的公钥文本导出,传给发送方UserA:

[root@client ~]# gpg -a --export UserB > /tmp/UserA.pub
//--export的作用是导出密钥,-a的作用是导出的密钥存储为ASCII格式
[root@client ~]# scp /tmp/UserA.pub 192.168.4.5:/tmp/    //将密钥传给UserB

  
  
  • 1
  • 2
  • 3

3)UserB导入接收的公钥信息

使用gpg命令结合–import选项导入发送方的公钥信息,以便在加密文件时指定对应的公钥。

[root@svr5 ~]# gpg --import /tmp/UserA.pub
gpg: 密钥 421C9354:公钥“UserA (UserA) <[email protected]>”已导入
gpg: 合计被处理的数量:1
gpg:           已导入:1  (RSA: 1) 

  
  
  • 1
  • 2
  • 3
  • 4
  1. UserB使用导入的公钥加密数据,并把加密后的数据传给UserA

    [root@svr5 ~]# echo “I love you .” > love.txt
    [root@svr5 ~]# gpg -e -r UserA love.txt
    无论如何还是使用这把密钥吗?(y/N)y //确认使用此密钥加密文件
    [root@svr5 ~]# scp love.txt.gpg 192.168.4.100:/root //加密的数据传给UserA

4)UserA以自己的私钥解密文件

[root@client ~]# gpg -d love.txt.gpg > love.txt
您需要输入密码,才能解开这个用户的私钥:“UserA (UserA) <[email protected]>”
2048 位的 RSA 密钥,钥匙号 9FA3AD25,建立于 2017-08-16 (主钥匙号 421C9354)
                                                  //验证私钥口令
gpg: 由 2048 位的 RSA 密钥加密,钥匙号为 9FA3AD25、生成于 2017-08-16
      “UserA (UserA) <[email protected]>”
[root@client ~]# cat love.txt                      //获得解密后的文件内容
I love you.

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

步骤四:使用GPG的签名机制,检查数据来源的正确性

使用私钥签名的文件,是可以使用对应的公钥验证签名的,只要验证成功,则说明这个文件一定是出自对应的私钥签名,除非私钥被盗,否则一定能证明这个文件来自于某个人!

1)在client(192.168.4.100)上,UserA为软件包创建分离式签名

将软件包、签名文件、公钥文件一起发布给其他用户下载。

[root@client ~]# tar zcf log.tar /var/log              //建立测试软件包
[root@client ~]# gpg -b log.tar                      //创建分离式数字签名
[root@client ~]# ls -lh log.tar* UserA.pub
-rw-rw-r--. 1 root root 170 8月  17 21:18 log.tar
-rw-rw-r--. 1 root root 287 8月  17 21:22 log.tar.sig
[root@client ~]# scp log.tar* 192.168.4.5:/root        //将签名文件与签名传给UserB

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

2)在192.168.4.5上验证签名

[root@svr5 ~]# gpg --verify log.tar.sig log.tar
gpg:于2028年06月07日 星期六 23时23分23秒 CST 创建的签名,使用 RSA,钥匙号 421C9354
gpg: 完好的签名,来自于“UserA (UserA) <[email protected]>”
.. ..

  
  
  • 1
  • 2
  • 3
  • 4
                                </div>
            <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-b6c3c6d139.css" rel="stylesheet">
                                            <div class="more-toolbox">
            <div class="left-toolbox">
                <ul class="toolbox-list">
                    
                    <li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true">
                        <use xlink:href="#csdnc-thumbsup"></use>
                    </svg><span class="name">点赞</span>
                    <span class="count"></span>
                    </a></li>
                    <li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_824&quot;}"><svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-csdnc-Collection-G"></use>
                    </svg><span class="name">收藏</span></a></li>
                    <li class="tool-item tool-active is-share"><a href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;1582594662_002&quot;}"><svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-csdnc-fenxiang"></use>
                    </svg>分享</a></li>
                    <!--打赏开始-->
                                            <!--打赏结束-->
                                            <li class="tool-item tool-more">
                        <a>
                        <svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg>
                        </a>
                        <ul class="more-box">
                            <li class="item"><a class="article-report">文章举报</a></li>
                        </ul>
                    </li>
                                        </ul>
            </div>
                        </div>
        <div class="person-messagebox">
            <div class="left-message"><a href="https://blog.csdn.net/xie_qi_chao">
                <img src="https://profile.csdnimg.cn/B/F/6/3_xie_qi_chao" class="avatar_pic" username="xie_qi_chao">
                                        <img src="https://g.csdnimg.cn/static/user-reg-year/1x/2.png" class="user-years">
                                </a></div>
            <div class="middle-message">
                                    <div class="title"><span class="tit"><a href="https://blog.csdn.net/xie_qi_chao" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}" target="_blank">解启超</a></span>
                                        </div>
                <div class="text"><span>发布了329 篇原创文章</span> · <span>获赞 52</span> · <span>访问量 3万+</span></div>
            </div>
                            <div class="right-message">
                                        <a href="https://im.csdn.net/im/main.html?userName=xie_qi_chao" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信
                    </a>
                                                        <a class="btn btn-sm attented bt-button personal-watch" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}">已关注</a>
                                </div>
                        </div>
                </div>
</article>

猜你喜欢

转载自blog.csdn.net/weixin_46575696/article/details/105040689
今日推荐