Skip to content

Instantly share code, notes, and snippets.

mkol5222 / Get-AzureADPSPermissionGrants.ps1
Created Jun 16, 2022 — forked from psignoret/Get-AzureADPSPermissionGrants.ps1
Get all permissions granted to an app in Azure AD
View Get-AzureADPSPermissionGrants.ps1
Lists delegated permission grants (OAuth2PermissionGrants) and application permissions grants (AppRoleAssignments) granted to an app.
The ObjectId of the ServicePrincipal object for the app in question.
The AppId of the ServicePrincipal object for the app in question.
curl -X POST \
-H "Authorization: Bearer $SLACK_TOKEN" \
-H "Content-type: application/json; charset=utf-8" \
--data '{"channel":"'$SLACK_CHANNEL'","text":"'"$MESSAGE"'"}' \
mkol5222 /
Created Apr 26, 2022 — forked from motemen/
Shell script to setup/push GitHub pages
# usage: push-gh-pages DIRECTORY # DIRECTORY is where GitHub pages contents are in (eg. build)
# LICENSE: Public Domain
set -e
remote=$(git config remote.origin.url)
described_rev=$(git rev-parse HEAD | git name-rev --stdin)
mkol5222 / mssp.ps1
Last active Feb 17, 2022
Infinity Portal license query
View mssp.ps1
function New-CPPortalSession ($key, $secret) {
$body = @{
clientId = $key;
accessKey = $secret
} | ConvertTo-Json
try {
$res = Invoke-RestMethod -Uri "" `
-Headers @{"Content-Type" = "application/json" } `
mkol5222 / ConvertFrom-Xml.ps1
Created Nov 29, 2021 — forked from elvarb/ConvertFrom-Xml.ps1
Powershell to convert XML to JSON
View ConvertFrom-Xml.ps1
# From
# Use
# [xml]$var = Get-Content file.xml
# Convert to JSON with
# $var | ConvertFrom-XML | ConvertTo-JSON -Depth 3
# Helper function that converts a *simple* XML document to a nested hashtable
# with ordered keys.
function ConvertFrom-Xml {
param([parameter(Mandatory, ValueFromPipeline)] [System.Xml.XmlNode] $node)
mkol5222 / ws.ps1
Created Nov 26, 2021 — forked from byt3bl33d3r/ws.ps1
Async Websocket PowerShell client (producer/consumer pattern)
View ws.ps1
$client_id = [System.GUID]::NewGuid()
$recv_queue = New-Object 'System.Collections.Concurrent.ConcurrentQueue[String]'
mkol5222 /
Last active Oct 7, 2020
How to scan Docker image with Check Point shiftleft container image scanner

How to scan Docker container image using Check Point shiftleft command-line scanner


Have your CloudGuard Dome9 API keys ready. They are obtained from Dome 9 web UI at Settings / Credentials section

Env. variable Description
CHKP_CLOUDGUARD_ID your D9 API key identifier ("username")
CHKP_CLOUDGUARD_SECRET D9 API key secret ("password")