在nodeJS服务器中执行openssl脚本

问题描述

我想将路径传递给openssl脚本,然后获取此脚本的结果并显示它。 这是我的尝试:

    router.route("/Test").post((req,res) => {
  var formidable = require('formidable');
  var fs = require('fs');
  var form = new formidable.IncomingForm();
    form.parse(req,(err,fields,files) => {
      res.writeHead(200,{ 'content-type': 'application/json' });
      console.log(files[""]["path"])
    // I want to pass the path to this script : 

openssl dgst -binary -sha512 The_Path | openssl enc -base64

//Then i want to get the result of this script
      res.end(JSON.stringify({ fields,files },null,2));
    });

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)