tcex.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:tcex 作者: ThreatConnect-Inc 项目源码 文件源码
def results_tc(self, key, value):
        """Write data to results_tc file in TcEX specified directory

        The TcEx platform support persistent values between executions of the App.  This
        method will store the values for TC to read and put into the Database.

        Args:
            key (string): The data key to be stored
            value (string): The data value to be stored
        """
        if os.access(self.default_args.tc_out_path, os.W_OK):
            result_file = '{}/results.tc'.format(self.default_args.tc_out_path)
        else:
            result_file = 'results.tc'

        results = '{} = {}\n'.format(key, value)
        with open(result_file, 'a') as rh:
            rh.write(results)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号