From a859053a3ab6fa87035c6ea8685f7eccfb349388 Mon Sep 17 00:00:00 2001 From: cxzlw Date: Fri, 6 Sep 2024 18:02:16 +0800 Subject: [PATCH] Site updated: 2024-09-06 18:02:16 --- 2023/07/05/trace-of-line-01/index.html | 2 +- 2023/07/05/zhihu-aac-old/index.html | 8 +- 2023/07/06/zerotier-planet-convert/index.html | 2 +- 2023/07/10/trace-of-line-02/index.html | 2 +- .../permission-system-design-share/index.html | 2 +- 2023/08/31/cell-structure/index.html | 2 +- 2023/10/03/busuanzi-bug/index.html | 2 +- 2024/07/11/json-format/index.html | 2 +- 2024/09/06/htb-rsaiseasy/index.html | 12 +- about/index.html | 2 +- index.html | 6 +- local-search.xml | 6 +- sitemap.xml | 14 + sw.js | 2 +- tags/index.html | 2 +- "tags/\347\210\254\350\231\253/index.html" | 425 ++++++++++++++++++ "tags/\351\200\206\345\220\221/index.html" | 425 ++++++++++++++++++ 17 files changed, 897 insertions(+), 19 deletions(-) create mode 100644 "tags/\347\210\254\350\231\253/index.html" create mode 100644 "tags/\351\200\206\345\220\221/index.html" diff --git a/2023/07/05/trace-of-line-01/index.html b/2023/07/05/trace-of-line-01/index.html index 235793b..4197b87 100644 --- a/2023/07/05/trace-of-line-01/index.html +++ b/2023/07/05/trace-of-line-01/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/07/05/zhihu-aac-old/index.html b/2023/07/05/zhihu-aac-old/index.html index a886856..c7c5b3d 100644 --- a/2023/07/05/zhihu-aac-old/index.html +++ b/2023/07/05/zhihu-aac-old/index.html @@ -25,12 +25,14 @@ - + + + @@ -431,6 +433,10 @@

#反爬 + #逆向 + + #爬虫 + diff --git a/2023/07/06/zerotier-planet-convert/index.html b/2023/07/06/zerotier-planet-convert/index.html index 69abe1b..569a486 100644 --- a/2023/07/06/zerotier-planet-convert/index.html +++ b/2023/07/06/zerotier-planet-convert/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/07/10/trace-of-line-02/index.html b/2023/07/10/trace-of-line-02/index.html index 831e25e..a6027f0 100644 --- a/2023/07/10/trace-of-line-02/index.html +++ b/2023/07/10/trace-of-line-02/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/08/04/permission-system-design-share/index.html b/2023/08/04/permission-system-design-share/index.html index d36db5f..f6d5bce 100644 --- a/2023/08/04/permission-system-design-share/index.html +++ b/2023/08/04/permission-system-design-share/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/08/31/cell-structure/index.html b/2023/08/31/cell-structure/index.html index 9a2b1df..06c62e5 100644 --- a/2023/08/31/cell-structure/index.html +++ b/2023/08/31/cell-structure/index.html @@ -27,7 +27,7 @@ - + diff --git a/2023/10/03/busuanzi-bug/index.html b/2023/10/03/busuanzi-bug/index.html index d55f407..aedd447 100644 --- a/2023/10/03/busuanzi-bug/index.html +++ b/2023/10/03/busuanzi-bug/index.html @@ -29,7 +29,7 @@ - + diff --git a/2024/07/11/json-format/index.html b/2024/07/11/json-format/index.html index 4a885d5..a03e48c 100644 --- a/2024/07/11/json-format/index.html +++ b/2024/07/11/json-format/index.html @@ -24,7 +24,7 @@ - + diff --git a/2024/09/06/htb-rsaiseasy/index.html b/2024/09/06/htb-rsaiseasy/index.html index ae1ab69..ca7db66 100644 --- a/2024/09/06/htb-rsaiseasy/index.html +++ b/2024/09/06/htb-rsaiseasy/index.html @@ -23,8 +23,8 @@ - - + + @@ -258,8 +258,8 @@ @@ -270,7 +270,7 @@ @@ -366,7 +366,7 @@

5. n2

为方便展示过程,我们将 (n1 * E) + n2 记为 nE

$$
n2 \equiv nE \pmod {n1}
$$

-

$$
n2 = nE\ %\ n1 + n1 \cdot k
$$

+

$$
\def\mod{\text{ mod }}
n2 = nE \mod n1 + n1 \cdot k
$$

其中 k 是未知的,你可以直接猜测 k = 0n2 = nE % n1,但我还是想证明它。

注意到 n2 是两个 getPrime(512) 相乘,因此 0 < k < 2^1024。接下来用代码测试 k 可以的取值。

1
2
3
4
5
6
n1 = 101302608234750530215072272904674037076286246679691423280860345380727387460347553585319149306846617895151397345134725469568034944362725840889803514170441153452816738520513986621545456486260186057658467757935510362350710672577390455772286945685838373154626020209228183673388592030449624410459900543470481715269
ne = 601613204734044874510382122719388369424704454445440856955212747733856646787417730534645761871794607755794569926160226856377491672497901427125762773794612714954548970049734347216746397532291215057264241745928752782099454036635249993278807842576939476615587990343335792606509594080976599605315657632227121700808996847129758656266941422227113386647519604149159248887809688029519252391934671647670787874483702292498358573950359909165677642135389614863992438265717898239252246163

for k in (-1, 0, 1):
n2 = ne % n1 + n1 * k
print(k, 0 < n2 < 2**1024, n2)
diff --git a/about/index.html b/about/index.html index cf0b8ad..461da57 100644 --- a/about/index.html +++ b/about/index.html @@ -24,7 +24,7 @@ - + diff --git a/index.html b/index.html index 3fa4752..c388a79 100644 --- a/index.html +++ b/index.html @@ -295,7 +295,7 @@

