Conventions

You will also find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Plug in the card to one of the Kali laptop's USB ports and boot it. Once you log in, open a console terminal and type in iwconfig."

A block of code is set as follows:

import subprocess
import datetime
results = open("results.txt", "a")
while 1:
    cmd = subprocess.check_output(["tshark –n –i wlan0mon –T fields -e wlan.sa –e wlan.ssid –c 100"], shell=True)
    split = cmd.split("
")
    for value in split[:-1]:
           if value.strip():
                   splitvalue = value.split("	")
                   MAC = str(splitvalue[0])
                   SSID = str(splitvalue[1])
                   time = str(datetime.datetime.now())
                   results.write(MAC+" "+SSID+" "+time+"
")

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

import subprocess
import datetime
results = open("results.txt", "a")
while 1:
    cmd = subprocess.check_output(["tshark –n –i wlan0mon –T fields -e wlan.sa –e wlan.ssid –c 100"], shell=True)
    split = cmd.split("
")
    for value in split[:-1]:
           if value.strip():
                   splitvalue = value.split("	")
                   MAC = str(splitvalue[0])
                   SSID = str(splitvalue[1])
                   time = str(datetime.datetime.now())
                   results.write(MAC+" "+SSID+" "+time+"
")

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

ifconfig wlan0 up

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: "Boot the laptop with this DVD and select the Install from Boot menu option."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.153.69