iptables trick to limit concurrent tcp connections
This is sort of a self-documenting post, and a self-support group about ill-behaved tomcat apps.
Sometimes, you have multiple nodes accesing your MySQL server (or any kind of server, for that matter) concurrently. Eventually, software in one or more of these nodes might do nasty things (you know who you are buddy:))
MySQL provides a built in [...]
Generating random salts from bash
From the ‘just because it can be done’ column, here comes a handy shell script to generate random salts.
So, without further ado, here it goes:
#!/bin/bash
[ $# -eq 0 ] && {
echo “usage: salt <length>”>&2
exit
}
strings </dev/urandom | while read [...]
Intrusion detection at the application level, for PHP
Here’s phpids, an Intrusion Detection System for PHP.
According to the site, it aims to counter XSS, SQL Injection, header injection, directory traversal, RFE/LFI, DoS and LDAP attacks, and unknown attack patterns, through it’s Centrifuge component.
Installation is simple. Just download it, copy the lib directory to a directory in your project structure, or add it to [...]
Top 25 most dangerous programming errors
Most people make at least 8 or 9 of these in a new project, and this alone is a good reason to use a programming framework, unless you know what you’re doing.
The problem is, sometimes, people who skip on frameworks, don’t know what they’re doing.
Or, as the Tao of Programming says:
There once was [...]