@@ -670,6 +670,10 @@

#反爬 + #逆向 + + #爬虫 + diff --git a/local-search.xml b/local-search.xml index ae40a4e..1eb15c6 100644 --- a/local-search.xml +++ b/local-search.xml @@ -8,7 +8,7 @@ /2024/09/06/htb-rsaiseasy/ -

原题地址:HackTheBox - RSAisEasy

之前做过这个题,是与另一位朋友一起分析的,但是当时没有写 writeup,于是再梳理一遍。

从标题可以看出,这道题与 RSA 有点相关,因此会用到一部分基于 RSA 公式的数学分析。(说实话,在拉着咱朋友一起来分析数学部分之前,是有那么一点不敢做这题的……)

0. 题目内容

题目提供了一个 zip 文件,解压后有两个文件

1
2
3
4
5
6
# output.txt

n1: 101302608234750530215072272904674037076286246679691423280860345380727387460347553585319149306846617895151397345134725469568034944362725840889803514170441153452816738520513986621545456486260186057658467757935510362350710672577390455772286945685838373154626020209228183673388592030449624410459900543470481715269
c1: 92506893588979548794790672542461288412902813248116064711808481112865246689691740816363092933206841082369015763989265012104504500670878633324061404374817814507356553697459987468562146726510492528932139036063681327547916073034377647100888763559498314765496171327071015998871821569774481702484239056959316014064
c2: 46096854429474193473315622000700040188659289972305530955007054362815555622172000229584906225161285873027049199121215251038480738839915061587734141659589689176363962259066462128434796823277974789556411556028716349578708536050061871052948425521408788256153194537438422533790942307426802114531079426322801866673
(n1 * E) + n2: 601613204734044874510382122719388369424704454445440856955212747733856646787417730534645761871794607755794569926160226856377491672497901427125762773794612714954548970049734347216746397532291215057264241745928752782099454036635249993278807842576939476615587990343335792606509594080976599605315657632227121700808996847129758656266941422227113386647519604149159248887809688029519252391934671647670787874483702292498358573950359909165677642135389614863992438265717898239252246163
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
# RSAisEasy.py

#!/usr/bin/env python3
from Crypto.Util.number import bytes_to_long, getPrime
from secrets import flag1, flag2
from os import urandom

flag1 = bytes_to_long(flag1)
flag2 = bytes_to_long(flag2)

p, q, z = [getPrime(512) for i in range(3)]

e = 0x10001

n1 = p * q
n2 = q * z

c1 = pow(flag1, e, n1)
c2 = pow(flag2, e, n2)

E = bytes_to_long(urandom(69))

print(f'n1: {n1}')
print(f'c1: {c1}')
print(f'c2: {c2}')
print(f'(n1 * E) + n2: {n1 * E + n2}')

1. 眼盯侦!

首先观察提供的代码,注意到 flag1flag2 两个变量,那我们接下来的目标就是还原这两个变量了。

接下来生成了 3 个质数,分别是 p, q, ze 使用的是老熟人 0x10001

然后使用 p, q, z 计算了 n1, n2。使用 n1, n2 分别加密了 flag1, flag2,得到 c1, c2

最后生成了一个随机数 E,并输出了 n1, c1, c2, (n1 * E) + n2

2. RSA 公式

这部分就来自 RSA加密算法 - 维基百科,自由的百科全书 了,当时咱也是从 Wiki 上现学的。注意这里省略了一些过程。

加密算法

$$
c = n^e \pmod N
$$

解密算法

$$
n = c^d \pmod N
$$

密钥相关的公式

$$
N = pq,
$$

$$
r = (p-1)(q-1)
$$

$$
ed \equiv 1 \pmod r
$$

从公式可以看出,要解密 c1c2,需要知道 d1, d2,而 d1, d2 是由 e, r1, r2 计算逆元得到的。e 是已知的,现在要求的就是 r1, r2 了。

3. r?

观察代码,发现

$$
n1 = pq, n2 = qz
$$

由 $p, q, z \in \mathbb{P}$ 得

$$
q = \gcd(n1, n2)
$$

$$
p = \frac{n1}{q}, z = \frac{n2}{q}
$$

这样,拿到 p, q, z 后,就可以计算出 r1, r2 了。

4. d!

有了 r1, r2 后,就可以计算出 d1, d2 了。逆元有几种求法,这里我们选择 扩展欧几里得算法

