Skip to content
Kate edited this page Jan 30, 2018 · 7 revisions

PT.Config can be used in CLI (Command Line Interface) mode. Basic usage:

main.py [options] <"my config file">

The following options can be specified:

-r, --report <file_name>

If specified, the result will be stored as xml in <file_name>.

-v, --version

Show program version

-P, --pipe <pipe_name>

If specified, send the result to named pipe <pipe_name> in JSON. Object format:

{
    "SourceFile": "D:\\php.ini",
    "Function": "allow_url_fopen",
    "Exploit": "",
    "ExistingValue": "1",
    "RecommendedValue": "0",
    "NumberLine": 13,
    "Place": "'7e00f59e-0'",
    "RawLine": "allow_url_fopen = 1",
    "Type": "php.ini allow_url_fopen"
}
  • SourceFile - name of file, where weakness has been detected;
  • Function - name of an option/ditective/attribute;
  • Exploit - reserved field;
  • ExistingValue - current value of an option/ditective/attribute;
  • RecommendedValue - recommended value of an option/ditective/attribute;
  • NumberLine - line number in SourceFile where weakness has been detected;
  • Place - unique identifier of detected weakness;
  • RawLine - text segment, located in NumberLine;
  • Type - type of detected weakness;

--user-rules <file_name>

If specified, additional rules of configuration checking will be taken from <file_name> and used in analysis.

--preprocessing

run PT.Config in preprocessing mode

--logs-dir <file_name>

If specified, set path to directory, where logs will be saved. Default: %LOCALAPPDATA%\PT.Config\logs

--temp-dir <file_name>

Reserved parameter

--result-protocol

Reserved parameter