Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
salt /
engines /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2022-10-11 05:09
__init__.py
3.62
KB
-rw-r--r--
2022-05-16 09:16
docker_events.py
2.84
KB
-rw-r--r--
2022-05-16 09:16
fluent.py
2.05
KB
-rw-r--r--
2022-05-16 09:16
http_logstash.py
2.84
KB
-rw-r--r--
2022-05-16 09:16
ircbot.py
10.22
KB
-rw-r--r--
2022-05-16 09:16
junos_syslog.py
13.18
KB
-rw-r--r--
2022-05-16 09:16
libvirt_events.py
21.28
KB
-rw-r--r--
2022-05-16 09:16
logentries.py
5.64
KB
-rw-r--r--
2022-05-16 09:16
logstash_engine.py
1.77
KB
-rw-r--r--
2022-05-16 09:16
napalm_syslog.py
11.59
KB
-rw-r--r--
2022-05-16 09:16
reactor.py
720
B
-rw-r--r--
2022-05-16 09:16
redis_sentinel.py
2.88
KB
-rw-r--r--
2022-05-16 09:16
script.py
3.33
KB
-rw-r--r--
2022-05-16 09:16
slack.py
35.79
KB
-rw-r--r--
2022-05-16 09:16
sqs_events.py
4.65
KB
-rw-r--r--
2022-05-16 09:16
stalekey.py
3.67
KB
-rw-r--r--
2022-05-16 09:16
test.py
932
B
-rw-r--r--
2022-05-16 09:16
thorium.py
314
B
-rw-r--r--
2022-05-16 09:16
webhook.py
2.78
KB
-rw-r--r--
2022-05-16 09:16
Save
Rename
""" Send events from webhook api """ import salt.ext.tornado.httpserver import salt.ext.tornado.ioloop import salt.ext.tornado.web import salt.utils.event def start(address=None, port=5000, ssl_crt=None, ssl_key=None): """ Api to listen for webhooks to send to the reactor. Implement the webhook behavior in an engine. :py:class:`rest_cherrypy Webhook docs <salt.netapi.rest_cherrypy.app.Webhook>` Unlike the rest_cherrypy Webhook, this is only an unauthenticated webhook endpoint. If an authenticated webhook endpoint is needed, use the salt-api webhook which runs on the master and authenticates through eauth. .. note: This is really meant to be used on the minion, because salt-api needs to be run on the master for use with eauth. .. warning:: Unauthenticated endpoint This engine sends webhook calls to the event stream. If the engine is running on a minion with `file_client: local` the event is sent to the minion event stream. Otherwise it is sent to the master event stream. Example Config .. code-block:: yaml engines: - webhook: {} .. code-block:: yaml engines: - webhook: port: 8000 address: 10.128.1.145 ssl_crt: /etc/pki/tls/certs/localhost.crt ssl_key: /etc/pki/tls/certs/localhost.key .. note: For making an unsigned key, use the following command `salt-call --local tls.create_self_signed_cert` """ if __opts__.get("__role") == "master": fire_master = salt.utils.event.get_master_event( __opts__, __opts__["sock_dir"] ).fire_event else: fire_master = None def fire(tag, msg): """ How to fire the event """ if fire_master: fire_master(msg, tag) else: __salt__["event.send"](tag, msg) class WebHook( salt.ext.tornado.web.RequestHandler ): # pylint: disable=abstract-method def post(self, tag): # pylint: disable=arguments-differ body = self.request.body headers = self.request.headers payload = { "headers": headers if isinstance(headers, dict) else dict(headers), "body": body, } fire("salt/engines/hook/" + tag, payload) application = salt.ext.tornado.web.Application([(r"/(.*)", WebHook)]) ssl_options = None if all([ssl_crt, ssl_key]): ssl_options = {"certfile": ssl_crt, "keyfile": ssl_key} io_loop = salt.ext.tornado.ioloop.IOLoop(make_current=False) io_loop.make_current() http_server = salt.ext.tornado.httpserver.HTTPServer( application, ssl_options=ssl_options ) http_server.listen(port, address=address) io_loop.start()