This file contains 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
## This Script is intended to be used for Querying remaining time and resetting Terminal Server (RDS) Grace Licensing Period to Default 120 Days. | |
## Developed by Prakash Kumar (prakash82x@gmail.com) May 28th 2016 | |
## www.adminthing.blogspot.com | |
## Disclaimer: Please test this script in your test environment before executing on any production server. | |
## Author will not be responsible for any misuse/damage caused by using it. | |
Clear-Host | |
$ErrorActionPreference = "SilentlyContinue" | |
## Display current Status of remaining days from Grace period. |
This file contains 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/sh | |
#set -x | |
EMAIL=l.spencer.heywood@gmail.com | |
. /etc/apache2/envvars | |
/usr/sbin/lynis -c -Q -q --profile /etc/lynis/default.prf | |
# Check to ensure we're still at 100% |
This file contains 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
#!/usr/bin/env python3 | |
import sys | |
import requests | |
from bs4 import BeautifulSoup as bs | |
try: | |
firstname = sys.argv[1] | |
except IndexError: | |
print('Usage: ' + sys.argv[0] + ' firstname lastname') | |
sys.exit(1) |
This file contains 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
<html> | |
<head> | |
<title>Sample email html template</title> | |
</head> | |
<body> |
This file contains 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
--- | |
- hosts: my-webservers | |
tasks: | |
- name: download the git repository | |
command: git clone https://github.com/ismailtasdelen/Anti-DDOS.git /tmp/Anti-DDOS | |
- name: run the shell script | |
command: bash /tmp/Anti-DDOS/anti-ddos.sh | |
become: true |
This file contains 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
#!/usr/bin/env bash | |
if [ "$1" == '' ] | |
then | |
echo "usage: $0 domain.com" | |
exit 1 | |
fi | |
DOMAIN="$1" |
This file contains 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
#!/usr/bin/env bash | |
ADMINISTRATOR1="admin_user1" | |
ADMINISTRATOR2="admin_user2" | |
MY_IP="$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}')" | |
MY_IP="$MY_IP" | |
ACCOUNTS="$(who)" | |
if echo "$ACCOUNTS" | grep --quiet -e "$ADMINISTRATOR1" -e "$ADMINISTRATOR2" |
This file contains 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 | |
## See https://obrienlabs.net/setup-raspberry-pi-kiosk-chromium/ for more information | |
## Add this one liner to the end of ~/.config/lxsession/LXDE-pi/autostart after downloading this script to /home/pi/kiosk.sh and making it executable: | |
## @/home/pi/kiosk.sh | |
WEBSITE='https://google.com' | |
# Hide the mouse from the display | |
unclutter & | |
This file contains 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
#!/usr/bin/env python3 | |
domain = 'ad.domain.org' | |
bases = domain.split('.') | |
bases_total = len(bases) | |
global base_domain | |
base_domain = '' | |
run = 0 | |
for base in bases: | |
if run == 0: |