Skip to content

Commit

Permalink
修正细小错误
Browse files Browse the repository at this point in the history
  • Loading branch information
egoleecode committed Mar 18, 2022
1 parent 4517690 commit 2df17d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cli-Tools/one_click_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_cid(file_path,encrypt_mode,encrypt_key):
pass
os.makedirs("/mnt/vsahre_tmp/")
print("加密模式为:KeyWord,开始加密")
enc_cmd = """tar -czvf - %s | openssl enc -aes-256-cbc -salt -k %s -out /mnt/vsahre_tmp/encryped-files.tar.gz""" % (file_path,str(encrypt_key))
enc_cmd = """tar -czvf - %s | openssl enc -aes-256-cbc -salt -k %s -out /mnt/vsahre_tmp/encrypted-files.tar.gz""" % (file_path,str(encrypt_key))
subprocess.run(enc_cmd, shell=True)
ipfs_add_cmd = """ipfs add -r /mnt/vsahre_tmp/"""
ipfs_cli_output = str(subprocess.check_output(ipfs_add_cmd.split()), "utf-8")
Expand All @@ -96,7 +96,7 @@ def get_cid(file_path,encrypt_mode,encrypt_key):
print("加密模式为:公私钥,开始加密")
keygen_cmd = """openssl rand -base64 64 > /mnt/vsahre_tmp/file.rand"""
subprocess.run(keygen_cmd, shell=True)
enc_cmd = """tar -czvf - %s | openssl enc -aes-256-cbc -salt -k file:/mnt/vsahre_tmp/file.rand -out /mnt/vsahre_tmp/encryped-files.tar.gz""" % file_path
enc_cmd = """tar -czvf - %s | openssl enc -aes-256-cbc -salt -k file:/mnt/vsahre_tmp/file.rand -out /mnt/vsahre_tmp/encrypted-files.tar.gz""" % file_path
subprocess.run(enc_cmd, shell=True)
enc_rand = """openssl rsautl -encrypt -inkey %s -pubin -in /mnt/vsahre_tmp/file.rand -out /mnt/vsahre_tmp/file.rand.enc""" % encrypt_key
subprocess.run(enc_rand, shell=True)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ root@devmachine:~# vsharecloud-oneclick --<参数名称>=<参数>
- --gcmode,-gc
- 是否清理缓存,设定为`y`则清理 | 默认值为 `n` ,长时间不清理IPFS缓存可能会爆硬盘(滑稽
- --minerid,-mid
- MinerID,即目标储存节点的ID | 默认值为 `None`
- MinerID,即目标储存节点的ID,仅在模式为2的时候有效 | 默认值为 `None`
- --dealtimes,-n
- 订单发起数量,仅在模式为3的时候有效 | 默认值为 `3`
- --maxbudget
Expand Down Expand Up @@ -126,7 +126,7 @@ openssl rsautl -decrypt -inkey private.key -in file.rand.enc -out file.rand
```
- 使用解密后的随机数文件解密文件
```
openssl enc -d -aes-256-cbc -k file:file.rand -in encryped-files.tar.gz | tar xzvf -
openssl enc -d -aes-256-cbc -k file:file.rand -in encrypted-files.tar.gz | tar xzvf -
```
### 社区:
- 频道:https://t.me/vsharebetter
Expand Down

0 comments on commit 2df17d1

Please sign in to comment.