add gotify function

This commit is contained in:
1itt1eB0y 2021-05-03 15:57:44 +08:00 committed by GitHub
parent 0a60045c0c
commit 5371461aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -257,12 +257,12 @@ module Msf
end
def send_text_to_gotify(session)
# https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq/9e91d73c
# https://gotify.net/docs/more-pushmsg
uri_parser = URI.parse(gotify_address)
markdown_text =
"Platform : #{session.platform}\n\n" \
"Tunnel : #{session.tunnel_to_s}\n\n" \
"Arch : #{session.arch}\n\n" \
message_text =
"Platform : #{session.platform}\n" \
"Tunnel : #{session.tunnel_to_s}\n" \
"Arch : #{session.arch}\n" \
"Info : > #{session.info ? session.info.to_s : nil}"
json_post_data = JSON.pretty_generate({
title: "#{session.platform}主机#{session.type}会话上线!",