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 | |
# ./normal_user_ips.sh | |
# desc: display IPs of all normal users on your Debian system | |
# by: Sahal Ansari http://sahal.info/ | |
accepted="Accepted" | |
# to display Accepted or Failed IPs from auth.log uncomment: | |
#accepted="Accepted|Failed" | |
# directory where you keep auth.log |
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 | |
# ./auto_verify_dns.sh | |
# _very_ dumb way to verify that a list of dns servers work... | |
# by sahal | |
# | |
# use: ./auto_verify_dns.sh /full/path/to/dns/servers > ~/output | |
# requires timeout3 (set $W_TOUT) by Dimitry V Golovashkin (see Google) | |
# path to timeout3 - written by Dmitry V Golovashkin - via google | |
W_TOUT=/home/sahal/scripts/others/timeout3 |
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 | |
# use: ./debian/dch-generate.sh > ./debian/changelog | |
# desc: quick and dirty (emphasis on dirty) debian changelog generator for SoftEtherVPN | |
# | |
# Copyright (c) 2014 Sahal Ansari (github@sahal.info) | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# version 2 as published by the Free Software Foundation. |
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 | |
# ./gen-server-stats.sh | |
# by Sahal Ansari - github.com/sahal | |
# desc: generates a list of stats on the box you're on. Not as impressive as phpSysInfo. | |
# | |
# run it every hour via cron, if you'd like: | |
# 0 * * * * /home/user/gen-server-stats.sh > /home/user/public_html/stats | |
# generate "html": | |
#echo "<pre>" |
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
Windows Registry Editor Version 5.00 | |
[ | |
-HKEY_CURRENT_USER\Software\SimonTatham | |
] |
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 | |
# desc: find out where misfits (those causing apache errors) are located | |
# by: Sahal Ansari (github@sahal.info) | |
# use: ./misfits.sh [stats|top10] | |
# requires: geoip-bin package in Debian (and derivatives?) | |
DIR="$( cd "$( dirname "$0" )" && pwd )" | |
misfitlist="$DIR/list" | |
apache_error_log_location="/var/log/apache2/error.log" | |
#local copy of error.log exists |
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 | |
# Installing an L2TP/IPSec VPN on Debian Wheezy, CentOS, RHEL | |
# see: http://blog.sahal.info/post/103242887966/ipsec-l2tp-vpn-on-debian | |
# | |
# adapted from: https://gist.github.com/hwdsl2/9030462 # need to compile libreswan :( | |
# adapted from: https://raymii.org/s/tutorials/IPSEC_L2TP_vpn_with_Ubuntu_14.04.html # installs Openswan (unmaintained) :( | |
# | |
# Copyright (c) 2014 Sahal Ansari - github@sahal.info | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
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 -e | |
# by Sahal Ansari - github@sahal.info | |
# based on this blog post by Kevin Goodman | |
# http://blog.colovirt.com/2009/01/07/linux-generating-strong-passwords-using-randomurandom/ | |
# NOTE: install haveged for faster/'better' results! | |
length=24 | |
count=10 | |
random_source="/dev/urandom" |
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 | |
# desc: Looks for 32bit KeyID duplicates in your gpg keyring (More Info: https://evil32.com/) | |
# see: https://github.com/sahal/wget-tor-mirror for an example implementation | |
# by: Sahal Ansari (github@sahal.info) | |
# license: Any of the following: GPLv2 or GPLv3 or MIT | |
function do_gpgidchk { | |
gpg --list-keys --fingerprint | grep "Key\ fingerprint"| sed 's/.*\=\ //' | tr -d "\ " | sed 's/.\{32\}//' | sort | uniq -c | sed 's/^\ *//' | grep -v "^1\ " | |
if [ "$?" -eq "0" ]; then | |
echo "WARNING: At least two keys in your keyring share 32bit KeyIDs." |
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 | |
# ./trimbackups.sh [prompt] | |
# desc: Use this for trimming backup directories stored as $prefix_yyyymmdd[hhmm] in $backup dir | |
# todo: implement getopts :x | |
# | |
# Copyright (c) 2015 Sahal Ansari github@sahal.info | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
OlderNewer