Archive for October, 2006

9
Oct

Hidden files

   Posted by: Vivek Khokhar    in Linux

It is important to look everywhere on the system for unusual or hidden files (files that start with a period and are normally not shown by the “ls�? command), as these can be used to hide tools and information (password cracking programs, password files from other systems, etc.). A common technique on UNIX systems is to put a hidden directory or file in a user’s account with an unusual name, something like ‘…’ or ‘.. ‘ (dot dot space) or ‘..^G’ (dot dot control-G). The find program can be used to look for hidden files.

To look for hidden files, use the following commands:
# find / -name “.. ” -print -xdev
# find / -name “.*” -print -xdev | cat -v

9
Oct

Mysql JavaConnector options

   Posted by: Vivek Khokhar    in java

?zeroDateTimeBehavior=convertToNull

This will handle the all zero Dates problem with mysql

9
Oct

Blocking ARP Cache poisoning

   Posted by: Vivek Khokhar    in Linux

Manually add all MAC address.

Get MAC address of each machine using ifconfig

To add manually MAC address to ARP entries, use the following command:
# arp -s 207.35.78.3 00:50:DA:C6:D3:FF
WARNING: If you receive error message like: SIOCSARP: Invalid argument, it is because the MAC (Media Access Control) address you want to add is the one of your server. You must add only MAC address of INTERNAL computers in your private network. This hack doesn’t apply to external node on the Internet.

You can now be reassured that someone will not change the system’s IP address of an
INTERNAL system and get through. If they do change the IP address, the server simply won’t talk to them. With the new iptables tool of Linux, which replace the old ipchains utility for packet filter administration and firewall setup, MAC addresses can be filtered and configured in the firewall rules too.

9
Oct

HTML Page Breaks

   Posted by: Vivek Khokhar    in css

This is on page 1.

This is on page 2.

Or you can pick a tag where you want the page to break. In this example I used the H3 tag

In the header add this line

Wherever the

is in the body of your page it will produce a page break.

8
Oct

Ruby HEREDOC Syntax

   Posted by: Vivek Khokhar    in Ruby

html = <<-EOT

all  html goes here

EOT