salt-scanner.py 文件源码

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

项目:salt-scanner 作者: 0x4D31 项目源码 文件源码
def slack_fileUpload(filename, file):
    global slack_api_token
    try:
        slack_api_token
    except NameError:
        slack_api_token = os.environ["SLACK_API_TOKEN"]
    sc = SlackClient(slack_api_token)
    response = sc.api_call(
        'files.upload',
        channels=slack_channel,
        filename=filename,
        file=open(file, 'rb'),
        title="Full scan results")
    if not response['ok']:
        print("Slack Error: {}".format(response['error']))
    else:
        print("+ Full report uploaded to Slack")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号