source
stringclasses
1 value
repo
stringclasses
33 values
repo_url
stringclasses
33 values
path
stringlengths
7
179
language
stringclasses
1 value
license
stringclasses
4 values
stars
int64
2.27k
53.4k
ref
stringclasses
4 values
size_bytes
int64
48
259k
text
stringlengths
48
259k
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
profile.example.ps1
PowerShell
mit
8,175
master
911
# Import the posh-git module, first via installed posh-git module. # If the module isn't installed, then attempt to load it from the cloned posh-git Git repo. $poshGitModule = Get-Module posh-git -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1 if ($poshGitModule) { $poshGitModule | Import-...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
PSScriptAnalyzerSettings.psd1
PowerShell
mit
8,175
master
1,583
@{ # Use Severity when you want to limit the generated diagnostic records to a # subset of: Error, Warning and Information. # Uncomment the following line if you only want Errors and Warnings but # not Information diagnostic records. Severity = @('Error','Warning') # Use IncludeRules when you w...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/ConsoleMode.ps1
PowerShell
mit
8,175
master
3,527
# Hack! https://gist.github.com/lzybkr/f2059cb2ee8d0c13c65ab933b75e998c # Always skip setting the console mode on non-Windows platforms. if (($PSVersionTable.PSVersion.Major -ge 6) -and !$IsWindows) { function Set-ConsoleMode { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateC...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/PoshGitTypes.ps1
PowerShell
mit
8,175
master
11,602
enum BranchBehindAndAheadDisplayOptions { Full; Compact; Minimal } enum UntrackedFilesMode { Default; No; Normal; All } class PoshGitCellColor { [psobject]$BackgroundColor [psobject]$ForegroundColor PoshGitCellColor() { $this.ForegroundColor = $null $this.BackgroundColor = $null } ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/CheckRequirements.ps1
PowerShell
mit
8,175
master
1,276
$global:GitMissing = $false $script:GitCygwin = $false $script:GitVersion = $requiredVersion = [System.Version]'2.15' if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) { Write-Warning "git command could not be found. Please create an alias or add it to your PATH." $global:GitMissing = $true ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/posh-git.psm1
PowerShell
mit
8,175
master
7,325
param([bool]$ForcePoshGitPrompt, [bool]$UseLegacyTabExpansion, [bool]$EnableProxyFunctionExpansion) if (Test-Path Env:\POSHGIT_ENABLE_STRICTMODE) { # Set strict mode to latest to help catch scripting errors in the module. This is done by the Pester tests. Set-StrictMode -Version Latest } . $PSScriptRoot\Check...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/Utils.ps1
PowerShell
mit
8,175
master
18,388
# Need this variable as long as we support PS v2 $ModuleBasePath = Split-Path $MyInvocation.MyCommand.Path -Parent # Store error records generated by stderr output when invoking an executable # This can be accessed from the user's session by executing: # PS> $m = Get-Module posh-git # PS> & $m Get-Variable invokeError...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/TortoiseGit.ps1
PowerShell
mit
8,175
master
2,596
# TortoiseGit function private:Get-TortoiseGitPath { if ((Test-Path "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe") -eq $true) { # TortoiseGit 1.8.0 renamed TortoiseProc to TortoiseGitProc. return "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" } return "C:\Program Files\Tor...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/posh-git.psd1
PowerShell
mit
8,175
master
2,543
@{ # Script module or binary module file associated with this manifest. RootModule = 'posh-git.psm1' # Version number of this module. ModuleVersion = '1.1.0.1' # ID used to uniquely identify this module GUID = '74c9fd30-734b-4c89-a8ae-7727ad21d1d5' # Author of this module Author = 'Keith Dahlby, Keith Hill, and con...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/GitTabExpansion.ps1
PowerShell
mit
8,175
master
23,459
# Initial implementation by Jeremy Skinner # http://www.jeremyskinner.co.uk/2010/03/07/using-git-with-windows-powershell/ $Global:GitTabSettings = New-Object PSObject -Property @{ AllCommands = $false KnownAliases = @{ '!f() { exec vsts code pr "$@"; }; f' = 'vsts.pr' } EnableLogging = $false ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/WindowTitle.ps1
PowerShell
mit
8,175
master
2,850
$HostSupportsSettingWindowTitle = $null $OriginalWindowTitle = $null function Test-WindowTitleIsWriteable { if ($null -eq $HostSupportsSettingWindowTitle) { # Probe $Host.UI.RawUI.WindowTitle to see if it can be set without errors try { $script:OriginalWindowTitle = $Host.UI.RawUI.Windo...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/AnsiUtils.ps1
PowerShell
mit
8,175
master
2,730
# Color codes from https://msdn.microsoft.com/en-us/library/windows/desktop/mt638032(v=vs.85).aspx $ConsoleColorToAnsi = @( 30 # Black 34 # DarkBlue 32 # DarkGreen 36 # DarkCyan 31 # DarkRed 35 # DarkMagenta 33 # DarkYellow 37 # Gray 90 # DarkGray 94 # Blue 92 # Green 96 ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/GitUtils.ps1
PowerShell
mit
8,175
master
28,609
# Inspired by Mark Embling # http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration <# .SYNOPSIS Gets the path to the current repository's .git dir. .DESCRIPTION Gets the path to the current repository's .git dir. Or if the repository is a bare repository, the root directory of t...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/GitPrompt.ps1
PowerShell
mit
8,175
master
31,981
# Inspired by Mark Embling # http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration $global:GitPromptSettings = [PoshGitPromptSettings]::new() $global:GitPromptValues = [PoshGitPromptValues]::new() # Override some of the normal colors if the background color is set to the default DarkMagent...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
src/GitParamTabExpansion.ps1
PowerShell
mit
8,175
master
12,526
# Variable is used in GitTabExpansion.ps1 $shortGitParams = @{ add = 'n v f i p e u A N' bisect = '' blame = 'b L l t S p M C h c f n s e w' branch = 'd D l f m M r a v vv q t u' checkout = 'q f b B t l m p' cherry = 'v' 'cherry-pick' = 'e x r m n s S X' clean = 'd f i n q e x X' clo...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/Get-GitDirectory.Tests.ps1
PowerShell
mit
8,175
master
4,547
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'Get-GitDiretory Tests' { Context "Test normal repository" { BeforeAll { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssigments', '')] $origPath = Get-Location } AfterAll { ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/Get-GitBranch.Tests.ps1
PowerShell
mit
8,175
master
943
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'Get-GitBranch Tests' { Context 'Get-GitBranch GIT_DIR Tests' { It 'Returns GIT_DIR! when in .git dir of the repo' { $repoRoot = (Resolve-Path $PSScriptRoot\..).Path Set-Location $repoRoot\.git -ErrorAction Stop InMod...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/DefaultPrompt.Tests.ps1
PowerShell
mit
8,175
master
24,129
BeforeAll { . $PSScriptRoot\Shared.ps1 [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] $SkipWindowTitleTests = !(& $module Test-WindowTitleIsWriteable) } Describe 'Default Prompt Tests - NO ANSI' { BeforeAll { [System.Diagnostics.CodeAnalysis.Suppre...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/ModuleManifest.Tests.ps1
PowerShell
mit
8,175
master
240
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'Module Manifest Tests' { It 'Passes Test-ModuleManifest' { Test-ModuleManifest -Path $moduleManifestPath | Should -Not -BeNullOrEmpty $? | Should -Be $true } }
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/GitParamTabExpansionVsts.Tests.ps1
PowerShell
mit
8,175
master
2,558
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'ParamsTabExpansion VSTS Tests' { Context 'Push Parameters TabExpansion Tests' { # Create a git alias for 'pr', as if we'd installed vsts-cli BeforeEach { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMo...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/GitParamTabExpansion.Tests.ps1
PowerShell
mit
8,175
master
8,523
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'ParamsTabExpansion Tests' { Context 'Push Parameters TabExpansion Tests' { It 'Tab completes all long push parameters' { $result = & $module GitTabExpansionInternal 'git push --' $result -contains '--all' | Should -Be $true ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/CheckRequirements.Tests.ps1
PowerShell
mit
8,175
master
1,441
# Not using BeforeAll because discovery doesn't like InModuleScope without posh-git loaded . $PSScriptRoot\Shared.ps1 Describe 'Test-GitVersion' { InModuleScope 'posh-git' { It 'Returns true for Git for Windows newer than 2.15 (<_>)' -ForEach @( 'git version 2.33.0.rc2.windows.1', '...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/Ansi.Tests.ps1
PowerShell
mit
8,175
master
783
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'ANSI Tests' { Context 'Returns correct ANSI sequence for specified colors' { It 'Setting BackgroundColor to 0x0 results in Black background' { $ts = & $module.NewBoundScriptBlock({[PoshGitTextSpan]::new("TEST", 0xFF0000, 0)}) $a...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/GitProxyFunctionExpansion.Tests.ps1
PowerShell
mit
8,175
master
17,252
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'Proxy Function Expansion Tests' { Context 'Proxy Function Name TabExpansion Tests' { BeforeEach { if (Test-Path -Path Function:\Invoke-GitFunction) { Rename-Item -Path Function:\Invoke-GitFunction -NewName Invoke-GitFunction...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/Utils.Tests.ps1
PowerShell
mit
8,175
master
11,024
BeforeAll { . $PSScriptRoot\Shared.ps1 . $modulePath\Utils.ps1 } Describe 'Utils Function Tests' { Context 'Add-PoshGitToProfile Tests' { BeforeAll { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssigments', '')] $newLine = [System.Envi...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/TabExpansion.Tests.ps1
PowerShell
mit
8,175
master
16,483
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'TabExpansion function test' -Skip:($PSVersionTable.PSVersion.Major -gt 5) { It 'Windows PowerShell v5 exports a TabExpansion function' { $module.ExportedFunctions.Keys -contains 'TabExpansion' | Should -Be $true } } Describe 'TabExpansion Tests' {...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/GitPrompt.Tests.ps1
PowerShell
mit
8,175
master
1,848
BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'Write-VcsStatus Tests' { BeforeAll { Mock -ModuleName posh-git -CommandName git { $OFS = " " if ($args -contains 'rev-parse') { $res = Invoke-Expression "&$gitbin $args" return $res } ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/Shared.ps1
PowerShell
mit
8,175
master
5,432
# Define these variables since they are not defined in WinPS 5.x if ($PSVersionTable.PSVersion.Major -lt 6) { [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] $IsWindows = $true [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments'...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
test/Get-GitStatus.Tests.ps1
PowerShell
mit
8,175
master
22,668
# For info on Pester mocking see - http://www.powershellmagazine.com/2014/09/30/pester-mock-and-testdrive/ BeforeAll { . $PSScriptRoot\Shared.ps1 } Describe 'Get-GitStatus Tests' { Context 'Get-GitStatus Working Directory Tests' { BeforeAll { Set-Location $PSScriptRoot } It...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
chocolatey/packAndLocalInstall.ps1
PowerShell
mit
8,175
master
478
param ($Remote = 'origin', [switch]$Force) Push-Location $PSScriptRoot $nuspec = [xml](Get-Content poshgit.nuspec) $version = $nuspec.package.metadata.version $tag = "v$version" if ($Force) { git tag -f $tag git push -f $Remote $tag } elseif (!$(git ls-remote $Remote $tag)) { Write-Warning "'$Remote/$tag'...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
chocolatey/tools/chocolateyUninstall.ps1
PowerShell
mit
8,175
master
1,330
try { $poshgitPath = join-path (Get-ToolsLocation) 'poshgit' $currentVersionPath = Get-ChildItem "$poshgitPath\*posh-git*\" | Sort-Object -Property LastWriteTime | Select-Object -Last 1 if(Test-Path $PROFILE) { $oldProfile = @(Get-Content $PROFILE) . $currentVersionPath\src\Utils.ps1 ...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
chocolatey/tools/chocolateyInstall.ps1
PowerShell
mit
8,175
master
1,790
try { $poshgitPath = join-path (Get-ToolsLocation) 'poshgit' try { if (test-path($poshgitPath)) { Write-Host "Attempting to remove existing `'$poshgitPath`'." remove-item $poshgitPath -recurse -force } } catch { Write-Host "Could not remove `'$poshgitPat...
github
dahlbyk/posh-git
https://github.com/dahlbyk/posh-git
chocolatey/tests/InstallChocolatey.Tests.ps1
PowerShell
mit
8,175
master
6,718
$packageName = "poshgit" cpack function Setup-Environment { Cleanup $env:poshGit = join-path (Resolve-Path .\Tests ) dahlbyk-posh-git-60be436.zip $profileScript = "function Prompt(){ `$host.ui.RawUI.WindowTitle = `"My Prompt`" }" (Set-Content $Profile -value $profileScript -Force) } function Cleanup ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
vagrant/ConfigureRemotingForAnsible.ps1
PowerShell
gpl-3.0
7,754
main
15,766
#Requires -Version 3.0 # Configure a Windows host for remote management with Ansible # ----------------------------------------------------------- # # This script checks the current WinRM (PS Remoting) configuration and makes # the necessary changes to allow Ansible to connect, authenticate and # execute PowerShell co...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
vagrant/fix_ip.ps1
PowerShell
gpl-3.0
7,754
main
194
# vmware bug to set the ip # see : https://github.com/hashicorp/vagrant/issues/5000#issuecomment-258209286 param ([String] $ip) netsh.exe int ip set address Ethernet1 static $ip 255.255.255.0
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
vagrant/Install-WMF3Hotfix.ps1
PowerShell
gpl-3.0
7,754
main
5,211
#Requires -Version 3.0 <#PSScriptInfo .VERSION 1.0 .GUID 6cf319d1-8c50-460b-99ee-71b11cf7270d .AUTHOR Jordan Borean <jborean93@gmail.com> .COPYRIGHT Jordan Borean 2017 .TAGS PowerShell,Ansible,WinRM,WMF,Hotfix .LICENSEURI https://github.com/jborean93/ansible-windows/blob/master/LICENSE .PROJECTURI https://g...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/settings/gpo_remove/files/remove-gpo.ps1
PowerShell
gpl-3.0
7,754
main
989
Remove-GPLink -Name "StarkWallpaper" -Target "OU=North,OU=kingdoms,DC=sevenkingdoms,DC=local" -erroraction 'silentlycontinue' #if (!(Get-ItemPropertyValue -Path "HKCU:\Control Panel\Desktop\" -Name "Wallpaper")) { Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name Wallpaper -Value "c:\windows\web\wallpaper\win...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/settings/no_updates/files/noupdate.ps1
PowerShell
gpl-3.0
7,754
main
758
# set the Windows Update service to "disabled" sc.exe config wuauserv start=disabled # stop the service, in case it is running #sc.exe stop wuauserv $ServiceName = 'wuauserv' $arrService = Get-Service -Name $ServiceName if ($arrService.Status -ne 'Stopped') { Stop-Service $ServiceName } # Disable autoupdate #$AUSet...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/adcs_templates/files/ADCSTemplate/ADCSTemplate.psm1
PowerShell
gpl-3.0
7,754
main
20,002
#requires -Version 5.0 -Modules ActiveDirectory Function Get-RandomHex { param ([int]$Length) $Hex = '0123456789ABCDEF' [string]$Return = $null For ($i=1;$i -le $length;$i++) { $Return += $Hex.Substring((Get-Random -Minimum 0 -Maximum 16),1) } Return $Return } Function IsUniqueOID { param ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/adcs_templates/files/ADCSTemplate/Examples/Build-ADCS.ps1
PowerShell
gpl-3.0
7,754
main
13,829
configuration CreateADDomainWithCS { param ( [Parameter(Mandatory)] [String]$DomainName, [Parameter(Mandatory)] [System.Management.Automation.PSCredential]$AdminCreds, [Int]$RetryCount = 60, [Int]$RetryIntervalSec = 5 ) Import-DscResource -ModuleN...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/adcs_templates/files/ADCSTemplate/Examples/Demo.ps1
PowerShell
gpl-3.0
7,754
main
922
break Get-Module -ListAvailable Import-Module ADCSTemplate Get-Command -Module ADCSTemplate # Manually open ADSIEDIT and show objects adsiedit.msc # Manually open MMC to build and browse an AD CS mgmt GUI mmc New-ADCSDrive cd ADCS: dir cd '.\CN=Certificate Templates' dir cd .. cd '.\CN=Enrollment Services' dir cd ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/vulns/adcs_esc13/files/esc13.ps1
PowerShell
gpl-3.0
7,754
main
4,520
# Code from LUDUS ESC13 role # Licence GPL-3.0 # https://github.com/badsectorlabs/ludus_adcs/blob/main/files/esc13.ps1 param( [Parameter(Mandatory=$true)] [string]$esc13group, [Parameter(Mandatory=$true)] [string]$esc13templateName ) # Import modules (just in case) import-module ADCSTemplate imp...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/sccm/config/boundary/library/sccm_boundary_to_boundarygroup.ps1
PowerShell
gpl-3.0
7,754
main
2,288
#!powershell #Requires -Module Ansible.ModuleUtils.Legacy # https://learn.microsoft.com/en-us/powershell/module/configurationmanager/new-cmboundary # sccm_boundary_to_boundarygroup: # boundary_name: "boundary name" # boundary_group: "boundary group name" # site_code: "code" # state: "present" (absent/present...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/sccm/config/boundary/library/sccm_boundary_group.ps1
PowerShell
gpl-3.0
7,754
main
1,907
#!powershell #Requires -Module Ansible.ModuleUtils.Legacy # https://learn.microsoft.com/en-us/powershell/module/configurationmanager/new-cmboundary # sccm_boundary_group: # name: "boundary group name" # server: sccmserver.myad.lab # site_code: "code" # state: "present" (absent/present) $ErrorActionPreference...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/sccm/config/boundary/library/sccm_boundary.ps1
PowerShell
gpl-3.0
7,754
main
2,263
#!powershell #Requires -Module Ansible.ModuleUtils.Legacy # https://learn.microsoft.com/en-us/powershell/module/configurationmanager/new-cmboundary # sccm_boundary: # name: "boundary name" # type: IPSubNet/ADSite/IPv6Prefix/IPRange/VPN # value: "value" (ex: "172.16.50.0/24" / "Default-First-Site-Name" / "10.255...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/laps/dc/library/win_ad_object.ps1
PowerShell
gpl-3.0
7,754
main
5,141
#!powershell # Copyright: (c) 2018, Jordan Borean # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) #Requires -Module Ansible.ModuleUtils.Legacy $ErrorActionPreference = "Stop" $params = Parse-Args -arguments $args -supports_check_mode $true $check_mode = Get-AnsibleParam ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/laps/dc/library/win_gpo.ps1
PowerShell
gpl-3.0
7,754
main
1,589
#!powershell # Copyright: (c) 2018, Jordan Borean # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) #Requires -Module Ansible.ModuleUtils.Legacy $ErrorActionPreference = "Stop" $params = Parse-Args -arguments $args -supports_check_mode $true $check_mode = Get-AnsibleParam ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/laps/dc/library/win_gpo_link.ps1
PowerShell
gpl-3.0
7,754
main
1,808
#!powershell # Copyright: (c) 2018, Jordan Borean # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) #Requires -Module Ansible.ModuleUtils.Legacy $ErrorActionPreference = "Stop" $params = Parse-Args -arguments $args -supports_check_mode $true $check_mode = Get-AnsibleParam ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/laps/dc/library/win_gpo_reg.ps1
PowerShell
gpl-3.0
7,754
main
9,840
#!powershell # Copyright: (c) 2018, Jordan Borean # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) #Requires -Module Ansible.ModuleUtils.Legacy $ErrorActionPreference = "Stop" $params = Parse-Args -arguments $args -supports_check_mode $true $check_mode = Get-AnsibleParam ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/laps/dc/library/win_ad_dacl.ps1
PowerShell
gpl-3.0
7,754
main
6,008
#!powershell # Copyright: (c) 2018, Jordan Borean # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) #Requires -Module Ansible.ModuleUtils.Legacy #Requires -Module Ansible.ModuleUtils.SID $ErrorActionPreference = "Stop" $params = Parse-Args -arguments $args -supports_check_...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ansible/roles/logs_windows/files/uninstall-service-winlogbeat.ps1
PowerShell
gpl-3.0
7,754
main
254
# Delete and stop the service if it already exists. if (Get-Service winlogbeat -ErrorAction SilentlyContinue) { $service = Get-WmiObject -Class Win32_Service -Filter "name='winlogbeat'" $service.StopService() Start-Sleep -s 1 $service.delete() }
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/vagrant/scripts/win-updates.ps1
PowerShell
gpl-3.0
7,754
main
8,488
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '')] param($global:RestartRequired = 0, $global:MoreUpdates = 0, $global:MaxCycles = 5, $MaxUpdatesPerCycle = 500, $BeginWithRestart = 0) $Logfile = "C:\Windows\Temp\win-updates.log" function LogWrite { Param ([string]$logstring) ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/vagrant/scripts/fixnetwork.ps1
PowerShell
gpl-3.0
7,754
main
1,463
# You cannot enable Windows PowerShell Remoting on network connections that are set to Public # Spin through all the network locations and if they are set to Public, set them to Private # using the INetwork interface: # http://msdn.microsoft.com/en-us/library/windows/desktop/aa370750(v=vs.85).aspx # For more info, see...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/vagrant/scripts/vm-guest-tools.ps1
PowerShell
gpl-3.0
7,754
main
6,929
if (!( Test-Path "C:\Windows\Temp\7z1900-x64.msi")) { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi') } if (!(Test-Path "C:\Windows\Temp\7z1900-x64.msi")) { St...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/vagrant/scripts/disable-winrm.ps1
PowerShell
gpl-3.0
7,754
main
369
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=block netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes $winrmService = Get-Service -Name WinRM if ($winrmService.Status -eq "Running") { Disable-PSRemoting -Force } Stop-Service win...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/vagrant/scripts/set-powerplan.ps1
PowerShell
gpl-3.0
7,754
main
546
Try { Write-Output "Set power plan to high performance" $HighPerf = powercfg -l | ForEach-Object { if ($_.contains("High performance")) { $_.split()[3] } } # $HighPerf cannot be $null, we try activate this power profile with powercfg if ($null -eq $HighPerf) { throw "Error: HighPerf is null" } $Curr...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/vagrant/scripts/disable-screensaver.ps1
PowerShell
gpl-3.0
7,754
main
200
Write-Output "Disabling Screensaver" Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord & powercfg -x -monitor-timeout-ac 0 & powercfg -x -monitor-timeout-dc 0
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/vagrant/scripts/enable-winrm.ps1
PowerShell
gpl-3.0
7,754
main
779
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private Enable-PSRemoting -Force winrm quickconfig -q winrm quickconfig -transport:http winrm set winrm/config '@{MaxTimeoutms="1800000"}' winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}' winrm set winrm/config/service '@{AllowUnencrypted=...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/proxmox/scripts/set-proxy.ps1
PowerShell
gpl-3.0
7,754
main
198
$reg = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" Set-ItemProperty -Path $reg -Name ProxyServer -Value "x.x.x.x:8080" Set-ItemProperty -Path $reg -Name ProxyEnable -Value 1
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/proxmox/scripts/enable-winrm.ps1
PowerShell
gpl-3.0
7,754
main
1,205
$NetworkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")) $Connections = $NetworkListManager.GetNetworkConnections() $Connections | ForEach-Object { $_.GetNetwork().SetCategory(1) } Enable-PSRemoting -Force winrm quickconfig -q winrm quickconfig -transp...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/proxmox/scripts/win-updates.ps1
PowerShell
gpl-3.0
7,754
main
8,533
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '')] param($global:RestartRequired = 0, $global:MoreUpdates = 0, $global:MaxCycles = 5, $MaxUpdatesPerCycle = 500, $BeginWithRestart = 0) $Logfile = "C:\Windows\Temp\win-updates.log" function LogWrite { Param ([string]$logstring) ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/proxmox/scripts/sysprep/cloudbase-init.ps1
PowerShell
gpl-3.0
7,754
main
377
# install Cloudbase-Init mkdir "c:\setup" echo "Copy CloudbaseInitSetup_Stable_x64.msi" copy-item "G:\sysprep\CloudbaseInitSetup_Stable_x64.msi" "c:\setup\CloudbaseInitSetup_Stable_x64.msi" -force echo "Start process CloudbaseInitSetup_Stable_x64.msi" start-process -FilePath 'c:\setup\CloudbaseInitSetup_Stable_x64.msi...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
packer/proxmox/scripts/sysprep/cloudbase-init-p2.ps1
PowerShell
gpl-3.0
7,754
main
1,100
while (!(Select-String -Path 'C:\setup\cloud-init.log' -Pattern 'Installation completed successfully' -Quiet)) { echo "Wait cloud-init installation end..." Start-Sleep 5 } echo "Show cloudinit service" Get-Service -Name cloudbase-init echo "Move config files to location" # Move conf files to Cloudbase directo...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
extensions/exchange/ansible/roles/exchange_bot/files/botScheduler.ps1
PowerShell
gpl-3.0
7,754
main
781
$task = '/c powershell c:\setup\readMail.ps1' $repeat = (New-TimeSpan -Minutes 1) $taskName = "exchange_bot" $user = "sevenkingdoms\lysa.arryn" $password = "rob1nIsMyHeart" $action = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "$task" $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
extensions/exchange/ansible/roles/exchange_bot/files/readMail.ps1
PowerShell
gpl-3.0
7,754
main
5,157
Add-Type -Path "C:\Program Files\Microsoft\Exchange Server\V15\Bin\Microsoft.Exchange.WebServices.dll" # mailbox parameters $EmailAddress = "lysa.arryn@sevenkingdoms.local" $Password = "rob1nIsMyHeart" $EwsUrl = "https://the-eyrie/EWS/Exchange.asmx" $DownloadPath = "$env:TEMP\ExchangeAttachments\" # Create download f...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/ntlm_relay.ps1
PowerShell
gpl-3.0
7,754
main
852
$task = '/c powershell New-PSDrive -Name "Public" -PSProvider "FileSystem" -Root "\\Meren\Private"' $repeat = (New-TimeSpan -Minutes 5) $taskName = "ntlm_bot" $user = "north.sevenkingdoms.local\eddard.stark" $password = "FightP3aceAndHonor!" $action = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "$task" $trigg...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/constrained_delegation_use_any.ps1
PowerShell
gpl-3.0
7,754
main
428
# https://www.thehacker.recipes/ad/movement/kerberos/delegations/constrained#with-protocol-transition Set-ADUser -Identity "jon.snow" -ServicePrincipalNames @{Add='CIFS/winterfell.north.sevenkingdoms.local'} Get-ADUser -Identity "jon.snow" | Set-ADAccountControl -TrustedToAuthForDelegation $true Set-ADUser -Identity "j...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/constrained_delegation_kerb_only.ps1
PowerShell
gpl-3.0
7,754
main
500
# https://www.thehacker.recipes/ad/movement/kerberos/delegations/constrained#without-protocol-transition Set-ADComputer -Identity "castelblack$" -ServicePrincipalNames @{Add='HTTP/winterfell.north.sevenkingdoms.local'} Set-ADComputer -Identity "castelblack$" -Add @{'msDS-AllowedToDelegateTo'=@('HTTP/winterfell.north.se...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/rdp_scheduler.ps1
PowerShell
gpl-3.0
7,754
main
885
$task = '/c powershell c:\setup\bot_rdp.ps1' $repeat = (New-TimeSpan -Minutes 1) $taskName = "connect_bot" $user = "north\robb.stark" $password = "sexywolfy" $action = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "$task" $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval $repeat $setti...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/responder.ps1
PowerShell
gpl-3.0
7,754
main
846
$task = '/c powershell New-PSDrive -Name "Public" -PSProvider "FileSystem" -Root "\\Bravos\private"' $repeat = (New-TimeSpan -Minutes 2) $taskName = "responder_bot" $user = "north.sevenkingdoms.local\robb.stark" $password = "sexywolfy" $action = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "$task" $trigger = N...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/gpo_abuse.ps1
PowerShell
gpl-3.0
7,754
main
1,857
Install-WindowsFeature -Name GPMC $gpo_exist = Get-GPO -Name "StarkWallpaper" -erroraction ignore if ($gpo_exist) { # Do nothing #Remove-GPO -Name "StarkWallpaper" #Remove the link of the GPO Remove-StarkWallpaper if it exists #Remove-GPLink -Name "StarkWallpaper" -Target "DC=north,DC=sevenkingdoms,DC=...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/archive/anonymous_ldap.ps1
PowerShell
gpl-3.0
7,754
main
445
$anonymousId = New-Object System.Security.Principal.NTAccount "NT AUTHORITY\ANONYMOUS LOGON" $secInheritanceAll = [System.DirectoryServices.ActiveDirectorySecurityInheritance] "All" $Ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule $anonymousId,"ReadProperty, GenericExecute","Allow",$secInheritanceAl...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/scripts/archive/acl.ps1
PowerShell
gpl-3.0
7,754
main
6,616
# https://github.com/davidprowe/BadBlood/blob/master/AD_OU_SetACL/Full%20Control%20Permissions.ps1 Import-Module ActiveDirectory Set-Location AD: ########################################################################################################### # SetAcl $for ---- $right ----> $to ############################...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/files/dc02/bot_rdp.ps1
PowerShell
gpl-3.0
7,754
main
332
# https://learn.microsoft.com/fr-fr/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon if(-not(query session robb.stark /server:castelblack)) { #kill process if exist Get-Process mstsc -IncludeUserName | Where {$_.UserName -eq "NORTH\robb.stark"}|Stop-Process #run the command mstsc /v:c...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/files/dc02/sysvol_scripts/script.ps1
PowerShell
gpl-3.0
7,754
main
165
# fake script in netlogon with creds $task = '/c TODO' $taskName = "fake task" $user = "NORTH\jeor.mormont" $password = "_L0ngCl@w_" # passwords in sysvol still ...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD-Light/files/dc02/sysvol_scripts/secret.ps1
PowerShell
gpl-3.0
7,754
main
869
# cypher script # $domain="sevenkingdoms.local" # $EncryptionKeyBytes = New-Object Byte[] 32 # [Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($EncryptionKeyBytes) # $EncryptionKeyBytes | Out-File "encryption.key" # $EncryptionKeyData = Get-Content "encryption.key" # Read-Host -AsSecureString | Conv...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/GOAD/scripts/constrained_delegation_use_any.ps1
PowerShell
gpl-3.0
7,754
main
323
Set-ADUser -Identity "jon.snow" -ServicePrincipalNames @{Add='CIFS/thewall.north.sevenkingdoms.local'} Get-ADUser -Identity "jon.snow" | Set-ADAccountControl -TrustedToAuthForDelegation $true Set-ADUser -Identity "jon.snow" -Add @{'msDS-AllowedToDelegateTo'=@('CIFS/winterfell.north.sevenkingdoms.local','CIFS/winterfell...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/NHA/scripts/constrained_delegation_use_any.ps1
PowerShell
gpl-3.0
7,754
main
401
# https://www.thehacker.recipes/ad/movement/kerberos/delegations/constrained#with-protocol-transition Set-ADUser -Identity "frank" -ServicePrincipalNames @{Add='eventlog/share.academy.ninja.lan'} Get-ADUser -Identity "frank" | Set-ADAccountControl -TrustedToAuthForDelegation $true Set-ADUser -Identity "frank" -Add @{'m...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/NHA/files/bot.ps1
PowerShell
gpl-3.0
7,754
main
282
$pass=ConvertTo-SecureString 'Il0ve!R4men_<3' -AsPlainText -Force; $creds=New-Object System.Management.Automation.PSCredential ('academy.ninja.lan\frank', $pass); Invoke-Command -Computername web.academy.ninja.lan -ScriptBlock {sleep 55} -Authentication 'Credssp' -Credential $creds
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/DRACARYS/files/srv01/bot_ssh.ps1
PowerShell
gpl-3.0
7,754
main
175
$User = "viserion" $SSHHost = "syrax" $Password = "aLHtz1WvIVmeV4Zh4CDE" & "C:\Program Files\PuTTY\klink.exe" -auto_store_sshkey $SSHHost -l "$User" -pw $Password "sleep 45"
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/DRACARYS/files/dc01/keepass_bot.ps1
PowerShell
gpl-3.0
7,754
main
823
$pass = ConvertTo-SecureString 'ufsmcvDaFz1uEqzAtaiL' -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential ( 'dracarys.lab\rhaegal', $pass ) Invoke-Command ` -ComputerName vhagar.dracarys.lab ` -Authentication Credssp ` -Credential $creds ` -ScriptBlock { $k...
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/DRACARYS/scripts/wsman_kerb.ps1
PowerShell
gpl-3.0
7,754
main
194
Set-ADComputer -Identity "vhagar$" -ServicePrincipalNames @{Add='WSMAN/vhagar.dracarys.lab'} Set-ADComputer -Identity "vhagar$" -Add @{'msDS-AllowedToDelegateTo'=@('WSMAN/vhagar.dracarys.lab')}
github
Orange-Cyberdefense/GOAD
https://github.com/Orange-Cyberdefense/GOAD
ad/MINILAB/files/bot.ps1
PowerShell
gpl-3.0
7,754
main
258
$pass=ConvertTo-SecureString '123456789' -AsPlainText -Force; $creds=New-Object System.Management.Automation.PSCredential ('mini.lab\carol', $pass); Invoke-Command -Computername ws.mini.lab -ScriptBlock {sleep 30} -Authentication 'Credssp' -Credential $creds
github
mandiant/commando-vm
https://github.com/mandiant/commando-vm
install.ps1
PowerShell
apache-2.0
7,571
main
89,688
<# .SYNOPSIS Installation script for CommandoVM. .DESCRIPTION Placeholder .PARAMETER cli Switch parameter to skip customization GUI. .PARAMETER victim Switch parameter to to install the victim profile. .PARAMETER skipChecks Switch parameter to skip validation ...
github
jenkinsci/docker
https://github.com/jenkinsci/docker
jenkins-support.psm1
PowerShell
mit
7,477
master
9,146
# compare if version1 < version2 function Compare-VersionLessThan([string] $version1 = '', [string] $version2 = '') { # Quick check for equality if($version1 -eq $version2) { return $false } # Convert '-' to '.' to ease comparison $normalizedVersion1 = $version1 -replace '-', '.' $norma...
github
jenkinsci/docker
https://github.com/jenkinsci/docker
make.ps1
PowerShell
mit
7,477
master
10,899
[CmdletBinding()] Param( [Parameter(Position = 1)] # Default script target [String] $Target = 'build', # Jenkins version to include [String] $JenkinsVersion = '2.561', # Windows flavor and windows version to build [String] $ImageType = 'windowsservercore-ltsc2022', # Generate a docker co...
github
jenkinsci/docker
https://github.com/jenkinsci/docker
jenkins.ps1
PowerShell
mit
7,477
master
2,101
Import-Module -Force -DisableNameChecking C:/ProgramData/Jenkins/jenkins-support.psm1 $JENKINS_WAR = Get-EnvOrDefault 'JENKINS_WAR' 'C:/ProgramData/Jenkins/jenkins.war' $JENKINS_HOME = Get-EnvOrDefault 'JENKINS_HOME' 'C:/ProgramData/Jenkins/JenkinsHome' $COPY_REFERENCE_FILE_LOG = Get-EnvOrDefault 'COPY_REFERENCE_FILE_...
github
jenkinsci/docker
https://github.com/jenkinsci/docker
tests/test_helpers.psm1
PowerShell
mit
7,477
master
7,419
Import-Module -DisableNameChecking -Force $PSScriptRoot/../jenkins-support.psm1 function Test-CommandExists($command) { $oldPreference = $ErrorActionPreference $ErrorActionPreference = 'stop' $res = $false try { if(Get-Command $command) { $res = $true } } catch { $res = $false }...
github
jenkinsci/docker
https://github.com/jenkinsci/docker
tests/plugins-cli.Tests.ps1
PowerShell
mit
7,477
master
14,555
Import-Module -DisableNameChecking -Force $PSScriptRoot/../jenkins-support.psm1 Import-Module -DisableNameChecking -Force $PSScriptRoot/test_helpers.psm1 $global:SUT_IMAGE=Get-SutImage $global:SUT_CONTAINER=Get-SutImage $global:TEST_TAG=$global:SUT_IMAGE.Replace('pester-jenkins-', '') Describe "[plugins-cli > $global...
github
jenkinsci/docker
https://github.com/jenkinsci/docker
tests/runtime.Tests.ps1
PowerShell
mit
7,477
master
5,046
Import-Module -DisableNameChecking -Force $PSScriptRoot/../jenkins-support.psm1 Import-Module -DisableNameChecking -Force $PSScriptRoot/test_helpers.psm1 $global:SUT_IMAGE=Get-SutImage $global:SUT_CONTAINER=Get-SutImage $global:TEST_TAG=$global:SUT_IMAGE.Replace('pester-jenkins-', '') Describe "[runtime > $global:TES...
github
jenkinsci/docker
https://github.com/jenkinsci/docker
tests/functions.Tests.ps1
PowerShell
mit
7,477
master
5,200
Import-Module -DisableNameChecking -Force $PSScriptRoot/../jenkins-support.psm1 Import-Module -DisableNameChecking -Force $PSScriptRoot/test_helpers.psm1 $global:SUT_IMAGE=Get-SutImage $global:SUT_CONTAINER=Get-SutImage $global:TEST_TAG=$global:SUT_IMAGE.Replace('pester-jenkins-', '') Describe "[functions > $global:T...
github
danielbohannon/Invoke-Obfuscation
https://github.com/danielbohannon/Invoke-Obfuscation
Invoke-Obfuscation.psd1
PowerShell
apache-2.0
4,245
master
2,260
# This file is part of Invoke-Obfuscation. # # Copyright 2017 Daniel Bohannon <@danielhbohannon> # while at Mandiant <http://www.mandiant.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy ...
github
danielbohannon/Invoke-Obfuscation
https://github.com/danielbohannon/Invoke-Obfuscation
Out-ObfuscatedAst.ps1
PowerShell
apache-2.0
4,245
master
258,616
function Out-ObfuscatedAst { <# .SYNOPSIS Obfuscates PowerShell scripts using AbstractSyntaxTree-based obfuscation rules. Author: Ryan Cobb (@cobbr_io) License: Apache License, Version 2.0 Required Dependecies: none Optional Dependencies: Get-Ast .DESCRIPTION Out-ObfuscatedAst ...
github
danielbohannon/Invoke-Obfuscation
https://github.com/danielbohannon/Invoke-Obfuscation
Invoke-Obfuscation.psm1
PowerShell
apache-2.0
4,245
master
4,815
# This file is part of Invoke-Obfuscation. # # Copyright 2017 Daniel Bohannon <@danielhbohannon> # while at Mandiant <http://www.mandiant.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy ...
github
danielbohannon/Invoke-Obfuscation
https://github.com/danielbohannon/Invoke-Obfuscation
Invoke-Obfuscation.ps1
PowerShell
apache-2.0
4,245
master
131,795
# This file is part of Invoke-Obfuscation. # # Copyright 2017 Daniel Bohannon <@danielhbohannon> # while at Mandiant <http://www.mandiant.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy ...
github
itm4n/PrivescCheck
https://github.com/itm4n/PrivescCheck
build/Build.ps1
PowerShell
bsd-3-clause
3,822
master
21,787
function Invoke-Build { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [ValidateSet("PrivescCheck")] [String] $Name, [Switch] $NoNewSeed ) begin { $SanityCheck = $true if (-not (Test-Path -Path "build")) { Write-Message -Type Erro...
github
itm4n/PrivescCheck
https://github.com/itm4n/PrivescCheck
test/ScriptAnalyzerSettings.psd1
PowerShell
bsd-3-clause
3,822
master
400
@{ Severity = @( "Error", "Warning", "Information" ) ExcludeRules = @( "PSUseShouldProcessForStateChangingFunctions", "PSAvoidUsingWMICmdlet", # Get-WmiObject is required for PSv2 retro-compatibility "PSAvoidUsingBrokenHashAlgorithms" # MD5 and SHA1 required ...
github
itm4n/PrivescCheck
https://github.com/itm4n/PrivescCheck
src/core/Multithreading.ps1
PowerShell
bsd-3-clause
3,822
master
6,133
function New-InitialSessionState { <# .SYNOPSIS Construct an InitialSessionState object for use in a separate runspace. .DESCRIPTION This cmdlet creates an InitialSessionState object and populates it with global variables and custom functions defined in the current session. The returned InitialSess...
github
itm4n/PrivescCheck
https://github.com/itm4n/PrivescCheck
src/core/WinApi.Struct.ps1
PowerShell
bsd-3-clause
3,822
master
38,526
$script:LARGE_INTEGER = New-Structure $Module WinApiModule.LARGE_INTEGER @{ LowPart = New-StructureField 0 UInt32 HighPart = New-StructureField 1 Int32 } $script:UNICODE_STRING = New-Structure $Module WinApiModule.UNICODE_STRING @{ Length = New-St...
github
itm4n/PrivescCheck
https://github.com/itm4n/PrivescCheck
src/core/Compression.ps1
PowerShell
bsd-3-clause
3,822
master
363
function ConvertFrom-Gzip { [CmdletBinding()] param ([Byte[]] $InputBuffer) $is = New-Object IO.MemoryStream(, $InputBuffer) $gs = New-Object IO.Compression.GzipStream $is, ([IO.Compression.CompressionMode]::Decompress) $sr = New-Object IO.StreamReader($gs) $sbd = $sr.ReadToEnd() $sr.Close()...