Skip to content

Instantly share code, notes, and snippets.

View mtahle's full-sized avatar
🏠
Working from home

Mujahed Altahle mtahle

🏠
Working from home
View GitHub Profile
@mtahle
mtahle / secure_backup.sh
Last active July 12, 2024 21:27
encrypt and decrypt a backup file using AWS Key Management Service (KMS) and AWS S3.
#!/bin/sh
# This script provides functionality to encrypt and decrypt a backup file using AWS Key Management Service (KMS) and AWS S3.
# It takes two main commands: 'encrypt' and 'decrypt'.
# The 'encrypt' command encrypts the backup file using a data encryption key (DEK) generated by AWS KMS.
# The encrypted backup file and the encrypted DEK are then uploaded to an S3 bucket.
# The 'decrypt' command downloads the encrypted backup file and the encrypted DEK from the S3 bucket.
# It then decrypts the backup file using the DEK and saves it to a local directory.
#Author:
version: '3'
services:
elasticsearch:
image: elasticsearch:7.6
container_name: elasticsearch
environment:
- discovery.type=single-node
ports:
- "127.0.0.1:9200:9200"
#!/bin/bash
# Error handling
set -e
set -o pipefail
error_exit() {
echo "Error: $1"
exit 1
}
@mtahle
mtahle / php8.1_installer_for_magento2.x.sh
Created May 24, 2024 00:44
Installation of PHP 8.1, PHP-FPM, and required extensions for Magento 2.x
#!/bin/bash
# Error handling
set -e
set -o pipefail
error_exit() {
echo "Error: $1"
exit 1
}
@mtahle
mtahle / create-apache2-virtual-host.sh
Last active February 7, 2022 17:45
A shell script to create apache2 virtual host
#!/bin/bash
# created by Mujahed Al-Tahleh mujahed@ieee.org
E_NO_ARGS=65
if [ $# -eq 0 ]; then
echo "No arguments provided"
echo "Required arguments: 1- web dir name under (/var/www/) 2- linux user 3- website domain name"
exit $E_NO_ARGS
fi
@mtahle
mtahle / get-docker-compose.sh
Created September 7, 2021 19:07
docker compose installer
#!/bin/sh
set -o errexit
set -o nounset
IFS=$(printf '\n\t')
# Docker Compose
sudo wget --output-document=/usr/local/bin/docker-compose "https://github.com/docker/compose/releases/download/$(wget --quiet --output-document=- https://api.github.com/repos/docker/compose/releases/latest | grep --perl-regexp --only-matching '"tag_name": "\K.*?(?=")')/run.sh"
sudo chmod +x /usr/local/bin/docker-compose
<?php
// php-reverse-shell - A Reverse Shell implementation in PHP
// Copyright (C) 2007 pentestmonkey@pentestmonkey.net
//
// This tool may be used for legal purposes only. Users take full responsibility
// for any actions performed using this tool. The author accepts no liability
// for damage caused by this tool. If these terms are not acceptable to you, then
// do not use this tool.
//
// In all other respects the GPL version 2 applies:
@mtahle
mtahle / keybase.md
Last active September 20, 2019 10:59

Keybase proof

I hereby claim:

  • I am mtahle on github.
  • I am mtahle (https://keybase.io/mtahle) on keybase.
  • I have a public key whose fingerprint is AA7A 7FDE 2D53 DF2C 8516 F42A C1B1 2371 24E7 88D4

To claim this, I am signing this object:

@mtahle
mtahle / setup.sh
Created September 1, 2019 07:06 — forked from samuelantonioli/setup.sh
wire-server setup using fake dependencies
#!/bin/bash
# chmod +x setup.sh && ./setup.sh
# [!] only for testing! this is not stable or secure
# it takes some hours.
# it is available under http://<server-ip>:8080
#
# make sure that you run ubuntu 16.04
# you need minimum 25gb (10gb filled with build dependencies)
@mtahle
mtahle / README-Template.md
Created April 20, 2019 19:51 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites