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 | |
# ./ipc.sh $1 | |
# by: Sahal Ansari github.com/sahal | |
# | |
# desc: takes input ($1) in form of hex encoded ip from mibbit or cgi:irc | |
# returns ip in dot-decimal format | |
# | |
# use in irssi: /exec (-o) ~/ipc hexip | |
#ready the input |
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
// see: http://blog.sahal.info/post/58278726443/chromebook-socks-proxies-and-ssh-tunnels | |
function FindProxyForURL(url, host) | |
{ | |
// On my Chromebook, I've found that "Secure Shell" or Chrome itself doesn't close ports after a session timesout | |
// so I have to switch the local proxy listen address to 8081. Now, I don't have to use two proxy.pac files. | |
// See Simple PAC Load Balancing on proxypacfiles.com | |
// http://www.proxypacfiles.com/proxypac/index.php?option=com_content&view=article&id=63&Itemid=104 | |
// https://web.archive.org/web/20131011081101/http://www.proxypacfiles.com/proxypac/index.php?option=com_content&view=article&id=63&Itemid=104 | |
return "SOCKS5 localhost:8080; SOCKS5 localhost:8081"; | |
} |
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" |
OlderNewer