Linux ams-business-8.hostwindsdns.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
LiteSpeed
Server IP : 192.236.177.161 & Your IP : 216.73.216.50
Domains :
Cant Read [ /etc/named.conf ]
User : ajzdfbpz
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python2.7 /
site-packages /
hw_cpbackup /
util /
Delete
Unzip
Name
Size
Permission
Date
Action
whm
[ DIR ]
drwxr-xr-x
2023-10-21 18:57
__init__.py
0
B
-rw-r--r--
2023-10-21 18:57
__init__.pyc
148
B
-rw-r--r--
2023-10-21 18:57
alert.py
2.42
KB
-rw-r--r--
2023-10-21 18:57
alert.pyc
1.83
KB
-rw-r--r--
2023-10-21 18:57
log.py
898
B
-rw-r--r--
2023-10-21 18:57
log.pyc
1.06
KB
-rw-r--r--
2023-10-21 18:57
s3.py
6.86
KB
-rw-r--r--
2023-10-21 18:57
s3.pyc
8.27
KB
-rw-r--r--
2023-10-21 18:57
windy.py
1016
B
-rw-r--r--
2023-10-21 18:57
windy.pyc
1.66
KB
-rw-r--r--
2023-10-21 18:57
Save
Rename
""" Handles the formatting of webhook alerts to the Google Chat API. Messages are formed based on the type, username, and hostname passed from the calller. An alert is sent to the webook via JSON payload POST request. Google Chat API ref: https://developers.google.com/chat/api """ import socket import requests def send_alert(username='', hostname=socket.gethostname(), message=None): """Alert sender""" endpoint = "https://chat.googleapis.com/v1/spaces/AAAAFHtTWnQ/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=MYBjN03H1TyHBjTrkZE4bKVFSCDOTLwktnEqkG7QPOQ%3D" if not isinstance(message, str): raise Exception('Undefined alert condition') elif message == '': raise Exception('Condition cannot be empty') # craft json body request_body = { "text": "<users/all> ", "cards": [ { "header": { "title": "Errors detected in Object Storage", "subtitle": "Investigate and manually ensure backup.", "imageUrl": "https://lh4.googleusercontent.com/proxy/lmaJGx8fX3alebQxcvE_EbRJnEviLkdyBAc0N-mjCMZm2uNIIZxkT9Y8UX9cZQVdGbP0zgumdkys1_RAD_awT-xaKFRxw1yD8e33gsSxEhAN7_YJANmdNxEyDZoBOCp8IDp2H4Y" }, "sections": [ { "widgets": [ { "keyValue": { "topLabel": "Condition", "content": message } }, { "keyValue": { "topLabel": "Server", "content": hostname } } ] } ] } ] } if username: username_widget = { "keyValue": { "topLabel": "Username", "content": username } } request_body['cards'][0]['sections'][0]['widgets'].append(username_widget) # send # TODO: make this configurable so we can quickly turn alerts on/off # without needing to comment out this line, rebuild, and redeploy the agent # every time we need to temporarily disable alerts. requests.post(endpoint, json=request_body)