Skip to content

Instantly share code, notes, and snippets.

View eaguad1337's full-sized avatar
๐Ÿš€

Eduardo Aguad eaguad1337

๐Ÿš€
View GitHub Profile
yum -y install rh-nodejs8
scl enable rh-nodejs8 bash
yum group install -y "Development Tools"
yum -y install libpng-devel
rpm -Uvh https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm
sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/mysql-community.repo
yum --enablerepo=mysql57-community install -y mysql-community-server
@eaguad1337
eaguad1337 / nginx.conf
Created March 27, 2020 00:56
nginx conf example
server {
listen 80;
server_name localhost;
root /home/www-data/salfa-maquinaria/htdocs;
charset utf-8;
error_log /var/log/nginx/salfa.cl-error.log error;
access_log /var/log/nginx/salfa.cl-access.log main;
index index.php;
@eaguad1337
eaguad1337 / cloudflare-delete-all-records.sh
Created August 12, 2020 03:15 — forked from SuTree/cloudflare-delete-all-records.sh
Delete all DNS records for specified zone
#!/bin/bash
EMAIL=me@gmail.com
KEY=11111111111111111111111111
ZONE_ID=2222222222222222222222222
curl -sLX GET https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=500 \
-H "X-Auth-Email: ${EMAIL}" \
-H "X-Auth-Key: ${KEY}" \
-H "Content-Type: application/json" | jq .result[].id | tr -d '"' | (
@eaguad1337
eaguad1337 / enable_real_ip.sh
Created March 17, 2023 02:05
Enable Real IP in Nginx behind Cloudflare
#!/bin/bash
# Check if nginx is installed
echo "Check if nginx is installed"
if [[ $(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") -eq 0 ]]; then
echo "nginx is not installed"
exit 1
fi
echo "Check if http_realip_module and realip_module are active in nginx"
@eaguad1337
eaguad1337 / cloudflare-ban.py
Created March 21, 2023 15:23
Cloudflare command for Wazuh
#!/usr/bin/env python3
import sys
import os
import requests
import json
import datetime
# from socket import socket, AF_UNIX, SOCK_DGRAM
ACTION = None
IP = None