This file contains hidden or 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 | |
configfile='/tmp/myconfig.cfg' | |
configfile_secured='/tmp/myconfig_secured.cfg' | |
# check if the file contains something we don't want | |
if egrep -q -v '^#|^[^ ]*=[^;]*' "$configfile"; then | |
echo "Config file is unclean, cleaning it..." >&2 | |
# filter the original to a new file | |
egrep '^#|^[^ ]*=[^;&]*' "$configfile" > "$configfile_secured" |
This file contains hidden or 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
IFS='\n';for i in $(cat config_file); do eval $(echo $i | tr -dc '[:alnum:]/=\n'); done;IFS=' ' |
This file contains hidden or 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
[ 1.573230] Initializing network drop monitor service | |
[ 1.599466] input: AT Raw Set 2 keyboard as /devices/mb:kmi0/serio0/input/input0 | |
[ 1.637936] Freeing init memory: 152K | |
[ 1.641961] mmc0: host does not support reading read-only switch. assuming write-enable. | |
[ 1.644022] mmc0: new SDHC card at address 4567 | |
[ 1.654328] mmcblk0: mmc0:4567 QEMU! 25.0 GiB | |
Co-routine is yielding to no one |
This file contains hidden or 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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
This file contains hidden or 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
diff --git a/ircd/ssl.c b/ircd/ssl.c | |
index debe89f..435269b 100644 | |
--- a/ircd/ssl.c | |
+++ b/ircd/ssl.c | |
@@ -377,6 +377,8 @@ void ssl_init(void) | |
sslfail("SSL_CTX_use_certificate_file"); | |
if (!SSL_CTX_use_RSAPrivateKey_file(ctx, pemfile, SSL_FILETYPE_PEM)) | |
sslfail("SSL_CTX_use_RSAPrivateKey_file"); | |
+ if (!SSL_CTX_use_certificate_chain_file(ctx, pemfile)) | |
+ sslfail("SSL_CTX_use_certificate_chain_file"); |
This file contains hidden or 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 | |
# core-ns-download | |
# Check and download zip archive with zone information but only | |
# if required. | |
import requests | |
import os, zipfile | |
import argparse | |
from io import BytesIO | |
import json |
This file contains hidden or 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 | |
MUNIN_CONF=${1-'/opt/local/etc/munin/munin.conf'} | |
grep '^\[' ${MUNIN_CONF} | tr -d '[' | tr -d ']' |\ | |
while read line; do | |
if [[ "${line}" =~ ";" ]]; then | |
# group exists | |
group=$(echo ${line} | awk -F \; '{ print $1 }') | |
node=$(echo ${line} | awk -F \; '{ print $2 }') |
This file contains hidden or 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 | |
import crypt, string, random, sys, getpass | |
def gen_salt(): | |
letters=string.ascii_letters+string.digits # alphanumeric, upper and lowercase | |
return ''.join([random.choice(letters) for _ in range(8)]) | |
if len(sys.argv) < 1: | |
print "Usage: %s [salt]" % (sys.argv[0]) |
This file contains hidden or 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
# core.io dovecot proxy config file | |
# defaults | |
postmaster_address = postmaster@%d | |
auth_mechanisms = plain | |
protocols = imap pop3 sieve | |
# secure | |
ssl = yes | |
disable_plaintext_auth = yes |
This file contains hidden or 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/bash | |
if [ -n "$EX4DEBUG" ]; then | |
echo "now debugging $0 $@" | |
set -x | |
fi | |
# set this to some other value if you don't want the panic log to be | |
# watched by this script, for example when you're using your own log |