1
2
3
4
5
6
7
8
9
10
# 输入 a=e, b=r, 输出 x=d
def exgcd(a, b):
if b == 0:
x = 1
y = 0
return x, y
x1, y1 = exgcd(b, a % b)
x = y1
y = x1 - (a // b) * y1
return x, y

5. n2

上面的过程需要一个值 n2,而 n2 不是题目直接给出的,我们需要想办法找出来。

注意到题目提供了 E(n1 * E) + n2,我们可以通过这个值来找到 n2

为方便展示过程,我们将 (n1 * E) + n2 记为 nE

$$
n2 \equiv nE \pmod {n1}
$$

$$
n2 = nE\ %\ n1 + n1 \cdot k
$$

其中 k 是未知的,你可以直接猜测 k = 0n2 = nE % n1,但我还是想证明它。

注意到 n2 是两个 getPrime(512) 相乘,因此 0 < k < 2^1024。接下来用代码测试 k 可以的取值。

1
2
3
4
5
6
n1 = 101302608234750530215072272904674037076286246679691423280860345380727387460347553585319149306846617895151397345134725469568034944362725840889803514170441153452816738520513986621545456486260186057658467757935510362350710672577390455772286945685838373154626020209228183673388592030449624410459900543470481715269
ne = 601613204734044874510382122719388369424704454445440856955212747733856646787417730534645761871794607755794569926160226856377491672497901427125762773794612714954548970049734347216746397532291215057264241745928752782099454036635249993278807842576939476615587990343335792606509594080976599605315657632227121700808996847129758656266941422227113386647519604149159248887809688029519252391934671647670787874483702292498358573950359909165677642135389614863992438265717898239252246163

for k in (-1, 0, 1):
n2 = ne % n1 + n1 * k
print(k, 0 < n2 < 2**1024, n2)

得到运行结果:

1
2
3
-1 False -1165705193327509223646449377936290710713049039655470307166720571005763031384300382036555332312895310759950336222328427276047951088897538178479073322538390413188948373749356597618939249379728523681999077958826657180398342840434533058980374881243302617523598758343538175613136045714345227586034384136094220432
0 True 100136903041423020991425823526737746365573197640035952973693624809721624428963253203282593974533722584391447008912397042291986993273828302711324440847902763039627790146764630023926517236880457533976468679976683705170312329736955922713306570804595070537102421450884645497775455984735279182873866159334387494837
1 False 201439511276173551206498096431411783441859444319727376254553970190449011889310806788601743281380340479542844354047122511860021937636554143601127955018343916492444528667278616645471973723140643591634936437912194067521023002314346378485593516490433443691728441660112829171164048015184903593333766702804869210106

因此 k = 0n2 = nE % n1

6. 结束了?

按照上述流程编写代码:

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
from math import gcd

e = 0x10001
n1 = 101302608234750530215072272904674037076286246679691423280860345380727387460347553585319149306846617895151397345134725469568034944362725840889803514170441153452816738520513986621545456486260186057658467757935510362350710672577390455772286945685838373154626020209228183673388592030449624410459900543470481715269
ne = 601613204734044874510382122719388369424704454445440856955212747733856646787417730534645761871794607755794569926160226856377491672497901427125762773794612714954548970049734347216746397532291215057264241745928752782099454036635249993278807842576939476615587990343335792606509594080976599605315657632227121700808996847129758656266941422227113386647519604149159248887809688029519252391934671647670787874483702292498358573950359909165677642135389614863992438265717898239252246163
c1 = 92506893588979548794790672542461288412902813248116064711808481112865246689691740816363092933206841082369015763989265012104504500670878633324061404374817814507356553697459987468562146726510492528932139036063681327547916073034377647100888763559498314765496171327071015998871821569774481702484239056959316014064
c2 = 46096854429474193473315622000700040188659289972305530955007054362815555622172000229584906225161285873027049199121215251038480738839915061587734141659589689176363962259066462128434796823277974789556411556028716349578708536050061871052948425521408788256153194537438422533790942307426802114531079426322801866673

n2 = ne % n1 # 用前面的推导计算 n2

q = gcd(n1, n2) # 计算 p, q, z
p, z = n1 // q, n2 // q

r1, r2 = (p - 1) * (q - 1), (q - 1) * (z - 1) # 计算 r1, r2

def exgcd(a, b): # 用来求逆元的扩展欧几里得算法
if b == 0:
x = 1
y = 0
return x, y
x1, y1 = exgcd(b, a % b)
x = y1
y = x1 - (a // b) * y1
return x, y

d1, d2 = exgcd(e, r1)[0], exgcd(e, r2)[0]
d1, d2 = d1 % r1, d2 % r2 # exgcd 算出来可能是负数,所以再 mod 一次

flag1, flag2 = pow(c1, d1, n1), pow(c2, d2, n2)

# 一个比较拙劣但是能跑的 int to bytes
flag_hex = hex(flag1)[2:] + hex(flag2)[2:]
flag = bytes.fromhex(flag_hex).decode()
print(flag)

运行上述代码,得到 flag:

1
HTB{1_m1ght_h4v3_m3ss3d_uP_jU$t_4_l1ttle_b1t?}

参考资料

  1. RSA加密算法 - 维基百科,自由的百科全书
  2. 乘法逆元 - OI Wiki
]]>
+

原题地址:HackTheBox - RSAisEasy

之前做过这个题,是与另一位朋友一起分析的,但是当时没有写 writeup,于是再梳理一遍。

从标题可以看出,这道题与 RSA 有点相关,因此会用到一部分基于 RSA 公式的数学分析。(说实话,在拉着咱朋友一起来分析数学部分之前,是有那么一点不敢做这题的……)

0. 题目内容

题目提供了一个 zip 文件,解压后有两个文件

1
2
3
4
5
6
# output.txt

n1: 101302608234750530215072272904674037076286246679691423280860345380727387460347553585319149306846617895151397345134725469568034944362725840889803514170441153452816738520513986621545456486260186057658467757935510362350710672577390455772286945685838373154626020209228183673388592030449624410459900543470481715269
c1: 92506893588979548794790672542461288412902813248116064711808481112865246689691740816363092933206841082369015763989265012104504500670878633324061404374817814507356553697459987468562146726510492528932139036063681327547916073034377647100888763559498314765496171327071015998871821569774481702484239056959316014064
c2: 46096854429474193473315622000700040188659289972305530955007054362815555622172000229584906225161285873027049199121215251038480738839915061587734141659589689176363962259066462128434796823277974789556411556028716349578708536050061871052948425521408788256153194537438422533790942307426802114531079426322801866673
(n1 * E) + n2: 601613204734044874510382122719388369424704454445440856955212747733856646787417730534645761871794607755794569926160226856377491672497901427125762773794612714954548970049734347216746397532291215057264241745928752782099454036635249993278807842576939476615587990343335792606509594080976599605315657632227121700808996847129758656266941422227113386647519604149159248887809688029519252391934671647670787874483702292498358573950359909165677642135389614863992438265717898239252246163
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
# RSAisEasy.py

