Syntax To display the HTTP Headers using just tcpdump the following syntax can be used : root@webserver1 ~]# tcpdump -vvvs 1024 -l -A host www.fir3net.com Example [root@webserver1 ~]# tcpdump -vvvs 1024 -l -A host www.fir3net.com tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1024 bytes 19:51:57.742793 IP (tos 0x0, ttl 64, id 39410, offset … Read more
To install mplayer onto your Centos / RHEL distro you will need to : 1. Download and install the rpmforge repository. rpm -ivh 2. Add the following text to a new file : /etc/yum.repos.d/fc6.repo. cat > /etc/yum.repos.d/fc6.repo[PASTE THE FOLLOWING] [fc6-base] name=Fedora Core 6 mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-6&arch=$basearch enabled=1 gpgcheck=0 [CTRL-C] 3. Install mplayer using yum. yum install mplayer
Curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE) and is designed to work without user interaction. Below shows some useful examples: Total Retrieval Time [root@webserver1 ~]# curl -s -w “%{time_total}\n” -o /dev/null www.bbc.com 0.196 Host … Read more
The other day I was faced with the problem of determining the networking bandwidth of a Linux system via just the shell. After some googling and some head scratching I eventually came up with the following command. echo “scale=2; `curl –progress-bar -w “%{speed_download}” http://speedtest.wdc01.softlayer.com/downloads/test10.zip -o test.zip` / 131072″ | bc | xargs -I {} echo … Read more
ISSUE When configuring the timezone within Centos the correct timezone is not propagated and the output of the command date does not represent the timezone previously configured. SOLUTION This can be caused by corrupted timezone files. To resolve the issue remove the soft-link, reinstall tzdata and then recreate the soft-link to the necessary timezone. [root@server … Read more
To extract or open RAR files within Linux the unrar binary is used. Below provides the installation and basic operational syntax for the unrar program. 1. Installation 1.1 REDHAT yum install unrar 1.2 UBUNTU apt-get install unrar 2. Basic Syntax To extract a RAR file the following syntax is used: unrar e contents.rar 3. Example … Read more
When Installing Ubuntu from a Live CD via the graphical installer ubiquity you may receive the following error : The username you entered is invalid. Note that usernames must start with a lower-case letter, which can be followed by any combination of numbers and more lower-case letters. Solution This error can occur … Read more
Though Cygwin provides the ability to update and install packages via the use of the Cygwin`s setup.exe command, the command line installer apt-cyg provides apt-get like syntax whilst still using Cygwin’s native package repository. Below details the steps required to install the apt-cyg command line installer. 1. UPDATE CYGWIN First of all you … Read more
This is caused by additional carriage returns within your script. In Windows the end of a line is denoted by CRLF (Carriage-Return, Line-Feed). In Unix-like systems, the end of a line is donated by a single LF. This means when you try to run your script, every line has an extra carriage return which in turn causes … Read more
Conditional execution is a term used to describe the execution of processes or commands based on specfic conditions. This can also be thought of as conditional logic. Like with most scripting or programming languages conditional logic is built upon the use of return codes. A return code (exit status) is returned upon process completion to … Read more
Below is a small method for running Java daemons within Linux. The syntax is as follows: nohup is used so that it doesn’t get killed when user logs off </dev/null is used so that it doesn’t require a command-promt of it’s own & is used so that the Java daemon runs as a background process. … Read more
The following syntax will scan a range of IP addresses. At the point of a ARP response being received it will show a reply message (shown in below example). Note : In this example it will scan IPs between 10.1.1.1-255. if [ -x /sbin/arping ] ; then for i in {1..255} ; do echo arping … Read more
The following command will place a clock within the top right corner of your shell. while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-25));date;tput rc;done &
INTRODUCTION This article aims to explain the various steps required in configuring Wireless connectivity within Backtrack 4 r2. It is also worth mentioning that as Backtrack is based upon Ubuntu/Debian you may find steps and solutions within this article useful when faced with other Ubuntu/Debian based wireless issues. MY SETUP Backtrack installation consists of a … Read more
When running the command iptables -vL you may find that : the output displays slowly. the output (appears) to have hung. You can further see what IPtables is doing via running iptables -vL. From this you will most likely see iptables trying to run a reverse DNS lookup (and failing). Solution Due to IPtables trying to … Read more
The main cause for this error (see below) is due to su not being set to a setuid of root. su: cannot set groups: Operation not permitted Solution chmod u+s /bin/su
By default VSFTPD does not allow the browsing of symbolic links. When you try to browse sym links you will get a message saying, 550 Failed to change directory In order to overcome this you can use the mount command. Here are the steps : [root@server ftpuser]# pwd/home/ftpuser[root@server ftpuser]# mkdir NEW_DIR[root@server ftpuser]# mount –bind … Read more
Each Syslog message contains a priority value. The priority value is enclosed within the characters < >. The priority value can be between 0 and 191 and consists of a Facility value and a Level value. Facility being the type of message, such as a kernel or mail message. And level being a severity level … Read more