From 66baf9b576a54897eca6321c1b54ea15bf7c1d17 Mon Sep 17 00:00:00 2001 From: "jwebster@protectedtrust.com" Date: Thu, 8 Jan 2026 18:49:11 -0500 Subject: [PATCH] Added some DNS Protection APIs --- .../Statistics/Get-WebrootStatisticsDNSP.ps1 | 27 ++++++++++++++ ...et-WebrootStatisticsEndpointProtection.ps1 | 28 ++++++++++++++ .../Get-WebrootEndpointStatusDNSP.ps1 | 35 ++++++++++++++++++ .../Get-WebrootEndpointStatusGSMDNSP.ps1 | 35 ++++++++++++++++++ WebrootUnity/WebrootUnity.psd1 | Bin 12750 -> 13024 bytes 5 files changed, 125 insertions(+) create mode 100644 WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsDNSP.ps1 create mode 100644 WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsEndpointProtection.ps1 create mode 100644 WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusDNSP.ps1 create mode 100644 WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusGSMDNSP.ps1 diff --git a/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsDNSP.ps1 b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsDNSP.ps1 new file mode 100644 index 0000000..c6e5cbc --- /dev/null +++ b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsDNSP.ps1 @@ -0,0 +1,27 @@ +function Get-WebrootStatisticsDNSP { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-console-gsm-gsmKey-sites-siteId-statistics-dnsp + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $siteId + ) + + if($siteId) + { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/sites/$($SiteId)/statistics/dnsp" + } else { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/statistics/dnsp" + } + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsEndpointProtection.ps1 b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsEndpointProtection.ps1 new file mode 100644 index 0000000..1cebbcb --- /dev/null +++ b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsEndpointProtection.ps1 @@ -0,0 +1,28 @@ +function Get-WebrootStatisticsEndpointProtection { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-console-gsm-gsmKey-sites-siteId-statistics-endpointprotection + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $siteId + ) + + if($siteId) + { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/sites/$($siteId)/statistics/endpointprotection" + } else { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/statistics/endpointprotection" + } + + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusDNSP.ps1 b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusDNSP.ps1 new file mode 100644 index 0000000..bdbf5a8 --- /dev/null +++ b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusDNSP.ps1 @@ -0,0 +1,35 @@ +function Get-WebrootEndpointStatusDNSP { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-status-site-dnsp-keyCode_machineId_modifiedSince_batchSize_continuation + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $machineId, + $returnedInfo, + $modifiedSince, + [int]$batchSize, + $continuation, + [switch]$All + ) + + $url = "https://unityapi.webrootcloudav.com/service/api/status/site/dnsp/$($keyCode)?machineId=$($machineId)&returnedInfo=$($returnedInfo)&modifiedSince=$($modifiedSince)&batchSize=$($batchSize)&continuation=$($continuation)" + + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + if($All){ + while($Obj.ContinuationURI){ + Connect-WebrootUnity + $Obj = Invoke-RestMethod -Method Get -uri $Obj.ContinuationURI -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + } + } + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusGSMDNSP.ps1 b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusGSMDNSP.ps1 new file mode 100644 index 0000000..f05dfd3 --- /dev/null +++ b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusGSMDNSP.ps1 @@ -0,0 +1,35 @@ +function Get-WebrootEndpointStatusGSMDNSP { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-status-gsm-dnsp-keyCode_machineId_modifiedSince_batchSize_continuation + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $machineId, + $returnedInfo, + $modifiedSince, + [int]$batchSize, + $continuation, + [switch]$All + ) + + $url = "https://unityapi.webrootcloudav.com/service/api/status/gsm/dnsp/$($KeyCode)?machineId=$($machineId)&returnedInfo=$($returnedInfo)&modifiedSince=$($modifiedSince)&batchSize=$($batchSize)&continuation=$($continuation)" + + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + if($All){ + while($Obj.ContinuationURI){ + Connect-WebrootUnity + $Obj = Invoke-RestMethod -Method Get -uri $Obj.ContinuationURI -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + } + } + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/WebrootUnity.psd1 b/WebrootUnity/WebrootUnity.psd1 index 87f60477a825ccbf07193659b5da28fbde174a89..1402443ecd369a928ea2f79d04f114206d8650e8 100644 GIT binary patch delta 116 zcmX??{2+A$lj3AI8L7#u6lB<482lK583HC3ipm1{O2~ZSV1^QgL?F&&C