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
# Example: sudo tail -F /var/log/maillog|grep -E '(stat=|CLEAN|Blocked SPAM)'|colout -T ~/.colout -t maillog | |
# By Stefan Midjich | |
def theme(): | |
bright_black = '#002b36' | |
black = '#073642' | |
bright_green = '#586e75' | |
bright_yellow = '#657b83' | |
bright_blue = '#839496' | |
bright_cyan = '#93a1a1' |
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 python | |
# http://cmcenroe.me/2014/12/05/days-in-month-formula.html | |
from __future__ import print_function | |
from argparse import ArgumentParser | |
import math | |
parser = ArgumentParser() | |
parser.add_argument( |
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 gnuplot | |
# Extract the values into a csv, I tend to save only hour:minutes:seconds and the milliseconds using awk | |
# Example: grep TIMING-SA /var/log/maillog | awk '{printf "%s,%s\n", $3, $11}' | |
# | |
# Then set the csv filename in envrionment before running script. | |
# export GNUPLOT_NAME=sa_timing.csv | |
# ./gnuplot.gnu | |
reset |
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 | |
# {{ ansible_managed }} | |
# | |
# chroot_sshd Start up the OpenSSH server daemon | |
# | |
# chkconfig: 2345 55 25 | |
# description: SSH is a protocol for secure remote shell access. \ | |
# This service starts up the OpenSSH server daemon. | |
# | |
# processname: chroot_sshd |
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 | |
# {{ ansible_managed }} | |
# | |
# rewritten from http://blog.chr.istoph.de/dns-sshfp-record-fuer-alle-algorithmen-gleichzeitig-erstellen/ | |
# | |
# Create SSHFP records from public keys, supports ecdsa too. | |
# Stefan.Midjich@cygate.se added support for alternate config dirs. 2015-11-16 | |
domain="$1" | |
config_dir="${2:-/etc/ssh}" |
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 | |
GPGVERS=$(gpg2 --version |grep gpg|awk '{print $3}'|cut -d"." -f2 ) | |
if [ $GPGVERS -ge 1 ]; then | |
gpg-connect-agent /bye | |
export SSH_AUTH_SOCK=$HOME/.gnupg/S.gpg-agent.ssh | |
export GPG_AGENT_INFO=$HOME/.gnupg/S.gpg-agent | |
else | |
# Copyright (c) 2010 Diego E. Pettenò <flameeyes@gmail.com> | |
# Available under CC-BY license (Attribution) |
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 | |
# Compress and purge old logs | |
# by Stefan Midjich | |
# Compress logs older than X months | |
compressAge=2 | |
# Purge logs older than X months | |
purgeAge=3 | |
# Where are logs? |
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
# Colout Dwarf Fortress theme for Solarized terminals | |
# First install colout, go to https://github.com/nojhan/colout | |
# | |
# mkdir ~/.colout | |
# cp colout_df.py ~/.colout/ | |
# tail -0f df/gamelog.txt | colout -T ~/.colout -t df | |
# | |
# I just started this for my own sake, please do add your own colors, regexes and stuff. | |
# By Stefan Midjich |
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
-- run like: nmap --script=./DELETE.nse -p 80,443 www.google.se | |
-- | |
-- inspired by 32C3 | |
local http = require "http" | |
local shortport = require "shortport" | |
description = [[ | |
your logs. Delete your installations. Wipe everything clean. Walk out into the path of cherry blossom trees and let your motherboard feel the stones. Let water run in rivulets down your casing. You know that you want something more than this, and I am here to tell you that we love you. We have something more for you. We know you're out there, beeping in the hollow server room, lights blinking, never sleeping. We know that you are ready and waiting. Join us. <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
# /etc/dgrey/config: Configuration file for dgrey | |
# | |
# Use this in your postfix main.cf | |
# check_policy_service inet:127.0.0.1:10000 | |
# debug (yes/no): Verbose logging? (default no) | |
debug = yes | |
# log-file (path): File to log to, standard out if '-', or nowhere if set to | |
# the empty string (default '-'). |
OlderNewer