public final class Constant extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACCELERATOR_REDO |
static String |
ACCELERATOR_TRIGGER_KEY |
static String |
ACCELERATOR_UNDO |
static String |
ALPHA_VERSION |
static String |
BETA_VERSION |
static URL |
BLANK_IMAGE_URL |
static String |
DBNAME_TEMPLATE |
String |
DBNAME_UNTITLED |
static String |
DBNAME_UNTITLED_DEFAULT |
String |
DIRBUSTER_CUSTOM_DIR |
String |
DIRBUSTER_DIR |
String |
FILE_CONFIG |
static String |
FILE_CONFIG_DEFAULT
Deprecated.
(2.4.2) The path does not take into account the installation directory, use
getPathDefaultConfigFile() instead. |
static String |
FILE_CONFIG_NAME |
static String |
FILE_PROGRAM_SPLASH |
static String |
FILE_SEPARATOR |
static String |
FOLDER_FILTER
Deprecated.
(2.8.0) Should not be used, the filter functionality is deprecated (replaced by
scripts and Replacer add-on).
|
static String |
FOLDER_LOCAL_PLUGIN |
static String |
FOLDER_PLUGIN |
String |
FOLDER_SESSION |
static String |
FOLDER_SESSION_DEFAULT
The name of the directory where the (file) sessions are saved by default.
|
String |
FUZZER_DIR |
static URL |
HIGH_FLAG_IMAGE_URL |
static URL |
INFO_FLAG_IMAGE_URL |
static String |
LANG_DIR
Name of directory that contains the (source and translated) resource files.
|
static URL |
LOW_FLAG_IMAGE_URL |
static int |
MAX_HOST_CONNECTION |
static int |
MAX_THREADS_PER_SCAN |
static URL |
MED_FLAG_IMAGE_URL |
static I18N |
messages |
static String |
MESSAGES_EXTENSION
Extension (with dot) of Messages.properties files.
|
static String |
MESSAGES_PREFIX
Prefix (file name) of Messages.properties files.
|
static URL |
OK_FLAG_IMAGE_URL |
static String |
PAROS_TEAM |
static String |
PROGRAM_NAME |
static String |
PROGRAM_NAME_SHORT |
static String |
PROGRAM_TITLE |
static String |
PROGRAM_VERSION |
static URL |
SPIDER_IMAGE_URL |
static String |
SYSTEM_PAROS_USER_LOG |
static String |
USER_AGENT |
static String |
VULNERABILITIES_EXTENSION
Extension (with dot) of vulnerabilities.xml files.
|
static String |
VULNERABILITIES_PREFIX
Prefix (file name) of vulnerabilities.xml files.
|
static String |
VULNS_BASE
Deprecated.
(2.4.0) Use
VULNERABILITIES_PREFIX instead. It will be removed in a
following release. |
static String |
ZAP_EXTENSIONS_PAGE
Deprecated.
(2.9.0) Do not use, it will be removed.
|
static String |
ZAP_HOMEPAGE
Deprecated.
(2.9.0) Do not use, it will be removed.
|
static String |
ZAP_TEAM |
Constructor and Description |
---|
Constant() |
Modifier and Type | Method and Description |
---|---|
void |
copyDefaultConfigs(File f,
boolean forceReset) |
static void |
createInstance(ControlOverrides overrides) |
static File |
getContextsDir() |
static String |
getDefaultHomeDirectory(boolean incDevOption) |
static String |
getEyeCatcher() |
static Date |
getInstallDate() |
static Constant |
getInstance() |
static Locale |
getLocale() |
static Path |
getPathDefaultConfigFile()
Returns the path to default configuration file, located in installation directory.
|
static File |
getPoliciesDir() |
static Date |
getReleaseCreateDate() |
static Locale |
getSystemsLocale()
Returns the system's
Locale (as determined by the JVM at startup, Locale.getDefault() ). |
static String |
getZapHome() |
static String |
getZapInstall() |
void |
initializeFilesAndDirectories() |
static boolean |
isDailyBuild() |
static boolean |
isDailyBuild(String version) |
static boolean |
isDevBuild()
Tells whether or not ZAP is running from a dev build.
|
static boolean |
isDevBuild(String version) |
static boolean |
isDevMode()
Tells whether or not the "dev mode" should be enabled.
|
static boolean |
isKali()
Tells whether or not ZAP is running in Kali (and it's not a daily build).
|
static boolean |
isLinux() |
static boolean |
isLowMemoryOptionSet() |
static boolean |
isMacOsX() |
static boolean |
isSilent()
If true then ZAP should not make any unsolicited requests, e.g.
|
static boolean |
isWindows() |
static void |
setDevMode(boolean devMode)
Sets whether or not the "dev mode" should be enabled.
|
static void |
setEyeCatcher(String eyeCatcher) |
static void |
setLocale(String loc) |
static void |
setLowMemoryOption(boolean lowMem) |
static void |
setSilent(boolean silent)
Sets whether or not ZAP should be 'silent' i.e.
|
static void |
setZapHome(String dir) |
static void |
setZapInstall(String dir) |
public static final String PROGRAM_NAME
public static final String PROGRAM_NAME_SHORT
@Deprecated public static final String ZAP_HOMEPAGE
@Deprecated public static final String ZAP_EXTENSIONS_PAGE
public static final String ZAP_TEAM
public static final String PAROS_TEAM
public static final String ALPHA_VERSION
public static final String BETA_VERSION
public static String PROGRAM_VERSION
public static String PROGRAM_TITLE
public static final String SYSTEM_PAROS_USER_LOG
public static final String FILE_SEPARATOR
@Deprecated public static final String FILE_CONFIG_DEFAULT
getPathDefaultConfigFile()
instead.public static final String FILE_CONFIG_NAME
public static final String FOLDER_PLUGIN
@Deprecated public static final String FOLDER_FILTER
getZapHome()
as the parent directory).public static final String FOLDER_SESSION_DEFAULT
public static final String DBNAME_TEMPLATE
public static final String MESSAGES_PREFIX
MESSAGES_EXTENSION
,
Constant Field Valuespublic static final String MESSAGES_EXTENSION
MESSAGES_PREFIX
,
Constant Field Valuespublic static final String DBNAME_UNTITLED_DEFAULT
public String FILE_CONFIG
public String FOLDER_SESSION
public String DBNAME_UNTITLED
public static final String FILE_PROGRAM_SPLASH
public static String ACCELERATOR_UNDO
public static String ACCELERATOR_REDO
public static String ACCELERATOR_TRIGGER_KEY
public static final int MAX_HOST_CONNECTION
public static final int MAX_THREADS_PER_SCAN
public static final String USER_AGENT
public static I18N messages
public static final String LANG_DIR
public static final String VULNERABILITIES_PREFIX
VULNERABILITIES_EXTENSION
,
Constant Field Values@Deprecated public static String VULNS_BASE
VULNERABILITIES_PREFIX
instead. It will be removed in a
following release.public static final String VULNERABILITIES_EXTENSION
VULNERABILITIES_PREFIX
,
Constant Field Valuespublic String DIRBUSTER_DIR
public String DIRBUSTER_CUSTOM_DIR
public String FUZZER_DIR
public static String FOLDER_LOCAL_PLUGIN
public static final URL OK_FLAG_IMAGE_URL
public static final URL INFO_FLAG_IMAGE_URL
public static final URL LOW_FLAG_IMAGE_URL
public static final URL MED_FLAG_IMAGE_URL
public static final URL HIGH_FLAG_IMAGE_URL
public static final URL BLANK_IMAGE_URL
public static final URL SPIDER_IMAGE_URL
public static String getEyeCatcher()
public static void setEyeCatcher(String eyeCatcher)
public static String getDefaultHomeDirectory(boolean incDevOption)
public void copyDefaultConfigs(File f, boolean forceReset) throws IOException, org.apache.commons.configuration.ConfigurationException
IOException
org.apache.commons.configuration.ConfigurationException
public void initializeFilesAndDirectories()
public static void setLocale(String loc)
public static Locale getLocale()
public static Locale getSystemsLocale()
Locale
(as determined by the JVM at startup, Locale.getDefault()
). Should be used to show locale dependent information in the system's
locale.
Note: The default locale is overridden with the ZAP's user defined locale/language.
Locale
Locale.setDefault(Locale)
public static Constant getInstance()
public static void createInstance(ControlOverrides overrides)
public static boolean isWindows()
public static boolean isLinux()
public static boolean isMacOsX()
public static void setZapHome(String dir)
public static String getZapHome()
public static Path getPathDefaultConfigFile()
Note: The default configuration file is not guaranteed to exist, for example, when running just with ZAP JAR.
Path
to default configuration file.public static File getContextsDir()
public static File getPoliciesDir()
public static void setZapInstall(String dir)
public static String getZapInstall()
public static Date getReleaseCreateDate()
public static Date getInstallDate()
public static boolean isDevMode()
Should be used to enable development related utilities/functionalities.
true
if the "dev mode" should be enabled, false
otherwise.public static void setDevMode(boolean devMode)
Note: This method should be called only by bootstrap classes.
devMode
- true
if the "dev mode" should be enabled, false
otherwise.public static void setSilent(boolean silent)
Note: This method should be called only by bootstrap classes.
silent
- true
if ZAP should be silent, false
otherwise.public static boolean isDevBuild()
true
if it's a dev build, false
otherwise.isDevMode()
public static boolean isDevBuild(String version)
public static boolean isDailyBuild(String version)
public static boolean isDailyBuild()
public static boolean isSilent()
public static void setLowMemoryOption(boolean lowMem)
public static boolean isLowMemoryOptionSet()
public static boolean isKali()
true
if running in Kali (and it's not daily build), false
otherwise