public IApiResult ClearStats(string apikey, string keyPrefix) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("keyPrefix", keyPrefix); return(_zapClient.CallApi(Component, ActionTypes.Action, "clearStats", parameters)); }
/// <summary> /// Enables all passive scanners with the given IDs (comma separated list of IDs) /// </summary> /// <param name="apikey">The api key for the Zap-server</param> /// <param name="ids">Comma separated list of IDs</param> /// <returns>Result of the action</returns> public IApiResult EnableScanners(string apikey, string ids) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("ids", ids); return(_zapClient.CallApi(Component, ActionTypes.Action, "enableScanners", parameters)); }
public IApiResult Scan(string apikey, string url, IDictionary <string, string> param = null) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey, param); parameters.Add("url", url); return(_zapClient.CallApi(Component, ActionTypes.Action, "scan", parameters)); }
public IApiResult LoadSession(string apikey, string name) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("name", name); return(_zapClient.CallApi(Component, ActionTypes.Action, "loadSession", parameters)); }
public IApiResult ExcludeFromScan(string apikey, string regex) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("regex", regex); return(_zapClient.CallApi(Component, ActionTypes.Action, "excludeFromScan", parameters)); }
public IApiResult SetHomeDirectory(string apikey, string dir) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("dir", dir); return(_zapClient.CallApi(Component, ActionTypes.Action, "setHomeDirectory", parameters)); }
public IApiResult UnsetActiveSession(string apikey, string site) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("site", site); return(_zapClient.CallApi(Component, ActionTypes.Action, "unsetActiveSession", parameters)); }
private IApiResult SetScanners(string apikey, string ids, string action) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("ids", ids); return(_zapClient.CallApi(Component, ActionTypes.Action, action, parameters)); }
public IApiResult SetOptionHandleParameters(string apikey, string param) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("param", param); return(_zapClient.CallApi(Component, ActionTypes.Action, "setOptionHandleParameters", parameters)); }
public IApiResult SetForcedUserModeEnabled(string apikey, bool option) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("boolean", option.ToString()); return(_zapClient.CallApi(Component, ActionTypes.Action, "setForcedUserModeEnabled", parameters)); }
public IApiResult RemoveContext(string apikey, string contextName) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextName", contextName); return(_zapClient.CallApi(Component, ActionTypes.Action, "removeContext", parameters)); }
public IApiResult Stop(string apikey, string scanId) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("scanId", scanId); return(_zapClient.CallApi(Component, ActionTypes.Action, "stop", parameters)); }
/// <summary> /// Sets whether or not the passive scanning is enabled /// </summary> /// <param name="apikey">The api key for the Zap-server</param> /// <param name="enabled">If scanning should be set enabled</param> /// <returns>Result of the action</returns> public IApiResult SetEnabled(string apikey, bool enabled) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("enabled", enabled.ToString()); return(_zapClient.CallApi(Component, ActionTypes.Action, "setEnabled", parameters)); }
/// <summary> /// Sets if shows hidden fields and enables disabled fields /// </summary> /// <param name="apikey">The api key for the Zap-server</param> /// <param name="reveal">If reveal should be enabled</param> /// <returns>Result of the action</returns> public IApiResult SetReveal(string apikey, bool reveal) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("reveal", reveal.ToString()); return(_zapClient.CallApi(Component, ActionTypes.Action, "setReveal", parameters)); }
public IApiResult RemoveScanPolicy(string apikey, string scanPolicyName) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("scanPolicyName", scanPolicyName); return(_zapClient.CallApi(Component, ActionTypes.Action, "removeScanPolicy", parameters)); }
public IApiResult ExcludeAllContextTechnologies(string apikey, string contextName) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextName", contextName); return(_zapClient.CallApi(Component, ActionTypes.Action, "excludeAllContextTechnologies", parameters)); }
internal IApiResult ActionWithParameter <T>(string apikey, T option, string action) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); var parameter = GetParameterName(typeof(T)); parameters.Add(parameter, option.ToString()); return(_zapClient.CallApi(_component, ActionTypes.Action, action, parameters)); }
private IApiResult SetContextTechnologies(string apikey, string contextName, string technologyNames, string action) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextName", contextName); parameters.Add("technologyNames", technologyNames); return(_zapClient.CallApi(Component, ActionTypes.Action, action, parameters)); }
public IApiResult SetContextInScope(string apikey, string contextName, bool inScope) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextName", contextName); parameters.Add("booleanInScope", inScope.ToString()); return(_zapClient.CallApi(Component, ActionTypes.Action, "setContextInScope", parameters)); }
public IApiResult SetLoggedOutIndicator(string apikey, string contextId, string loggedOutIndicatorRegex) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextId", contextId); parameters.Add("loggedOutIndicatorRegex", loggedOutIndicatorRegex); return(_zapClient.CallApi(Component, ActionTypes.Action, "setLoggedOutIndicator", parameters)); }
private IApiResult SetContext(string apikey, string contextName, string regex, string action) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextName", contextName); parameters.Add("regex", regex); return(_zapClient.CallApi(Component, ActionTypes.Action, action, parameters)); }
public IApiResult ScanAsUser(string apikey, string url, string contextId, string userId, IDictionary <string, string> parameters = null) { parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey, parameters); parameters.Add("url", url); parameters.Add("contextId", contextId); parameters.Add("userId", userId); return(_zapClient.CallApi(Component, ActionTypes.Action, "scanAsUser", parameters)); }
private IApiResult SetSession(string apikey, string site, string session, string action) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("site", site); parameters.Add("session", session); return(_zapClient.CallApi(Component, ActionTypes.Action, action, parameters)); }
/// <summary> /// Sets the alert threshold of the passive scanner with the given ID, accepted values for alert threshold: OFF, DEFAULT, LOW, MEDIUM and HIGH /// </summary> /// <param name="apikey">The api key for the Zap-server</param> /// <param name="id">ID of the passive scanner</param> /// <param name="alertThreshold">Accepted values for alert threshold: OFF, DEFAULT, LOW, MEDIUM and HIGH</param> /// <returns>Result of the action</returns> public IApiResult SetScannerAlertThreshold(string apikey, string id, AlertThreshold alertThreshold) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("id", id); parameters.Add("alertThreshold", alertThreshold.ToString()); return(_zapClient.CallApi(Component, ActionTypes.Action, "setScannerAlertThreshold", parameters)); }
public IApiResult RemoveUser(string apikey, string contextId, string userId) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextId", contextId); parameters.Add("userId", userId); return(_zapClient.CallApi(Component, ActionTypes.Action, "removeUser", parameters)); }
public IApiResult NewUser(string apikey, string contextId, string name) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("contextId", contextId); parameters.Add("name", name); return(_zapClient.CallApi(Component, ActionTypes.Action, "newUser", parameters)); }
public IApiResult SetSessionTokenValue(string apikey, string session, string sessionToken, string tokenValue) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("session", session); parameters.Add("sessionToken", sessionToken); parameters.Add("tokenValue", tokenValue); return(_zapClient.CallApi(Component, ActionTypes.Action, "setSessionTokenValue", parameters)); }
/// <summary> /// Break /// </summary> /// <param name="apikey">The api key for the Zap-server</param> /// <param name="type">Type</param> /// <param name="scope">Scope</param> /// <param name="state">State</param> /// <returns>Result of the action</returns> public IApiResult Break(string apikey, string type, string scope, string state) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("type", type); parameters.Add("scope", scope); parameters.Add("state", state); return(_zapClient.CallApi(Component, ActionTypes.Action, "break", parameters)); }
public IApiResult RenameSession(string apikey, string site, string oldSessionName, string newSessionName) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); parameters.Add("site", site); parameters.Add("oldSessionName", oldSessionName); parameters.Add("newSessionName", newSessionName); return(_zapClient.CallApi(Component, ActionTypes.Action, "renameSession", parameters)); }
private IApiResult SetAllScanners(string apikey, string scanPolicyName, string action) { var parameters = ApikeyHelper.ReturnParameterDictFromApikey(apikey); if (scanPolicyName != null) { parameters.Add("scanPolicyName", scanPolicyName); } return(_zapClient.CallApi(Component, ActionTypes.Action, action, parameters)); }