I hereby claim:
- I am jborean93 on github.
- I am jborean93 (https://keybase.io/jborean93) on keybase.
- I have a public key ASBK396SPyaXDgm1YsnDbsIuacm8LKPknZa0C4omPUU8SAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Add-Type -Namespace Win32 -Name NativeMethods -MemberDefinition @' | |
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] | |
[return: MarshalAs(UnmanagedType.I1)] | |
public static extern bool CreateSymbolicLinkW( | |
string lpSymlinkFileName, | |
string lpTargetFileName, | |
UInt32 dwFlags); | |
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] | |
public static extern bool RemoveDirectoryW( |
<# | |
This does not work due to the unsupported CTL_CODE used in DeviceIoControl | |
DeviceIoControl() get buffer size failed - Incorrect function (Win32 ErrorCode 1 - 0x00000001) | |
At C:\temp\enumerate_snapshots.ps1:145 char:1 | |
+ Get-ShadowCopy -Path "\\localhost\c$" | |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException | |
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ShadowCopy | |
#> |
Add-Type -TypeDefinition @' | |
using System; | |
using System.Runtime.InteropServices; | |
namespace ProcessInfo | |
{ | |
public class NativeMethods | |
{ | |
[DllImport("User32.dll", SetLastError = true)] | |
public static extern bool CloseDesktop( |
# Copyright: (c) 2019, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
<# | |
The cmdlets in this script can be used to install a PowerShell module from a nupkg as well as some logic to get the | |
nupkg URI from either the PowerShell Gallery or a GitHub release asset. The PowerShell Gallery is the most reliable | |
function to use as a nupkg is guaranteed to be there and a GitHub release must have explicitly added the nupkg itself. | |
You can run this by doing: |
Add-Type -TypeDefinition @' | |
using Microsoft.Win32.SafeHandles; | |
using System; | |
using System.IO; | |
using System.Runtime.ConstrainedExecution; | |
using System.Runtime.InteropServices; | |
namespace FileIO | |
{ | |
public class NativeHelpers |
# Copyright: (c) 2019, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
$pinvokeParams = @{ | |
IgnoreWarnings = $true | |
WarningAction = 'Ignore' | |
TypeDefinition = @' | |
using Microsoft.Win32.SafeHandles; | |
using System; | |
using System.Collections; |
# Copyright: (c) 2020, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Add-Type -Namespace LogonUtil -Name NativeMethods -MemberDefinition @' | |
[DllImport("Kernel32.dll", SetLastError = true)] | |
public static extern bool CloseHandle( | |
IntPtr hObject); | |
[DllImport("Advapi32.dll", SetLastError = true)] | |
public static extern bool ImpersonateLoggedOnUser( |
#!/usr/bin/env python | |
import json | |
import operator | |
import os | |
def get_raw_test_targets(test_path): | |
with open(test_path, mode='rb') as fd: | |
test_info = json.loads(fd.read().decode('utf-8')) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# PYTHON_ARGCOMPLETE_OK | |
# Copyright: (c) 2020, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
""" | |
Script that can be used to copy issues and PRs from the Ansible GitHub repo to it's target collection repo. Current | |
limitations are; |