由于批量部署的便捷性,越来越多的客户使用这一种方式来部署话机。但是,在批量部署的过程中,配置文件不可避免的会在网络中进行传输。配置文件中有很多的敏感信息,例如:SIP帐号和密码,话机的密码,网络电话本的帐号信息等。
为了避免信息外泄,我们可以使用加密工具来对配置文件进行加密。这个文档主要介绍如下两部分:
A、如何对配置文件进行加密
A、如何对配置文件进行加密
B、如何在批量部署中使用加密的配置文件
1.2适用型号
本文档适用于Fanvill全系列话机。
如何对配置文件进行加密
2.1 在windows下对配置文件加密
我们可以使用DSC工具来对配置文件进行AES256的加密。该工具可以从 http://download.fanvil.com/tool/ES5%20tool/encryption.72中进行下载。下面通过一个例子来讲述如何进行配置文件加密。
1)Dsc工具下载完成后解压,并将文件夹放在F盘下,


2)然后打开key.txt,使用默认的或者自己重新输入随机的64位密钥,都可以。然后保存。
3)从话机的网页中下载配置文件,并且将相关的信息修改完成。文件名字为config.txt.将其放在F盘,encryption 目录下。


4)在运行中输入cmd进入Dos命令行。然后通过下图中的命令进入encryption目录


5)使用如下命令对文件进行加密或者解密
加密: dsc.exe key.txt e config.txt encrypted.txt
dsc.exe:工具名
key.txt:密钥文件
"e": 表示加密,
config.txt:配置文件名字
dsc.exe:工具名
key.txt:密钥文件
"e": 表示加密,
config.txt:配置文件名字
encrypted.txt:加密之后生成的文件,名字可以自定义。
解密:dsc.exe key.txt d encrypted.txt original.txt
dsc.exe:工具名
key.txt:密钥文件
dsc.exe:工具名
key.txt:密钥文件
"d":表示解密,
encrypted.txt:加密文件的名字
original.txt:解密之后生成的文件,名字可以自定义。

original.txt:解密之后生成的文件,名字可以自定义。

2.2在linux下对配置文件加密
1)下载以下链接
https://1drv.ms/u/slAhLxw VNOC9LgR6TIW5931ydvEPS
2)下载之后解压到linux下,然后进入到相关路径下执行编译命令获取dsc工具gcc dsc.crjndael-alg-st.c rijndael-api-fst.c-o dso


3) 执行之后 linux 会生成 dsc(如下图


4) 然后将要加密的文件或者解密的文件放到 dse 的路径下


5) 加 密 命 令 dsc a:\my.key e d:\x\data.zip data.enc ( 例 子 : dsc key.txt e config.txt encryption.enc)
dsc:工具
key.txt:密钥
e:加密
Config.txt:需要加密的文件
encryption.enc:加密之后的文件
6) 解 密 命 令 dsc my.key d data.enc c:\tmp\data.zip ( 例 子 : dsc key.txt d encryed.txt config_after.txt)
dsc:工具
key.txt:密钥
d:解密
encryed.txt:需要解密的文件
Config_after.txt:解密之后的文件