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/sh | |
# pslog.sh - Piped logger for Apache to use with OpenVPN + port sharing | |
# Replaces remote ip in logs with real client ip | |
# | |
# USAGE: ErrorLog "|/usr/local/bin/pslog.sh ${APACHE_LOG_DIR}/error.log" | |
# CustomLog "|/usr/local/bin/pslog.sh ${APACHE_LOG_DIR}/access.log" combined | |
# | |
# REQUIRES: openvpn server config "port-share 127.0.0.1 10443 portshare" | |
# where 'portshare' is journal dir for tmp files (e.g. /run/openvpn/portshare if chrooted) |
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 | |
# ipset-logpat | |
# searches httpd access logs for pattern, whoises matching ip's and uses | |
# ip blocks to create ipset set. also adds iptables rules to log and reject | |
# requires: iptables, ipset, aggregate (optional) | |
# other useful ipset commands: ipset list [-terse], ipset destroy | |
# more info: |
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/python3 | |
# Source: https://github.com/quandyfactory/dicttoxml/blob/master/README.markdown | |
# page = urllib.urlopen('http://quandyfactory.com/api/example') | |
import json | |
import urllib | |
import dicttoxml | |
import sys |
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/python3 | |
# ldbdump - dumps LevelDB keys/values | |
# | |
# a LevelDB is a dir with files such a these: | |
# 000050.ldb 000100.log CURRENT LOCK LOG MANIFEST-000099 | |
# | |
# sources: https://github.com/tos-kamiya/levelobjdb dump() | |
import os |
OlderNewer