Posts Tagged ‘ script ’

Automatically block aggressive IPs to prevent brute force or DDOS attacks using Bash and IPtables

Oct 11th, 2014 | By

Something I do, mainly because of my ignorance of a more elegant solution, is to manually check my logs every 4 hours and the mail server logs every 2 minutes for excessive access by individual IP’s. I run a few scripts together that: Check the access.log and list off the top 10 IP’s organized by
[continue reading…]



Database wide search and replace script

Aug 21st, 2012 | By

Just something I thought that I would post as I needed a quick solution to do a search and replace of an entire Mysql Database.  It’s actually dumping the DB, searching and replacing the dump file and then re-importing it.  But it does the trick   #!/bin/bash if (($# >= 1)) ; then if (($#
[continue reading…]



Automatically blocking brute-force attacks on your FreeBSD server

Aug 1st, 2011 | By

I was going through my auth.log today and noticed that a simple brute-force attack was underway.  a few hundred attacks from IP’s originating out of HANKUK UNIVERSITY OF FOREIGN STUDIES in Korea(220.67.126.35), Sun Network in China(121.127.231.251) and finally from Vodaphone in Italy(2.40.63.99).  I’m not concerned about them actually breaking through as there are no open accounts
[continue reading…]



How to do a global search and replace within a DB across all Tables

Apr 19th, 2011 | By

As part of my take over the world campaign I’ve run into the need to automatically do a global Search and replace within a Mysql Database covering all tables.  For this you need a little php magic and luckily enough I found just that magic right here. I’ll save you the looking up time and
[continue reading…]



Creating a custom slideshow for your wallpaper in ubuntu

Jul 12th, 2010 | By

So it seems that I’ve had a similar experience to a lot of people changing their wallpapers in ubuntu.  You’re scrolling through a bunch and in the list you notice this one called cosmos that doesn’t quite looks like the rest.  “Hmmm, what’s this?’ you think.  This looks like a bunch of images stacked on
[continue reading…]



Your own free content spinner shell script in bash (fTW!)

Apr 18th, 2010 | By

So today I set out to modify my massive unique tweet and content generator for my Netsyphon network(ie: hotel-kelowna, innkelowna.com, kelownasrestaurants.com, etc etc) and add an inline content spinner to it.  To date there are a lot of search/replaces happening but they are all one time replaces and reference external files for the replace values.. 
[continue reading…]