#!/usr/bin/env python3
from Crypto.Util.number import bytes_to_long, getPrime
from secrets import flag1, flag2
from os import urandom

flag1 = bytes_to_long(flag1)
flag2 = bytes_to_long(flag2)

p, q, z = [getPrime(512) for i in range(3)]

e = 0x10001

n1 = p * q
n2 = q * z

c1 = pow(flag1, e, n1)
c2 = pow(flag2, e, n2)

E = bytes_to_long(urandom(69))

print(f'n1: {n1}')
print(f'c1: {c1}')
print(f'c2: {c2}')
print(f'(n1 * E) + n2: {n1 * E + n2}')

1. 眼盯侦!

首先观察提供的代码,注意到 flag1flag2 两个变量,那我们接下来的目标就是还原这两个变量了。

接下来生成了 3 个质数,分别是 p, q, ze 使用的是老熟人 0x10001

然后使用 p, q, z 计算了 n1, n2。使用 n1, n2 分别加密了 flag1, flag2,得到 c1, c2

最后生成了一个随机数 E,并输出了 n1, c1, c2, (n1 * E) + n2

2. RSA 公式

这部分就来自 RSA加密算法 - 维基百科,自由的百科全书 了,当时咱也是从 Wiki 上现学的。注意这里省略了一些过程。

加密算法

$$
c = n^e \pmod N
$$

解密算法

$$
n = c^d \pmod N
$$

密钥相关的公式

$$
N = pq,
$$

$$
r = (p-1)(q-1)
$$

$$
ed \equiv 1 \pmod r
$$

从公式可以看出,要解密 c1c2,需要知道 d1, d2,而 d1, d2 是由 e, r1, r2 计算逆元得到的。e 是已知的,现在要求的就是 r1, r2 了。

3. r?

观察代码,发现

$$
n1 = pq, n2 = qz
$$

由 $p, q, z \in \mathbb{P}$ 得

$$
q = \gcd(n1, n2)
$$

$$
p = \frac{n1}{q}, z = \frac{n2}{q}
$$

这样,拿到 p, q, z 后,就可以计算出 r1, r2 了。

4. d!

有了 r1, r2 后,就可以计算出 d1, d2 了。逆元有几种求法,这里我们选择 扩展欧几里得算法

