Useful freeware Tools for Windows

Submitted by rex on Sun, 01/24/2010 - 17:49

Firefox - great Browser with alot of addons
http://www.mozilla.com/

Notepad++ - Editor with Syntax highlighting in multiple languages

CutePDF - convert any document or website to pdf
Daemen Tools - Create Virtual CD / DVD Disks
putty
adware
antivir
icq
msn messenger
acrobat reader
flash player
java virtual machine
vmware server
virtualbox
filezilla
openoffice
utorrent
cdburnerxp
picasa
winamp
google earth

How to use custom function aliases in PHP

Submitted by Anonymous (not verified) on Fri, 01/22/2010 - 10:41

I want to use db_esc() instead of mysql_real_escape_string(). I dont want to call mysql_real_escape_string each time when I need a query. I can write a custom function but I want to declare a function-alias if possible.

I could use own function:

 function db_esc($str){
	return mysql_real_escape_string($str);
 }
 

I would prefer something like this:

 function_alias( 'db_esc', 'instead of mysql_real_escape_string' );
 

Any idea?

How to filter all html tags from each _GET and _POST request

Submitted by Anonymous (not verified) on Mon, 01/18/2010 - 12:41

If you have a small website which uses php and accept just plain text from users or visitors you need to filter each request to be sure that nobody sends html to hack your site. I put following two lines at the top of my php file. Of course you can add the third line for cookies.

	foreach($_GET as $k=>$v)	$_GET[$k] = strip_tags($v);
	foreach($_POST as $k=>$v)	$_POST[$k] = strip_tags($v);

Drupal and LDAP

Submitted by Anonymous (not verified) on Wed, 01/13/2010 - 10:26

I want to use Drupal with LDAP for an intranet project. I have installed Drupal and LDAP module. I have configured it and search dn user passes the test. But I cant see any signal that Drupal's authentification with ldap works. I see still login box on the left. And idea what I should do additionaly?

Packet Sniffing and Monitoring with Tshark / Wireshark

Submitted by rex on Sat, 01/09/2010 - 01:34

capture the traffic for 300 seconds and save it in output_file and exit

tshark -a duration:300 -q -w output_file

Sniff the traffic and show it on the screen
tshark -S

Sniff 1000 packets and show it on the screen
tshark -S -c 1000

IO Stats - How many packets and frames has been transfered in 60 seconds?
tshark -a duration:60 -z io,stat,60

read the dumpfile 'output_file'
tshark -r output_file

read output_file and show only http connections from the ip 1.2.3.4