no-style-please2 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/encrypted.html +76 -41
- data/_includes/head.html +7 -7
- data/_layouts/heatmap.html +11 -0
- metadata +4 -5
- data/_includes/main.css +0 -94
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1153b0ca84cca1f649bbc632a249df3c01b028d2bc9c4afe21bac1ef2ca4662
|
4
|
+
data.tar.gz: aa9b649d2f6b76789fc9872c75a76ba580dfc41b08518e66b7deb934ebde7ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d27d229ca31b46aff72e88311ab2c751f6d02c4fbe8437b6b9765a3e2bd938d2914e621cc94ff694f1f737a6aca10dc285d896d01e0b003f5316f10dbbb58f1
|
7
|
+
data.tar.gz: 6beac21e1b80e63c40399da8d12f2663e20f44993b7e8b487c639f4d2f0e3065080b0009c94917e4f161fb81e902c35db903b6b7e7bc95c241cb0b88bf8f5aa9
|
data/_includes/encrypted.html
CHANGED
@@ -35,11 +35,17 @@
|
|
35
35
|
|
36
36
|
|
37
37
|
<script>
|
38
|
-
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
function uint8ArrayToHex(uint8Array) {
|
40
|
+
return Array.from(uint8Array)
|
41
|
+
.map(byte => byte.toString(16).padStart(2, '0')) // 转换每个字节为2位16进制
|
42
|
+
.join(''); // 连接成字符串
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
{%- assign HEXKEY = '' | rand_bytes:32 %}
|
48
|
+
const contentEnc = '{{ content | encrypt_content_v2:HEXKEY }}';
|
43
49
|
|
44
50
|
!function(){
|
45
51
|
|
@@ -62,54 +68,90 @@
|
|
62
68
|
return await substl.deriveBits(pbkdf2,key,256);
|
63
69
|
}
|
64
70
|
|
65
|
-
async function decryptRaw(
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
71
|
+
async function decryptRaw(bf,key,outV){
|
72
|
+
if(bf.length < 8){
|
73
|
+
throw 'err'
|
74
|
+
}
|
75
|
+
let count = 0;
|
76
|
+
for (let i = 0; i < 4; i ++) {
|
77
|
+
count |= ((bf[i] ^ bf[i + 4] ^ i) << ((3 - i) * 8))
|
78
|
+
}
|
70
79
|
|
80
|
+
if(outV){
|
81
|
+
outV.count = count
|
82
|
+
}
|
83
|
+
if (bf.length < count) {
|
84
|
+
return
|
85
|
+
}
|
86
|
+
|
87
|
+
let bfIv = bf.slice(4,20)
|
88
|
+
let bfCipher = bf.slice(20,count )
|
89
|
+
|
71
90
|
var aeskey = {
|
72
|
-
name:"AES-
|
91
|
+
name:"AES-CTR",
|
73
92
|
}
|
74
93
|
var keyObj = await substl.importKey('raw',key,aeskey,false,['decrypt'])
|
75
|
-
var aesDec= {name: "AES-
|
76
|
-
var bfDec
|
94
|
+
var aesDec= {name: "AES-CTR",counter:bfIv,length:64};
|
77
95
|
try{
|
78
|
-
bfDec = await substl.decrypt(aesDec,keyObj,bfCipher)
|
96
|
+
let bfDec = await substl.decrypt(aesDec,keyObj,bfCipher)
|
97
|
+
return new Uint8Array(bfDec)
|
79
98
|
}catch (error) {
|
80
|
-
console.log(error)
|
81
99
|
throw error
|
82
100
|
}
|
83
|
-
|
84
|
-
|
101
|
+
|
102
|
+
}
|
103
|
+
|
104
|
+
async function decryptBase64Msg(msg64,key){
|
105
|
+
const base64str = msg64;
|
106
|
+
const bfMsg = base64js.decode(base64str)
|
107
|
+
return await decryptRaw(bfMsg,key)
|
108
|
+
|
85
109
|
}
|
86
110
|
async function checkKey(key){
|
87
|
-
|
88
|
-
|
89
|
-
|
111
|
+
const keyData = "{{ '' | encrypt_key:page,HEXKEY ,encid}}";
|
112
|
+
{% assign TestData = '' | rand_bytes: 200 %}
|
113
|
+
const testData = '{{ TestData }}';
|
114
|
+
const testDataEnc = '{{ TestData | encrypt_content_v2:HEXKEY }}';
|
115
|
+
const bfTestData = base64js.decode(testDataEnc)
|
90
116
|
|
91
|
-
|
117
|
+
|
118
|
+
const bfKeyData = base64js.decode(keyData)
|
92
119
|
let keyBf = null
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
120
|
+
let C = 0;
|
121
|
+
let sum = 0;
|
122
|
+
while (C ++ < 400 ) {
|
123
|
+
if (sum >= bfKeyData.length ) {
|
124
|
+
break
|
125
|
+
}
|
126
|
+
let bfSub = bfKeyData.slice(sum)
|
127
|
+
|
128
|
+
try {
|
129
|
+
let outV = {count:0}
|
130
|
+
let d = await decryptRaw(bfSub,key,outV)
|
131
|
+
|
132
|
+
sum += outV.count
|
133
|
+
if (d) {
|
134
|
+
let dec = await decryptRaw(bfTestData,d)
|
135
|
+
let s = new TextDecoder().decode(dec)
|
136
|
+
if(s == testData){
|
137
|
+
keyBf = d;
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
}else{
|
141
|
+
|
102
142
|
}
|
103
|
-
|
143
|
+
|
144
|
+
|
145
|
+
} catch (error) {
|
146
|
+
|
104
147
|
}
|
105
148
|
}
|
106
|
-
|
149
|
+
|
107
150
|
return keyBf
|
108
151
|
}
|
109
152
|
|
110
153
|
async function decrypt (key0,isCached){
|
111
154
|
// const key = Uint8Array([...]); // 32 bytes key
|
112
|
-
|
113
155
|
var key = ''
|
114
156
|
if(isCached){
|
115
157
|
key = readKey()
|
@@ -121,20 +163,12 @@
|
|
121
163
|
if (key.length == 0) {
|
122
164
|
return
|
123
165
|
}
|
124
|
-
|
125
|
-
var aeskey = {
|
126
|
-
name:"AES-CBC",
|
127
|
-
length:256
|
128
|
-
}
|
129
|
-
|
130
|
-
var keyObj = await substl.importKey('raw',key,aeskey,false,['decrypt'])
|
131
|
-
var aesDec= {name: "AES-CBC",iv:bfIv}
|
132
166
|
try {
|
133
167
|
let keyBf = await checkKey(key)
|
134
168
|
if(!keyBf){
|
135
169
|
throw 'error psw'
|
136
170
|
}
|
137
|
-
var bfDec = await
|
171
|
+
var bfDec = await decryptBase64Msg(contentEnc,keyBf)
|
138
172
|
var plain = new TextDecoder().decode(bfDec);
|
139
173
|
setKey(key)
|
140
174
|
document.getElementById("encrypted").style.display = 'none'
|
@@ -185,6 +219,7 @@
|
|
185
219
|
|
186
220
|
document.getElementById("ClearBtn1").onclick = function(){
|
187
221
|
localStorage.clear();
|
222
|
+
document.getElementById('passwordinput').value = ''
|
188
223
|
}
|
189
224
|
document.getElementById("ClearBtn2").onclick = function(){
|
190
225
|
localStorage.clear();
|
data/_includes/head.html
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
5
5
|
|
6
|
-
{
|
6
|
+
{%- if page.mathjax %}
|
7
7
|
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
|
8
8
|
<script type="text/javascript" async src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
9
|
-
{
|
9
|
+
{%- endif %}
|
10
10
|
|
11
11
|
<title>
|
12
12
|
{%- if page.title -%}
|
@@ -19,14 +19,14 @@
|
|
19
19
|
{%- if enc == '' -%}
|
20
20
|
{% endif %}
|
21
21
|
|
22
|
-
{
|
23
|
-
{
|
24
|
-
{
|
22
|
+
{%- if site.tags != "" -%}
|
23
|
+
{%- include collecttags.html -%}
|
24
|
+
{%- endif %}
|
25
25
|
|
26
26
|
<link rel="shortcut icon" type="image/x-icon" href="{{ site.favicon | relative_url }}" />
|
27
|
-
|
28
27
|
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}" />
|
29
28
|
|
30
|
-
|
29
|
+
{%- assign rnd = '' | rand_bytes:5 %}
|
30
|
+
<link rel="stylesheet" href="//no-style.kr7y.workers.dev/nostyle.css?{{rnd}}" />
|
31
31
|
|
32
32
|
</head>
|
data/_layouts/heatmap.html
CHANGED
@@ -58,4 +58,15 @@ generate this page only once。
|
|
58
58
|
|
59
59
|
|
60
60
|
<br>
|
61
|
+
|
62
|
+
{% assign posts_by_year = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
|
63
|
+
|
64
|
+
|
65
|
+
{% for year in posts_by_year %}
|
66
|
+
{{ year.name }}
|
67
|
+
{% include heatmap.html endYear=year.name title=year.name %}
|
68
|
+
|
69
|
+
{% endfor %}
|
70
|
+
|
71
|
+
|
61
72
|
{{ content }}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no-style-please2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.9.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.9.0
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- r
|
@@ -55,7 +55,6 @@ files:
|
|
55
55
|
- _includes/head.html
|
56
56
|
- _includes/heatmap.html
|
57
57
|
- _includes/heatmap.js
|
58
|
-
- _includes/main.css
|
59
58
|
- _includes/menu_item.html
|
60
59
|
- _includes/post_list.html
|
61
60
|
- _includes/postitem.html
|
data/_includes/main.css
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
body[a="dark"] {
|
2
|
-
filter: invert(1); }
|
3
|
-
body[a="dark"] img {
|
4
|
-
filter: invert(1); }
|
5
|
-
body[a="dark"] img.ioda {
|
6
|
-
filter: invert(0); }
|
7
|
-
|
8
|
-
@media (prefers-color-scheme: dark) {
|
9
|
-
body[a="auto"] {
|
10
|
-
filter: invert(1); }
|
11
|
-
body[a="auto"] img {
|
12
|
-
filter: invert(1); }
|
13
|
-
body[a="auto"] img.ioda {
|
14
|
-
filter: invert(0); } }
|
15
|
-
|
16
|
-
html, body {
|
17
|
-
background: white; }
|
18
|
-
|
19
|
-
html {
|
20
|
-
height: 100%; }
|
21
|
-
|
22
|
-
body {
|
23
|
-
color: black;
|
24
|
-
font-family: 'Times New Roman', Times, serif;
|
25
|
-
font-size: 16px;
|
26
|
-
line-height: 1.6;
|
27
|
-
margin: 0;
|
28
|
-
min-height: 100%;
|
29
|
-
overflow-wrap: break-word; }
|
30
|
-
|
31
|
-
.post-meta {
|
32
|
-
text-align: right; }
|
33
|
-
|
34
|
-
h2, h3, h4, h5, h6 {
|
35
|
-
margin-top: 3rem; }
|
36
|
-
|
37
|
-
hr {
|
38
|
-
margin: 2rem 0; }
|
39
|
-
|
40
|
-
p {
|
41
|
-
margin: 1rem 0; }
|
42
|
-
|
43
|
-
li {
|
44
|
-
margin: 0.4rem 0; }
|
45
|
-
|
46
|
-
*:target {
|
47
|
-
background: yellow; }
|
48
|
-
|
49
|
-
.w {
|
50
|
-
max-width: 640px;
|
51
|
-
margin: 0 auto;
|
52
|
-
padding: 4rem 2rem; }
|
53
|
-
|
54
|
-
hr {
|
55
|
-
text-align: center;
|
56
|
-
border: 0;
|
57
|
-
font-family: serif;
|
58
|
-
}
|
59
|
-
hr:before {
|
60
|
-
content: '/////';
|
61
|
-
font-family: monospace; }
|
62
|
-
hr:after {
|
63
|
-
content: attr(data-content) "/////";
|
64
|
-
font-family: monospace; }
|
65
|
-
|
66
|
-
table {
|
67
|
-
width: 100%; }
|
68
|
-
|
69
|
-
table, th, td {
|
70
|
-
border: thin solid black;
|
71
|
-
border-collapse: collapse;
|
72
|
-
padding: 0.4rem; }
|
73
|
-
|
74
|
-
code {
|
75
|
-
color: white;
|
76
|
-
background: gray; }
|
77
|
-
|
78
|
-
div.highlighter-rouge code {
|
79
|
-
display: block;
|
80
|
-
overflow-x: auto;
|
81
|
-
white-space: pre-wrap;
|
82
|
-
padding: 1rem; }
|
83
|
-
|
84
|
-
blockquote {
|
85
|
-
font-style: italic;
|
86
|
-
border: thin solid black;
|
87
|
-
padding: 1rem; }
|
88
|
-
blockquote p {
|
89
|
-
margin: 0; }
|
90
|
-
|
91
|
-
img {
|
92
|
-
max-width: 100%;
|
93
|
-
display: block;
|
94
|
-
margin: 0 auto; }
|