Penetration Testing with the Bash shell
上QQ阅读APP看书,第一时间看更新

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "The [FILE] or [DIRECTORY] argument would be any path or file you wish to fire ls at."

A block of code is set as follows:

#!/bin/bash
HOST=$1
SSL_PORT=$2
KEY_LEN_LIMIT=$3
VULN_SUIT_LIST=$4
echo -e "[*] assessing host \e[3;36m $HOST:$SSL_PORT\e[0m"
for cipher in `sslyze --regular $HOST:$SSL_PORT | awk -F\  '/[0-9]* bits/ { print $1"_"$2"_"$3 }'`

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$'
else
 PS1='${debian_chroot:+($debian_chroot)}{\j}\u@[\w]\n\$'
fi
unset color_prompt force_color_prompt 

Any command-line input or output is written as follows:

medusa –h 192.168.10.105 –u k3170makan –P /usr/share/wordlists/rockyou.txt –M ssh

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "The Global Regular Expression Print (grep) utility is a staple for all command-line jockeys."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.