Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Running the Scanit tool

Scanit, is the interactive script that leads the user through the scanning process. Scanit�s main purpose is to scan for tokens in the application source. The tool is designed to scan the source code of custom written user applications and look for things not supported in Avaya IR.

Scanit does not take any command line parameters. It prompts interactively for the user to enter a directory from which to search for source files. It also allows the user to supply an input file (described below). The user must provide an input file or directory to search to proceed.

Setting up an input file for Scanit

The following example shows the format of an input file for the Scanit tool. The input file includes a list of specific files the tool should scan.

TYPE t
/test/your.t
/tools/my.t
TYPE c
/tools/test/my.c
TYPE sh
/tools/test/hirunner

Note:
You must list all files of the same type after the TYPE declaration, valid types are c, t, sh, and prg. These types correspond to C source/IRAPI, TAS, shell, screen capture, and Script Builder program file, respectively.

Listing specific files has an advantage over searching directories for files in that the tool is explicitly told each file�s type. With the directory search option, the tool can only determine the file type through the file extension. For example, if the tool is given only a directory to search and this directory contains extensionless shell files, those shell files without the .sh extension, will not be discovered and will be ignored by the tool. If the specific shell files are listed in an input file, the shell files will be examined by the tool.

Running the Scanit tool

  1. Type scanit at the command prompt to start the tool.
  2. Make sure you are in the directory where the tool was loaded.

    Note:
    The tool outputs a large amount of information that can scroll by quickly. To capture the output in a file for future reference, use the tee or script utilities to capture the output. (For example, |tee file_name)

    The system responds with:

    Scan Script Builder applications on this system?
    [y or n, default y]

  3. Press Enter to accept the default.
  4. Accepting the default causes the tool to find all the Script Builder program files to be scanned.

    The system displays the following prompt:

    Enter file name of source file list.
    <h for help, or CR to continue>

  5. Enter the name of the input file that specifies the files to be scanned.
  6. You can enter a file of files to scan. As the tool reads these files, it checks to see if the listed source files exist. It then captures the list of files to scan and displays the following prompt:

    You may also enter directories to search.
    You will be reprompted for each directory

    Enter a directory name
    <h for help, or CR to continue>

  7. Enter the name of the directory where the scan should begin.
  8. The response to this prompt should be the root directory of the application path. You do not need to supply a directory if all of the applications to be scanned are specified in the input file.

    This prompt repeats after the system searches for files in the given directory and sub directories. You can scan additional source trees if all applications are not in the same directory tree.

  9. Enter more directories, or press Enter to continue.
  10. The system displays the following message:

    The following source files will be scanned
    press return to continue

    [List of files found ��]

    Press return to begin scanning.

    The tool displays a summary of all the files to be scanned. This is the list of files discovered as a result of all the previous queries.

  11. Press Enter.
  12. The tool displays a series of processing messages, as it begins scanning. When the scanning process is complete it displays the following message.

    Application scanning now complete.
    Results can be found in the directory /current_directory/results

  13. Press Enter.
  14. The results of the application scanning are put into a results directory created from the current working directory where the tool is running.

� 2002 Avaya Inc. All Rights Reserved.