This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
# Defina suas credenciais da AWS aqui (⚠️ Evite hardcode em produção) | |
AWS_ACCESS_KEY = "" | |
AWS_SECRET_KEY = "" | |
AWS_REGION = "" | |
TASK_DEFINITION_NAME = "" | |
# Criar sessão do boto3 com credenciais manuais | |
session = boto3.Session( | |
aws_access_key_id=AWS_ACCESS_KEY, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install python3 | |
sudo apt-get install python3 -y | |
# Install pip3 | |
sudo apt install python3-pip -y | |
# Install prometheus_client | |
pip3 install prometheus_client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Includes PHPMailer autoload | |
require '/etc/scripts/PHPMailer/src/PHPMailer.php'; | |
require '/etc/scripts/PHPMailer/src/SMTP.php'; | |
require '/etc/scripts/PHPMailer/src/Exception.php'; | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\Exception; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($http_user_agent ~* (thesis-research-bot|Amazonbot|Turnitin|Go-http-client|Blackbox|Netsparker|Acunetix|Havij|owasp-zap|AppScan|UptimeRobot|serpstatbot|DuckDuckBot|DuckDuckBot-Https|YandexBot|OpenindexSpider|ZoominfoBot|bingbot|sqlmap|CrowdTanglebot|DataForSeoBot|omgili|trendictionbot|MJ12bot|MegaIndex|PetalBot|aspiegel|trendkite-akashic-crawler|AhrefsBot|SemrushBot|Seekport|AwarioRssBot|AwarioBot|Pinterestbot|UptimeRobot|SEOkicks|DotBot|BLEXBot|crawler|Semanticbot|msnbot|EchoboxBot|mediacloud|Applebot|SeekportBot|Squidbot|SentiBot|CensysInspect|SeznamBot|AwarioSmartBot)) { | |
return 403; | |
} | |
if ($request_uri ~* "onload.*alert.*document.domain") { | |
return 403; | |
} | |
if ($request_uri ~* '\?aam-media') { | |
return 403; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
date=`date +%Y-%m-%d` | |
name=`hostname` | |
WEBHOOK_URL='' | |
cleanup() { | |
curl -H "Content-Type: application/json" -X POST -d "{\"content\":\":x: $(hostname)-$date: Backup não foi finalizado!\"}" $WEBHOOK_URL | |
exit 1 | |
} | |
trap cleanup SIGINT SIGTERM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
config_file=/etc/ssh/ssh_config | |
if grep -q "# StrictHostKeyChecking ask" "$config_file"; then | |
# Substitui a linha comentada pela linha descomentada | |
sed -i 's/# StrictHostKeyChecking ask/StrictHostKeyChecking no/' "$config_file" | |
echo "Configuração atualizada em $config_file" | |
else | |
echo "A linha a ser modificada não foi encontrada em $config_file" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
name=`hostname` | |
date=`date +%Y-%m-%d` | |
WEBHOOK_DISCORD_URL='' | |
stop() { | |
curl -H "Content-Type: application/json" -X POST -d "{\"content\":\":x: $name-$date: Backup não foi finalizado!\"}" $ | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! [ $(id -u) = 0 ]; then | |
echo "O script precisa ser executado como root." >&2 | |
exit 1 | |
fi | |
if [ $# -eq 0 ] | |
then | |
echo "Nenhum argumento fornecido" | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from decouple import config | |
class Cloudflare(): | |
def __init__(self): | |
self.token = config('TOKEN_CLOUDFLARE') | |
self.email = config('EMAIL_CLOUDFLARE') | |
self.headers = { | |
'Content-Type': 'application/json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump --single-transaction --set-gtid-purged=OFF --triggers --routines --events -h myrds.us-east-1.rds.amazonaws.com -u root my_db -r my_db_00.sql |
NewerOlder