1
2
3
4
5
6
7
8
9
10
# 输入 a=e, b=r, 输出 x=d
def exgcd(a, b):
if b == 0:
x = 1
y = 0
return x, y
x1, y1 = exgcd(b, a % b)
x = y1
y = x1 - (a // b) * y1
return x, y

5. n2

上面的过程需要一个值 n2,而 n2 不是题目直接给出的,我们需要想办法找出来。

注意到题目提供了 E(n1 * E) + n2,我们可以通过这个值来找到 n2

为方便展示过程,我们将 (n1 * E) + n2 记为 nE

$$
n2 \equiv nE \pmod {n1}
$$

$$
\def\mod{\text{ mod }}
n2 = nE \mod n1 + n1 \cdot k
$$

其中 k 是未知的,你可以直接猜测 k = 0n2 = nE % n1,但我还是想证明它。

注意到 n2 是两个 getPrime(512) 相乘,因此 0 < k < 2^1024。接下来用代码测试 k 可以的取值。

1
2
3
4
5
6
n1 = 101302608234750530215072272904674037076286246679691423280860345380727387460347553585319149306846617895151397345134725469568034944362725840889803514170441153452816738520513986621545456486260186057658467757935510362350710672577390455772286945685838373154626020209228183673388592030449624410459900543470481715269
ne = 601613204734044874510382122719388369424704454445440856955212747733856646787417730534645761871794607755794569926160226856377491672497901427125762773794612714954548970049734347216746397532291215057264241745928752782099454036635249993278807842576939476615587990343335792606509594080976599605315657632227121700808996847129758656266941422227113386647519604149159248887809688029519252391934671647670787874483702292498358573950359909165677642135389614863992438265717898239252246163

for k in (-1, 0, 1):
n2 = ne % n1 + n1 * k
print(k, 0 < n2 < 2**1024, n2)

得到运行结果:

1
2
3
-1 False -1165705193327509223646449377936290710713049039655470307166720571005763031384300382036555332312895310759950336222328427276047951088897538178479073322538390413188948373749356597618939249379728523681999077958826657180398342840434533058980374881243302617523598758343538175613136045714345227586034384136094220432
0 True 100136903041423020991425823526737746365573197640035952973693624809721624428963253203282593974533722584391447008912397042291986993273828302711324440847902763039627790146764630023926517236880457533976468679976683705170312329736955922713306570804595070537102421450884645497775455984735279182873866159334387494837
1 False 201439511276173551206498096431411783441859444319727376254553970190449011889310806788601743281380340479542844354047122511860021937636554143601127955018343916492444528667278616645471973723140643591634936437912194067521023002314346378485593516490433443691728441660112829171164048015184903593333766702804869210106

因此 k = 0n2 = nE % n1

6. 结束了?

按照上述流程编写代码:

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
from math import gcd

e = 0x10001
n1 = 101302608234750530215072272904674037076286246679691423280860345380727387460347553585319149306846617895151397345134725469568034944362725840889803514170441153452816738520513986621545456486260186057658467757935510362350710672577390455772286945685838373154626020209228183673388592030449624410459900543470481715269
ne = 601613204734044874510382122719388369424704454445440856955212747733856646787417730534645761871794607755794569926160226856377491672497901427125762773794612714954548970049734347216746397532291215057264241745928752782099454036635249993278807842576939476615587990343335792606509594080976599605315657632227121700808996847129758656266941422227113386647519604149159248887809688029519252391934671647670787874483702292498358573950359909165677642135389614863992438265717898239252246163
c1 = 92506893588979548794790672542461288412902813248116064711808481112865246689691740816363092933206841082369015763989265012104504500670878633324061404374817814507356553697459987468562146726510492528932139036063681327547916073034377647100888763559498314765496171327071015998871821569774481702484239056959316014064
c2 = 46096854429474193473315622000700040188659289972305530955007054362815555622172000229584906225161285873027049199121215251038480738839915061587734141659589689176363962259066462128434796823277974789556411556028716349578708536050061871052948425521408788256153194537438422533790942307426802114531079426322801866673

n2 = ne % n1 # 用前面的推导计算 n2

q = gcd(n1, n2) # 计算 p, q, z
p, z = n1 // q, n2 // q

r1, r2 = (p - 1) * (q - 1), (q - 1) * (z - 1) # 计算 r1, r2

def exgcd(a, b): # 用来求逆元的扩展欧几里得算法
if b == 0:
x = 1
y = 0
return x, y
x1, y1 = exgcd(b, a % b)
x = y1
y = x1 - (a // b) * y1
return x, y

d1, d2 = exgcd(e, r1)[0], exgcd(e, r2)[0]
d1, d2 = d1 % r1, d2 % r2 # exgcd 算出来可能是负数,所以再 mod 一次

flag1, flag2 = pow(c1, d1, n1), pow(c2, d2, n2)

# 一个比较拙劣但是能跑的 int to bytes
flag_hex = hex(flag1)[2:] + hex(flag2)[2:]
flag = bytes.fromhex(flag_hex).decode()
print(flag)

运行上述代码,得到 flag:

1
HTB{1_m1ght_h4v3_m3ss3d_uP_jU$t_4_l1ttle_b1t?}

参考资料

  1. RSA加密算法 - 维基百科,自由的百科全书
  2. 乘法逆元 - OI Wiki
]]>
@@ -204,6 +204,10 @@ 反爬 + 逆向 + + 爬虫 + diff --git a/sitemap.xml b/sitemap.xml index 15d731b..0d210b0 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -242,6 +242,20 @@ 0.2 + + https://blog.cxzlw.top/tags/%E9%80%86%E5%90%91/ + 2024-09-06 + weekly + 0.2 + + + + https://blog.cxzlw.top/tags/%E7%88%AC%E8%99%AB/ + 2024-09-06 + weekly + 0.2 + + diff --git a/sw.js b/sw.js index 9892f52..bb44e1a 100644 --- a/sw.js +++ b/sw.js @@ -19,7 +19,7 @@ registerRoute(/^https:\/\/blog\.cxzlw\.top\/.*/, networkFirst, "GET"); registerRoute(/^http:\/\/localhost:8000\/.*\.html/, networkFirst, "GET"); // registerRoute(/^http:\/\/localhost:8000\/.*/, staleWhileRevalidate, "GET"); -const urls = [{"revision":"0def668c2a5b019e859b132d237a472a","url":"2023/07/05/trace-of-line-01/index.html"},{"revision":"6d1733fd944c2f7a6be0db61f7955b17","url":"2023/07/05/zhihu-aac-old/index.html"},{"revision":"ee8da212055a16f05d2519082c4a08e5","url":"2023/07/06/zerotier-planet-convert/index.html"},{"revision":"97154cc0f33274a465e4b0bb365ea705","url":"2023/07/10/trace-of-line-02/index.html"},{"revision":"c91d56d82087c4a6aef1e4e17e396210","url":"2023/08/04/permission-system-design-share/index.html"},{"revision":"363340f312319506dc1f783bdbd82098","url":"2023/08/31/cell-structure/index.html"},{"revision":"b777d84e361e3c7d85abe8e4bc1c63cf","url":"2023/10/03/busuanzi-bug/index.html"},{"revision":"1bb9c5f90cdc5ccf1b33869b4f6f9901","url":"2024/07/11/json-format/index.html"},{"revision":"3bef7d450e09d11dcdb0ceb6d4ec2063","url":"2024/09/06/htb-rsaiseasy/index.html"},{"revision":"c04fb28bcf3a9c3fa0c3ca43d5712cd3","url":"404.html"},{"revision":"688916ea0ad666d9f6b8e45a727e6c4a","url":"about/index.html"},{"revision":"fdeca4f18d7dc91e9c406ef64ebbd55a","url":"archives/2023/07/index.html"},{"revision":"1df1602d28f262b39702e58ad1bbdb09","url":"archives/2023/08/index.html"},{"revision":"fa2a0da138ef6b7b250c88f5d5a1d6f1","url":"archives/2023/10/index.html"},{"revision":"6b9a4fcff49b8440d0d222a66eb189fb","url":"archives/2023/index.html"},{"revision":"89b67c9b3dceb5a858987883b0ad13c8","url":"archives/2024/07/index.html"},{"revision":"0c275ae94653765df2ad63d1a3a56bc6","url":"archives/2024/09/index.html"},{"revision":"f185edb618447e2673d386deda18a3f3","url":"archives/2024/index.html"},{"revision":"a0f193e71b95f71901ac9b810f3dcb48","url":"archives/index.html"},{"revision":"242837d47be8b7c244eb3b8bfc38e027","url":"baidu_verify_codeva-0rhRRODu4H.html"},{"revision":"62b328640af6af42478c54f90e3b245b","url":"BingSiteAuth.xml"},{"revision":"91199898bce22b6d2f0bdea89bd90508","url":"categories/index.html"},{"revision":"5ce280d86637a41c57fdc51fd463237a","url":"css/gitalk.css"},{"revision":"09eec97898295432630da6fed8bd7e92","url":"css/highlight-dark.css"},{"revision":"98895d055f94314f613630dda0deacf4","url":"css/highlight.css"},{"revision":"01eef916fb668ecc9b8a92eb148f97dd","url":"css/main.css"},{"revision":"71cb12d00310a7852b853744c41d9a34","url":"favicon.ico"},{"revision":"ea11c930cb20962f72c29f0e2931bfbd","url":"img/animal.jpg"},{"revision":"2d9aa61e592b26e2745f3c161c48c397","url":"img/avatar.png"},{"revision":"beb05a6b5b201044b6d80cacdf29f905","url":"img/default.png"},{"revision":"5603316bb5bc54a9d5cab14fddd4c510","url":"img/fluid.png"},{"revision":"4d772ced566ade339ca6718c7ed38674","url":"img/image-1.png"},{"revision":"dcfafd0cc238b0a63a733edd1a70bcfe","url":"img/image-2.png"},{"revision":"5ba9885de31a8d1e8df04a1d915b1069","url":"img/image-3.png"},{"revision":"3d2983fa8549bb6a93b7b905a6baea9c","url":"img/image-4.png"},{"revision":"55692e23130e9504505085798384e43e","url":"img/image-5.png"},{"revision":"88c5e4fa4dec4b514a5d0d53b72d75c7","url":"img/image-6.png"},{"revision":"e52801ec8fe9abad24f24c8d96402fb3","url":"img/image-7.png"},{"revision":"3f940453e65f4635917f162b9a1d1432","url":"img/image-8.png"},{"revision":"47c43a3db8dca516e147f6f38324c1eb","url":"img/image-9.png"},{"revision":"18a13cfe951c406bbb4da3a7e7bc8ca2","url":"img/image.png"},{"revision":"a88a6883f6f27cd7b95a3ae753f91a40","url":"img/img-20231004-chrome-busuanzi.png"},{"revision":"f6f63a28b80c91ec49153f37df82f42d","url":"img/img-20231004-safari-busuanzi.png"},{"revision":"15657539044e11a19a1c6c7e3073d1b3","url":"img/loading.gif"},{"revision":"1b164cde9b70a49e2f3831d211be9f66","url":"img/plant.jpg"},{"revision":"b769e8dfde5660239317ed60758dba13","url":"img/police_beian.png"},{"revision":"74669a1c8e0c10b60ff13c2430adae44","url":"img/prokaryotic.jpg"},{"revision":"58bf26b331c6ef9d18825ae3344e4db4","url":"index.html"},{"revision":"7683fab2fc9d03a3a659aa956b3a54e8","url":"js/boot.js"},{"revision":"605f587be2ab3d36472bb03ac27ede65","url":"js/color-schema.js"},{"revision":"7fa076a71a5559d89af6b0c6dfd3a0d2","url":"js/events.js"},{"revision":"a62feede0189fe66290e8959528b674f","url":"js/image-ng.js"},{"revision":"fab30a410e5f490fce3f977a6936a714","url":"js/img-lazyload.js"},{"revision":"fb4a815ccdb5d851d00561dbb62251c4","url":"js/leancloud.js"},{"revision":"9dc47a0b7b6bacfd16541c9b2b5b6bc5","url":"js/local-search.js"},{"revision":"6c10bee3f659ca91b534bf4a81d62f1e","url":"js/plugins.js"},{"revision":"bc2f15d100bdd8e7ecbaf2ca670a714f","url":"js/progressbar-done.js"},{"revision":"8a36a7c42b0d15eb06cbdef6c03dd803","url":"js/statistics.js"},{"revision":"f7ce9014de1cd7358eeb3aba81c8efe2","url":"js/utils.js"},{"revision":"dc783a52c0b7b21b873bdebcf1c6bd98","url":"links/index.html"},{"revision":"d1d29633d1c735f4771f278fe7fc5e24","url":"local-search.xml"},{"revision":"1ba114daa729e8da8f1460d374dc4c78","url":"sitemap.xml"},{"revision":"7c78b234bd0d49ac13d73eb3c1adf739","url":"tags/busuanzi/index.html"},{"revision":"6aab53cf69480278e03acf895ae0040b","url":"tags/Crypto/index.html"},{"revision":"199f59e798aee70674abd61c077eab59","url":"tags/CTF/index.html"},{"revision":"c75581042a7839fb2f3b3721071e8c3a","url":"tags/cxzlw/index.html"},{"revision":"ef0a980cbbcea2dcdeb120cb6417e275","url":"tags/Fluid/index.html"},{"revision":"743cb1ed58743266cbabece88643645c","url":"tags/HackTheBox/index.html"},{"revision":"2710be82ff0db753c665c8e73a2980f1","url":"tags/Hexo/index.html"},{"revision":"3604e7c2183d020fec85e7f453c2af53","url":"tags/index.html"},{"revision":"e7cc57f0ab01b82ec999c06d68000f41","url":"tags/Python/index.html"},{"revision":"ece35154420925abf773a73166c08340","url":"tags/Writeup/index.html"},{"revision":"67ae1ba5aa103324caa87d06be6b298b","url":"tags/Zerotier/index.html"},{"revision":"5df40b93c96559d537a275cf2e5c9e19","url":"tags/不蒜子/index.html"},{"revision":"b3c8efda7217f3a06b1f3015ee79954b","url":"tags/反爬/index.html"},{"revision":"52c12becb4077b64f7ebc2de032129b6","url":"tags/小说/index.html"},{"revision":"35231ec4d8d1db4b80aa4447d5b65204","url":"tags/权限系统/index.html"},{"revision":"a1f21150cebc0a12e1676b94567c11dd","url":"tags/知乎/index.html"},{"revision":"20cb6779f5acf9871d650fb63a3821f8","url":"tags/离谱网文/index.html"},{"revision":"5e10604d92e160656a6826165af99991","url":"tags/自建-Planet/index.html"},{"revision":"a60d66866f77a56c4bfe972d65408e86","url":"tags/路过的某个学渣/index.html"},{"revision":"b3072a243dac6acf09143f333e1f6873","url":"tags/飞石/index.html"},{"revision":"decd4b8f6af7e1c9d8ae97249ac786fa","url":"xml/local-search.xml"}].map(element => element["url"]); +const urls = [{"revision":"7e8ca7172e611beee7ff21804c7eb046","url":"2023/07/05/trace-of-line-01/index.html"},{"revision":"076fb289a98aaeadccf9823af1734269","url":"2023/07/05/zhihu-aac-old/index.html"},{"revision":"e2d161f9b1e92126ad0e23f70c2a5914","url":"2023/07/06/zerotier-planet-convert/index.html"},{"revision":"b2105fbc70e4d7b227322463ee6c91f3","url":"2023/07/10/trace-of-line-02/index.html"},{"revision":"c2c29e8cacb0ec61ed6ace27858cb396","url":"2023/08/04/permission-system-design-share/index.html"},{"revision":"2b2d416e0684156badda8275c6f8bb34","url":"2023/08/31/cell-structure/index.html"},{"revision":"87b5240ecac294c9e401d813edebf708","url":"2023/10/03/busuanzi-bug/index.html"},{"revision":"040271fdc85f36539d152835cc278f6d","url":"2024/07/11/json-format/index.html"},{"revision":"69152dc0ca7b1c9151f77c74eb851888","url":"2024/09/06/htb-rsaiseasy/index.html"},{"revision":"c04fb28bcf3a9c3fa0c3ca43d5712cd3","url":"404.html"},{"revision":"716a7a6916ce8a081e802f3fa51d56bd","url":"about/index.html"},{"revision":"fdeca4f18d7dc91e9c406ef64ebbd55a","url":"archives/2023/07/index.html"},{"revision":"1df1602d28f262b39702e58ad1bbdb09","url":"archives/2023/08/index.html"},{"revision":"fa2a0da138ef6b7b250c88f5d5a1d6f1","url":"archives/2023/10/index.html"},{"revision":"6b9a4fcff49b8440d0d222a66eb189fb","url":"archives/2023/index.html"},{"revision":"89b67c9b3dceb5a858987883b0ad13c8","url":"archives/2024/07/index.html"},{"revision":"0c275ae94653765df2ad63d1a3a56bc6","url":"archives/2024/09/index.html"},{"revision":"f185edb618447e2673d386deda18a3f3","url":"archives/2024/index.html"},{"revision":"a0f193e71b95f71901ac9b810f3dcb48","url":"archives/index.html"},{"revision":"242837d47be8b7c244eb3b8bfc38e027","url":"baidu_verify_codeva-0rhRRODu4H.html"},{"revision":"62b328640af6af42478c54f90e3b245b","url":"BingSiteAuth.xml"},{"revision":"91199898bce22b6d2f0bdea89bd90508","url":"categories/index.html"},{"revision":"5ce280d86637a41c57fdc51fd463237a","url":"css/gitalk.css"},{"revision":"09eec97898295432630da6fed8bd7e92","url":"css/highlight-dark.css"},{"revision":"98895d055f94314f613630dda0deacf4","url":"css/highlight.css"},{"revision":"01eef916fb668ecc9b8a92eb148f97dd","url":"css/main.css"},{"revision":"71cb12d00310a7852b853744c41d9a34","url":"favicon.ico"},{"revision":"ea11c930cb20962f72c29f0e2931bfbd","url":"img/animal.jpg"},{"revision":"2d9aa61e592b26e2745f3c161c48c397","url":"img/avatar.png"},{"revision":"beb05a6b5b201044b6d80cacdf29f905","url":"img/default.png"},{"revision":"5603316bb5bc54a9d5cab14fddd4c510","url":"img/fluid.png"},{"revision":"4d772ced566ade339ca6718c7ed38674","url":"img/image-1.png"},{"revision":"dcfafd0cc238b0a63a733edd1a70bcfe","url":"img/image-2.png"},{"revision":"5ba9885de31a8d1e8df04a1d915b1069","url":"img/image-3.png"},{"revision":"3d2983fa8549bb6a93b7b905a6baea9c","url":"img/image-4.png"},{"revision":"55692e23130e9504505085798384e43e","url":"img/image-5.png"},{"revision":"88c5e4fa4dec4b514a5d0d53b72d75c7","url":"img/image-6.png"},{"revision":"e52801ec8fe9abad24f24c8d96402fb3","url":"img/image-7.png"},{"revision":"3f940453e65f4635917f162b9a1d1432","url":"img/image-8.png"},{"revision":"47c43a3db8dca516e147f6f38324c1eb","url":"img/image-9.png"},{"revision":"18a13cfe951c406bbb4da3a7e7bc8ca2","url":"img/image.png"},{"revision":"a88a6883f6f27cd7b95a3ae753f91a40","url":"img/img-20231004-chrome-busuanzi.png"},{"revision":"f6f63a28b80c91ec49153f37df82f42d","url":"img/img-20231004-safari-busuanzi.png"},{"revision":"15657539044e11a19a1c6c7e3073d1b3","url":"img/loading.gif"},{"revision":"1b164cde9b70a49e2f3831d211be9f66","url":"img/plant.jpg"},{"revision":"b769e8dfde5660239317ed60758dba13","url":"img/police_beian.png"},{"revision":"74669a1c8e0c10b60ff13c2430adae44","url":"img/prokaryotic.jpg"},{"revision":"6270ed889b7ac0e1b2510a3ab24af33d","url":"index.html"},{"revision":"7683fab2fc9d03a3a659aa956b3a54e8","url":"js/boot.js"},{"revision":"605f587be2ab3d36472bb03ac27ede65","url":"js/color-schema.js"},{"revision":"7fa076a71a5559d89af6b0c6dfd3a0d2","url":"js/events.js"},{"revision":"a62feede0189fe66290e8959528b674f","url":"js/image-ng.js"},{"revision":"fab30a410e5f490fce3f977a6936a714","url":"js/img-lazyload.js"},{"revision":"fb4a815ccdb5d851d00561dbb62251c4","url":"js/leancloud.js"},{"revision":"9dc47a0b7b6bacfd16541c9b2b5b6bc5","url":"js/local-search.js"},{"revision":"6c10bee3f659ca91b534bf4a81d62f1e","url":"js/plugins.js"},{"revision":"bc2f15d100bdd8e7ecbaf2ca670a714f","url":"js/progressbar-done.js"},{"revision":"8a36a7c42b0d15eb06cbdef6c03dd803","url":"js/statistics.js"},{"revision":"f7ce9014de1cd7358eeb3aba81c8efe2","url":"js/utils.js"},{"revision":"dc783a52c0b7b21b873bdebcf1c6bd98","url":"links/index.html"},{"revision":"d140d8969761a51a4a0acc3831a866a6","url":"local-search.xml"},{"revision":"5a83f949f4a5057e98d795f8c97cba18","url":"sitemap.xml"},{"revision":"7c78b234bd0d49ac13d73eb3c1adf739","url":"tags/busuanzi/index.html"},{"revision":"6aab53cf69480278e03acf895ae0040b","url":"tags/Crypto/index.html"},{"revision":"199f59e798aee70674abd61c077eab59","url":"tags/CTF/index.html"},{"revision":"c75581042a7839fb2f3b3721071e8c3a","url":"tags/cxzlw/index.html"},{"revision":"ef0a980cbbcea2dcdeb120cb6417e275","url":"tags/Fluid/index.html"},{"revision":"743cb1ed58743266cbabece88643645c","url":"tags/HackTheBox/index.html"},{"revision":"2710be82ff0db753c665c8e73a2980f1","url":"tags/Hexo/index.html"},{"revision":"ffabc87fc655738b2e25025a84be11bd","url":"tags/index.html"},{"revision":"e7cc57f0ab01b82ec999c06d68000f41","url":"tags/Python/index.html"},{"revision":"ece35154420925abf773a73166c08340","url":"tags/Writeup/index.html"},{"revision":"67ae1ba5aa103324caa87d06be6b298b","url":"tags/Zerotier/index.html"},{"revision":"5df40b93c96559d537a275cf2e5c9e19","url":"tags/不蒜子/index.html"},{"revision":"b3c8efda7217f3a06b1f3015ee79954b","url":"tags/反爬/index.html"},{"revision":"52c12becb4077b64f7ebc2de032129b6","url":"tags/小说/index.html"},{"revision":"35231ec4d8d1db4b80aa4447d5b65204","url":"tags/权限系统/index.html"},{"revision":"29a5345ca090bf6d578751dba3c1cc97","url":"tags/爬虫/index.html"},{"revision":"a1f21150cebc0a12e1676b94567c11dd","url":"tags/知乎/index.html"},{"revision":"20cb6779f5acf9871d650fb63a3821f8","url":"tags/离谱网文/index.html"},{"revision":"5e10604d92e160656a6826165af99991","url":"tags/自建-Planet/index.html"},{"revision":"a60d66866f77a56c4bfe972d65408e86","url":"tags/路过的某个学渣/index.html"},{"revision":"6f8b47b7bb9b73d6f022bec9c3c551f7","url":"tags/逆向/index.html"},{"revision":"b3072a243dac6acf09143f333e1f6873","url":"tags/飞石/index.html"},{"revision":"decd4b8f6af7e1c9d8ae97249ac786fa","url":"xml/local-search.xml"}].map(element => element["url"]); const index_urls = urls.filter(url => url.endsWith("index.html")).map(url => url.substring(0, url.length - 10)); warmStrategyCache({urls:urls, strategy:staleWhileRevalidate}); diff --git a/tags/index.html b/tags/index.html index 93f767c..8eae48b 100644 --- a/tags/index.html +++ b/tags/index.html @@ -273,7 +273,7 @@ diff --git "a/tags/\347\210\254\350\231\253/index.html" "b/tags/\347\210\254\350\231\253/index.html" new file mode 100644 index 0000000..90a4a24 --- /dev/null +++ "b/tags/\347\210\254\350\231\253/index.html" @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签 - 爬虫 - 创新者老王的博客 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + +
+ +
+ +
+ +
+
+ +
+
+
+ + +
+

共计 1 篇文章

+
+ + + + +

2023

+ + + +
聊聊知乎盐选反爬 (回答页篇)
+
+ +
+ + + + + +
+
+
+
+
+ + + + + + + + + + + + + + +
+ +
+ + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/tags/\351\200\206\345\220\221/index.html" "b/tags/\351\200\206\345\220\221/index.html" new file mode 100644 index 0000000..c099571 --- /dev/null +++ "b/tags/\351\200\206\345\220\221/index.html" @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签 - 逆向 - 创新者老王的博客 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + +
+ +
+ +
+ +
+
+ +
+
+
+ + +
+

共计 1 篇文章

+
+ + + + +

2023

+ + + +
聊聊知乎盐选反爬 (回答页篇)
+
+ +
+ + + + + +
+
+
+
+
+ + + + + + + + + + + + + + +
+ +
+ + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +