Skip to content

Instantly share code, notes, and snippets.

@cube0x0
Created June 2, 2020 07:27
Show Gist options
  • Save cube0x0/5fbbe10f6fe7350e89a901c378e24dd6 to your computer and use it in GitHub Desktop.
Save cube0x0/5fbbe10f6fe7350e89a901c378e24dd6 to your computer and use it in GitHub Desktop.
popup credentials {
item "Export As Owned" {
callback($1);
}
}
sub callback {
local('$template')
$template = "Invoke-Neo4jQuery -Query \"MATCH (n:User) WHERE n.name = 'REPLACEME' SET n.owned = True\" ";
foreach $cred (credentials()) {
$username = $cred["user"] . "@" . $cred["realm"];
$query = strrep($template, 'REPLACEME', uc($username));
println($query);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment