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 | |
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" | |
change_var=$(/usr/sbin/aide --check | tee -a "$SCRIPT_DIR"/temp.log | grep "differences between") | |
current_date=$( date +%Y%m%d) | |
if [ "$change_var" == "" ] | |
then | |
echo "everythink ok" | |
else | |
echo -e "\e[31m ================================================================================ \e[0m" >> "$SCRIPT_DIR"/report-"$current_date".log | |
/usr/sbin/aide --check >> "$SCRIPT_DIR"/report-"$current_date".log |
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
#Importing modules | |
import paramiko | |
import sys | |
import time | |
#setting parameters like host IP, username, passwd and number of iterations to gather cmds | |
HOST = "10.11.214.143" | |
USER = "admin" | |
PASS = "passwd" | |
ITERATION = 3 |
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
import mysql.connector | |
import os | |
#def connect(): | |
db_server_host=input(str("Enter database server hostname or ipaddress: ")) | |
db_user=input(str("Enter database user: ")) | |
db_passwd=input(str("Enter password: ")) | |
my_database=input(str("Enter database name: ")) | |
#mydb = null | |
def connect(db_server_host,db_user,db_passwd,my_database): | |
return mysql.connector.connect( |
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
resource "google_pubsub_topic" "example" { | |
name = "example-topic" | |
} | |
resource "google_pubsub_subscription" "example" { | |
name = "example-subscription" | |
topic = un1x-topic | |
labels = { | |
foo = "bar" |