4.2.4 • Published 7 months ago

hexo-encrypt-token v4.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

:cake: 自用 Hexo 简单反爬虫方案, 同时给与友好SEO, 修改自 D0n9X1n/hexo-blog-encrypt

repo size LICENSE NPM version NPM downloads QQ Group

Intro

自用 Hexo 简单反爬虫方案, 同时给与友好SEO, 修改自 D0n9X1n/hexo-blog-encrypt

采用加密文章内容并自动解密的方式简单反爬虫, 同时提供SEO友好内容

Usage

npm install hexo-encrypt-token --save
<head>
  <!-- hexo-encrypt-token -->
  <script>
    // hexo-encrypt-token
    var storage = window.localStorage;
    var storageName = 'hexo-encrypt-token'; 
    // 下方自行调节: tokenJsonStr
    var tokenJsonStr = `{
      "dk": {
        "alg": "A256CBC",
        "ext": true,
        "k": "5YxPbPj0WL0xWESGtmtvC42cHRrluRMA8Lgo85Xzv10",
        "key_ops": [ "decrypt" ],
        "kty": "oct"
      },
      "iv": "802b4349e5eb3aad98158dde9b831b85",
      "hmk": {
        "alg": "HS256",
        "ext": true,
        "k": "5YxPbPj0WL0xWESGtmtvC42cHRrluRMA8Lgo85Xzv10",
        "key_ops": [ "verify" ],
        "kty": "oct"
      }
    }`;
    storage.setItem(storageName, tokenJsonStr);
  </script>
  <!-- End hexo-encrypt-token -->
</head>
$token="admin"
# 此脚本可批量设置 ./source/_posts 目录下的所有 md 文章的 password 
# $token="admin" 即为设置 password 为 admin
./password.ps1

使用案例

Related Projects

Donate

hexo-encrypt-token is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

We accept donations through these channels:

  • 爱发电

Author

hexo-encrypt-token © yiyun, Released under the MIT License. Authored and maintained by yiyun with help from contributors (list).

GitHub @yiyungent Gitee @yiyungent

4.2.3

7 months ago

4.2.4

7 months ago

4.2.2

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

4.1.5

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.1.0

2 years ago

4.0.4

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

4.0.1

2 years ago