Skip to content

Instantly share code, notes, and snippets.

View sholwe's full-sized avatar

sholwe sholwe

View GitHub Profile
@sholwe
sholwe / kernelcare_install.sh
Last active January 26, 2019 17:50
Devuan-kindof kernelcare installer script
#!/bin/bash
#
# KernelCare (https://kernelcare.com/) installation script
# Copyright (c) 2017 CloudLinux Inc. All Rights Reserved
# Unofficial edits by Shawn Holwegner
set -e -o pipefail
repo="https://repo.cloudlinux.com/kernelcare"
name="kernelcare-latest"
@sholwe
sholwe / spam.py
Last active June 8, 2018 23:36
Syeds' spam.py, updated
#!/usr/local/bin/python
# Script used to check /var/log/iptables.log and penalize mail activity outside an allowed amount.
# you need to edit /etc/rsyslog.conf and add: "kern.warning /var/log/iptables.log"
# only supported by CentOS 6 and CentOS 7 currently.
from datetime import datetime
from datetime import timedelta
from collections import defaultdict
import subprocess
@sholwe
sholwe / sshcheck.php
Last active May 6, 2020 20:23
Virmach sshcheck - from Syed's sources - Fix for warnings again
<?php
ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
// the threshold for connections from a remote IP to be considered an attack
// default was 10
$incomingThreshold = 11;
// send an email report?
$sendEmail = TRUE;
//SSH Port
@sholwe
sholwe / xymodem-mini.c
Last active April 3, 2020 17:26 — forked from zonque/xymodem-mini.c
simple xmodem/ymodem implementation in C
/*
* Minimalistic implementation of the XModem/YModem protocol suite, including
* a compact version of an CRC16 algorithm. The code is just enough to upload
* an image to an MCU that bootstraps itself over an UART.
*
* Copyright (c) 2014 Daniel Mack <github@zonque.org>
*
* License: MIT
*/