Wednesday, June 4, 2008

Useful gdb commands

The following will be useful for the GDB..

(gdb) disassem

(display memory as machine instructions)
(gdb) info frame
(describe current frame or frame at [addr])


Tuesday, June 3, 2008

Check availability of a Socket.

To check whether a particular port is available or not, we can use

1) netstat -a
{ if you are in the same computer, it will list all the ports it is listening, and all the connections established. }

2) nmap
{ if you are checking from a remote system, whether a particular port is available.}

stinbng51:/home/nthattil# nmap -sU -p 4343 x.x.x.x

Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2008-06-03 14:25 IST
Interesting ports on stinbng46 (x.x.x.x):
PORT STATE SERVICE
4343/udp open|filtered unicall
MAC Address: 00:1E:C9:AD:4F:DE (Unknown)

Nmap finished: 1 IP address (1 host up) scanned in 0.473 seconds
stinbng51:/home/nthattil#