full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/1414.ps1
1414.ps1
function Revoke-CPrivilege { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Identity, [Parameter(Mandatory=$true)] [string[]] $Privilege ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState $account = Resolve-CIdentity -Name $Identity if( -not $account ) { return } $cPrivileges = Get-CPrivilege -Identity $account.FullName | Where-Object { $Privilege -contains $_ } if( -not $cPrivileges ) { return } try { [Carbon.Security.Privilege]::RevokePrivileges($account.FullName,$cPrivileges) } catch { Write-Error -Message ('Failed to revoke {0}''s {1} privilege(s).' -f $account.FullName,($cPrivileges -join ', ')) $ex = $_.Exception while( $ex.InnerException ) { $ex = $ex.InnerException Write-Error -Exception $ex } } }
combined_dataset/train/non-malicious/sample_62_54.ps1
sample_62_54.ps1
# # Module manifest for module 'OCI.PSModules.Mediaservices' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mediaservices.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'c1b780bd-0bdf-4759-a6cb-6edb4ac392d6' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Mediaservices Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.3.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Mediaservices.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Add-OCIMediaservicesMediaAssetLock', 'Add-OCIMediaservicesMediaWorkflowConfigurationLock', 'Add-OCIMediaservicesMediaWorkflowJobLock', 'Add-OCIMediaservicesMediaWorkflowLock', 'Add-OCIMediaservicesStreamCdnConfigLock', 'Add-OCIMediaservicesStreamDistributionChannelLock', 'Add-OCIMediaservicesStreamPackagingConfigLock', 'Get-OCIMediaservicesMediaAsset', 'Get-OCIMediaservicesMediaAssetDistributionChannelAttachment', 'Get-OCIMediaservicesMediaAssetDistributionChannelAttachmentsList', 'Get-OCIMediaservicesMediaAssetsList', 'Get-OCIMediaservicesMediaWorkflow', 'Get-OCIMediaservicesMediaWorkflowConfiguration', 'Get-OCIMediaservicesMediaWorkflowConfigurationsList', 'Get-OCIMediaservicesMediaWorkflowJob', 'Get-OCIMediaservicesMediaWorkflowJobsList', 'Get-OCIMediaservicesMediaWorkflowsList', 'Get-OCIMediaservicesMediaWorkflowTaskDeclarationsList', 'Get-OCIMediaservicesStreamCdnConfig', 'Get-OCIMediaservicesStreamCdnConfigsList', 'Get-OCIMediaservicesStreamDistributionChannel', 'Get-OCIMediaservicesStreamDistributionChannelsList', 'Get-OCIMediaservicesStreamPackagingConfig', 'Get-OCIMediaservicesStreamPackagingConfigsList', 'Get-OCIMediaservicesSystemMediaWorkflowsList', 'Invoke-OCIMediaservicesIngestStreamDistributionChannel', 'Move-OCIMediaservicesMediaAssetCompartment', 'Move-OCIMediaservicesMediaWorkflowCompartment', 'Move-OCIMediaservicesMediaWorkflowConfigurationCompartment', 'Move-OCIMediaservicesMediaWorkflowJobCompartment', 'Move-OCIMediaservicesStreamDistributionChannelCompartment', 'New-OCIMediaservicesMediaAsset', 'New-OCIMediaservicesMediaWorkflow', 'New-OCIMediaservicesMediaWorkflowConfiguration', 'New-OCIMediaservicesMediaWorkflowJob', 'New-OCIMediaservicesPlaylist', 'New-OCIMediaservicesSessionToken', 'New-OCIMediaservicesStreamCdnConfig', 'New-OCIMediaservicesStreamDistributionChannel', 'New-OCIMediaservicesStreamPackagingConfig', 'Remove-OCIMediaservicesMediaAsset', 'Remove-OCIMediaservicesMediaAssetDistributionChannelAttachment', 'Remove-OCIMediaservicesMediaAssetLock', 'Remove-OCIMediaservicesMediaWorkflow', 'Remove-OCIMediaservicesMediaWorkflowConfiguration', 'Remove-OCIMediaservicesMediaWorkflowConfigurationLock', 'Remove-OCIMediaservicesMediaWorkflowJob', 'Remove-OCIMediaservicesMediaWorkflowJobLock', 'Remove-OCIMediaservicesMediaWorkflowLock', 'Remove-OCIMediaservicesStreamCdnConfig', 'Remove-OCIMediaservicesStreamCdnConfigLock', 'Remove-OCIMediaservicesStreamDistributionChannel', 'Remove-OCIMediaservicesStreamDistributionChannelLock', 'Remove-OCIMediaservicesStreamPackagingConfig', 'Remove-OCIMediaservicesStreamPackagingConfigLock', 'Update-OCIMediaservicesMediaAsset', 'Update-OCIMediaservicesMediaWorkflow', 'Update-OCIMediaservicesMediaWorkflowConfiguration', 'Update-OCIMediaservicesMediaWorkflowJob', 'Update-OCIMediaservicesStreamCdnConfig', 'Update-OCIMediaservicesStreamDistributionChannel', 'Update-OCIMediaservicesStreamPackagingConfig' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Mediaservices' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_14_6.ps1
sample_14_6.ps1
$script:THIS_PATH = $myinvocation.mycommand.path $script:BASE_DIR = Split-Path (Resolve-Path "$THIS_PATH/..") -Parent function global:deactivate([switch] $NonDestructive) { if (Test-Path variable:_OLD_VIRTUAL_PATH) { $env:PATH = $variable:_OLD_VIRTUAL_PATH Remove-Variable "_OLD_VIRTUAL_PATH" -Scope global } if (Test-Path function:_old_virtual_prompt) { $function:prompt = $function:_old_virtual_prompt Remove-Item function:\_old_virtual_prompt } if ($env:VIRTUAL_ENV) { Remove-Item env:VIRTUAL_ENV -ErrorAction SilentlyContinue } if ($env:VIRTUAL_ENV_PROMPT) { Remove-Item env:VIRTUAL_ENV_PROMPT -ErrorAction SilentlyContinue } if (!$NonDestructive) { # Self destruct! Remove-Item function:deactivate Remove-Item function:pydoc } } function global:pydoc { python -m pydoc $args } # unset irrelevant variables deactivate -nondestructive $VIRTUAL_ENV = $BASE_DIR $env:VIRTUAL_ENV = $VIRTUAL_ENV if ("" -ne "") { $env:VIRTUAL_ENV_PROMPT = "" } else { $env:VIRTUAL_ENV_PROMPT = $( Split-Path $env:VIRTUAL_ENV -Leaf ) } New-Variable -Scope global -Name _OLD_VIRTUAL_PATH -Value $env:PATH $env:PATH = "$env:VIRTUAL_ENV/bin;" + $env:PATH if (!$env:VIRTUAL_ENV_DISABLE_PROMPT) { function global:_old_virtual_prompt { "" } $function:_old_virtual_prompt = $function:prompt function global:prompt { # Add the custom prefix to the existing prompt $previous_prompt_value = & $function:_old_virtual_prompt ("(" + $env:VIRTUAL_ENV_PROMPT + ") " + $previous_prompt_value) } }
combined_dataset/train/non-malicious/Get-BinarySum.ps1
Get-BinarySum.ps1
function Get-BinarySum { <# .SYNOPSIS Performs binary addition of two Int32 values. .DESCRIPTION If a numeric overflow occurs in PowerShell, an error is generated making it impossible to perform binary addition. Get-BinarySum will add two Int32 numbers together and if the result exceeds [Int32]::MaxValue, the sum will wrap. This function emulates C-style addition. .EXAMPLE PS> Get-BinarySum 0xFFFFFFFF 2 1 .EXAMPLE PS> Get-BinarySum 2 (-bnot 3 + 1) -1 Description ----------- Performs the equivalent of binary subtraction of 2 - 3 .OUTPUTS System.Int32 The sum of the addition. The Int32 will wrap if the result is greater than 0xFFFFFFFF .LINK http://www.exploit-monday.com/ #> Param ( [Parameter(Mandatory = $True, Position = 0)] [Int32] $Num1, [Parameter(Mandatory = $True, Position = 1)] [Int32] $Num2 ) # The number of bits in an Int32 (DWORD) $BitWidth = 32 # Convert each number to its binary equivalent [Char[]] $Num1Array = ([Convert]::ToString($Num1, 2)).PadLeft($BitWidth,'0') [Char[]] $Num2Array = ([Convert]::ToString($Num2, 2)).PadLeft($BitWidth,'0') # Initialize the sum to zero [Char[]] $Sum = '0' * $BitWidth $Carry = 0 # Calculate sum for each bit and carry, if necessary for ($i = ($BitWidth-1); $i -ge 0; $i--) { $BxorResult = [Convert]::ToInt32($Num1Array[$i], 2) -bxor [Convert]::ToInt32($Num2Array[$i], 2) $BandResult = [Convert]::ToInt32($Num1Array[$i], 2) -band [Convert]::ToInt32($Num2Array[$i], 2) $Sum[$i] = ($BxorResult -bxor $Carry).ToString() $Carry = $BandResult -bor ($Carry -band $BxorResult) } # Return the result as an Int32 [Convert]::ToInt32($Sum -join '', 2) }
combined_dataset/train/non-malicious/3968.ps1
3968.ps1
function Test-EmptyRouteTable { $rgname = Get-ResourceGroupName $routeTableName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/routeTables" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $job = New-AzRouteTable -name $routeTableName -ResourceGroupName $rgname -Location $location -AsJob $job | Wait-Job $rt = $job | Receive-Job $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-NotNull $getRT.Etag Assert-AreEqual 0 @($getRT.Routes).Count $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 1 @($list).Count Assert-AreEqual $list[0].ResourceGroupName $getRT.ResourceGroupName Assert-AreEqual $list[0].Name $getRT.Name Assert-AreEqual $list[0].Etag $getRT.Etag Assert-AreEqual @($list[0].Routes).Count @($getRT.Routes).Count $list = Get-AzRouteTable -ResourceGroupName "*" Assert-True { $list.Count -ge 0 } $list = Get-AzRouteTable -Name "*" Assert-True { $list.Count -ge 0 } $list = Get-AzRouteTable -ResourceGroupName "*" -Name "*" Assert-True { $list.Count -ge 0 } $job = Remove-AzRouteTable -ResourceGroupName $rgname -name $routeTableName -PassThru -Force -AsJob $job | Wait-Job $delete = $job | Receive-Job Assert-AreEqual true $delete $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 0 @($list).Count } finally { Clean-ResourceGroup $rgname } } function Test-RouteTableCRUD { $rgname = Get-ResourceGroupName $routeTableName = Get-ResourceName $domainNameLabel = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/routeTables" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $route1 = New-AzRouteConfig -name "route1" -AddressPrefix "192.168.1.0/24" -NextHopIpAddress "23.108.1.1" -NextHopType "VirtualAppliance" $rt = New-AzRouteTable -name $routeTableName -ResourceGroupName $rgname -Location $location -Route $route1 $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-NotNull $getRT.Etag Assert-AreEqual 1 @($getRT.Routes).Count Assert-AreEqual $getRT.Routes[0].Name "route1" Assert-AreEqual $getRT.Routes[0].AddressPrefix "192.168.1.0/24" Assert-AreEqual $getRT.Routes[0].NextHopIpAddress "23.108.1.1" Assert-AreEqual $getRT.Routes[0].NextHopType "VirtualAppliance" Assert-NotNull $getRT.Routes[0].Etag $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 1 @($list).Count Assert-AreEqual $list[0].ResourceGroupName $getRT.ResourceGroupName Assert-AreEqual $list[0].Name $getRT.Name Assert-AreEqual $list[0].Etag $getRT.Etag Assert-AreEqual @($list[0].Routes).Count @($getRT.Routes).Count Assert-AreEqual $list[0].Routes[0].Etag $getRT.Routes[0].Etag $route2 = New-AzRouteConfig -name "route2" -AddressPrefix "192.168.2.0/24" -NextHopType "VnetLocal" $getRT = New-AzRouteTable -name $routeTableName -ResourceGroupName $rgname -Location $location -Route $route1,$route2 -Force Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-NotNull $getRT.Etag Assert-AreEqual 2 @($getRT.Routes).Count Assert-AreEqual $getRT.Routes[0].Name "route1" Assert-AreEqual $getRT.Routes[1].Name "route2" Assert-AreEqual $getRT.Routes[1].AddressPrefix "192.168.2.0/24" Assert-null $getRT.Routes[1].NextHopIpAddress Assert-AreEqual $getRT.Routes[1].NextHopType "VnetLocal" Assert-NotNull $getRT.Routes[1].Etag $getRT = New-AzRouteTable -name $routeTableName -ResourceGroupName $rgname -Location $location -Route $route2 -Force Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-NotNull $getRT.Etag Assert-AreEqual 1 @($getRT.Routes).Count Assert-AreEqual $getRT.Routes[0].Name "route2" $delete = Remove-AzRouteTable -ResourceGroupName $rgname -name $routeTableName -PassThru -Force Assert-AreEqual true $delete $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 0 @($list).Count } finally { Clean-ResourceGroup $rgname } } function Test-RouteTableSubnetRef { $rgname = Get-ResourceGroupName $routeTableName = Get-ResourceName $vnetName = Get-ResourceName $subnetName = Get-ResourceName $domainNameLabel = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/routeTables" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $route1 = New-AzRouteConfig -name "route1" -AddressPrefix "192.168.1.0/24" -NextHopIpAddress "23.108.1.1" -NextHopType "VirtualAppliance" $rt = New-AzRouteTable -name $routeTableName -ResourceGroupName $rgname -Location $location -Route $route1 $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-NotNull $getRT.Etag Assert-AreEqual 1 @($getRT.Routes).Count Assert-AreEqual $getRT.Routes[0].Name "route1" $subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24 -RouteTable $getRT $vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -DnsServer 8.8.8.8 -Subnet $subnet Assert-AreEqual $vnet.Subnets[0].RouteTable.Id $getRT.Id $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName Assert-AreEqual 1 @($getRT.Subnets).Count Assert-AreEqual $vnet.Subnets[0].Id $getRT.Subnets[0].Id } finally { Clean-ResourceGroup $rgname } } function Test-RouteTableRouteCRUD { $rgname = Get-ResourceGroupName $routeTableName = Get-ResourceName $vnetName = Get-ResourceName $subnetName = Get-ResourceName $domainNameLabel = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/routeTables" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $route1 = New-AzRouteConfig -name "route1" -AddressPrefix "192.168.1.0/24" -NextHopIpAddress "23.108.1.1" -NextHopType "VirtualAppliance" $rt = New-AzRouteTable -name $routeTableName -ResourceGroupName $rgname -Location $location -Route $route1 $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-NotNull $getRT.Etag Assert-AreEqual 1 @($getRT.Routes).Count Assert-AreEqual $getRT.Routes[0].Name "route1" $route = $getRT | Get-AzRouteConfig -name "route1" Assert-AreEqual $route.Name "route1" Assert-AreEqual $getRT.Routes[0].Name $route.Name Assert-AreEqual $getRT.Routes[0].AddressPrefix $route.AddressPrefix Assert-AreEqual $getRT.Routes[0].NextHopType $route.NextHopType Assert-AreEqual $getRT.Routes[0].NextHopIpAddress $route.NextHopIpAddress $job = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName | Add-AzRouteConfig -name "route2" -AddressPrefix "192.168.2.0/24" -NextHopType "VnetLocal" | Set-AzRouteTable -AsJob $job | Wait-Job $getRT = $job | Receive-Job $route = $getRT | Get-AzRouteConfig -name "route2" Assert-AreEqual 2 @($getRT.Routes).Count Assert-AreEqual $route.Name "route2" Assert-AreEqual $getRT.Routes[1].Name $route.Name Assert-AreEqual $getRT.Routes[1].AddressPrefix $route.AddressPrefix Assert-AreEqual $route.AddressPrefix "192.168.2.0/24" Assert-AreEqual $getRT.Routes[1].NextHopType $route.NextHopType Assert-AreEqual $route.NextHopType "VnetLocal" Assert-Null $route.NextHopIpAddress Assert-Null $getRT.Routes[1].NextHopIpAddress $list = $getRT | Get-AzRouteConfig Assert-AreEqual 2 @($list).Count Assert-AreEqual $list[1].Name "route2" Assert-AreEqual $list[1].Name $route.Name Assert-AreEqual $list[1].AddressPrefix $route.AddressPrefix Assert-AreEqual $list[1].NextHopType $route.NextHopType Assert-Null $list[1].NextHopIpAddress $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName | Set-AzRouteConfig -name "route2" -AddressPrefix "192.168.3.0/24" -NextHopType "VnetLocal" | Set-AzRouteTable $route = $getRT | Get-AzRouteConfig -name "route2" Assert-AreEqual 2 @($getRT.Routes).Count Assert-AreEqual $route.Name "route2" Assert-AreEqual $getRT.Routes[1].Name $route.Name Assert-AreEqual $route.AddressPrefix "192.168.3.0/24" Assert-AreEqual $getRT.Routes[1].AddressPrefix $route.AddressPrefix Assert-AreEqual $getRT.Routes[1].NextHopType $route.NextHopType Assert-Null $route.NextHopIpAddress Assert-Null $getRT.Routes[1].NextHopIpAddress $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName | Remove-AzRouteConfig -name "route1" | Set-AzRouteTable $list = $getRT | Get-AzRouteConfig Assert-AreEqual 1 @($list).Count Assert-AreEqual $list[0].Name "route2" $delete = Remove-AzRouteTable -ResourceGroupName $rgname -name $routeTableName -PassThru -Force Assert-AreEqual true $delete $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 0 @($list).Count } finally { Clean-ResourceGroup $rgname } } function Test-RouteHopTypeTest { $rgname = Get-ResourceGroupName $routeTableName = Get-ResourceName $vnetName = Get-ResourceName $subnetName = Get-ResourceName $domainNameLabel = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/routeTables" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $route1 = New-AzRouteConfig -name "route1" -AddressPrefix "192.168.1.0/24" -NextHopIpAddress "23.108.1.1" -NextHopType "VirtualAppliance" $route2 = New-AzRouteConfig -name "route2" -AddressPrefix "10.0.1.0/24" -NextHopType "VnetLocal" $route3 = New-AzRouteConfig -name "route3" -AddressPrefix "0.0.0.0/0" -NextHopType "Internet" $route4 = New-AzRouteConfig -name "route4" -AddressPrefix "10.0.2.0/24" -NextHopType "None" $rt = New-AzRouteTable -name $routeTableName -ResourceGroupName $rgname -Location $location -Route $route1, $route2, $route3, $route4 $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-NotNull $getRT.Etag Assert-AreEqual 4 @($getRT.Routes).Count Assert-AreEqual $getRT.Routes[0].Name "route1" Assert-AreEqual $getRT.Routes[0].NextHopType "VirtualAppliance" Assert-AreEqual $getRT.Routes[1].Name "route2" Assert-AreEqual $getRT.Routes[1].NextHopType "VnetLocal" Assert-AreEqual $getRT.Routes[2].Name "route3" Assert-AreEqual $getRT.Routes[2].NextHopType "Internet" Assert-AreEqual $getRT.Routes[3].Name "route4" Assert-AreEqual $getRT.Routes[3].NextHopType "None" $delete = Remove-AzRouteTable -ResourceGroupName $rgname -name $routeTableName -PassThru -Force Assert-AreEqual true $delete $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 0 @($list).Count } finally { Clean-ResourceGroup $rgname } } function Test-RouteTableWithDisableBgpRoutePropagation { $rgname = Get-ResourceGroupName $routeTableName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/routeTables" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $rt = New-AzRouteTable -name $routeTableName -DisableBgpRoutePropagation -ResourceGroupName $rgname -Location $location $getRT = Get-AzRouteTable -name $routeTableName -ResourceGroupName $rgName Assert-AreEqual $rgName $getRT.ResourceGroupName Assert-AreEqual $routeTableName $getRT.Name Assert-AreEqual true $getRt.DisableBGProutepropagation Assert-NotNull $getRT.Etag Assert-AreEqual 0 @($getRT.Routes).Count $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 1 @($list).Count Assert-AreEqual $list[0].ResourceGroupName $getRT.ResourceGroupName Assert-AreEqual $list[0].Name $getRT.Name Assert-AreEqual $list[0].DisableBGProutepropagation $getRT.DisableBGProutepropagation Assert-AreEqual $list[0].Etag $getRT.Etag Assert-AreEqual @($list[0].Routes).Count @($getRT.Routes).Count $delete = Remove-AzRouteTable -ResourceGroupName $rgname -name $routeTableName -PassThru -Force Assert-AreEqual true $delete $list = Get-AzRouteTable -ResourceGroupName $rgname Assert-AreEqual 0 @($list).Count } finally { Clean-ResourceGroup $rgname } }
combined_dataset/train/non-malicious/sample_50_93.ps1
sample_50_93.ps1
# # Module manifest for module 'OCI.PSModules.Redis' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Redis.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'bd4757ae-2cb1-4507-acfd-0f3be713db44' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Redis Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.2.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Redis.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIRedisCluster', 'Get-OCIRedisClustersList', 'Get-OCIRedisWorkRequest', 'Get-OCIRedisWorkRequestErrorsList', 'Get-OCIRedisWorkRequestLogsList', 'Get-OCIRedisWorkRequestsList', 'Move-OCIRedisClusterCompartment', 'New-OCIRedisCluster', 'Remove-OCIRedisCluster', 'Stop-OCIRedisWorkRequest', 'Update-OCIRedisCluster' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Redis' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_24_56.ps1
sample_24_56.ps1
# # Module manifest for module 'OCI.PSModules.Osubusage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubusage.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'dc60bcf2-1864-4348-bd88-b778f8059f02' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Osubusage Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.2.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Osubusage.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIOsubusageComputedUsage', 'Get-OCIOsubusageComputedUsageAggregatedsList', 'Get-OCIOsubusageComputedUsagesList' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Osubusage' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/iSCSI Module.ps1
iSCSI Module.ps1
# Copyright (c) 2011 Code Owls LLC, All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all copies or # substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # http://www.opensource.org/licenses/mit-license.php # # PowerShell module for iSCSI management # # author: # jim christopher <jimchristopher@gmail.com> # # notes: # #Target Mappings: # <Target Lun> is the LUN value the target uses to expose the LUN. # It must be in the form 0x0123456789abcdef # <OS Bus> is the bus number the OS should use to surface the LUN # <OS Target> is the target number the OS should use to surface the LUN # <OS LUN> is the LUN number the OS should use to surface the LUN # #CHAP secrets, CHAP passwords and IPSEC preshared keys can be specified as #a text string or as a sequence of hexadecimal values. The value specified on #the command line is always considered a string unless the first two characters #0x in which case it is considered a hexadecimal value. # #For example 0x12345678 specifies a 4 byte secret # #All numerical values are assumed decimal unless preceeded by 0x. If #preceeded by 0x then value is assumed to be hex # #iscsicli can also be run in command line mode where iscsicli commands #can be entered directly from the console. To enter command line #mode, just run iscsicli without any parameters ########################################################### ## flags and enumerations #Payload Id Type: # ID_IPV4_ADDR is 1 - Id format is 1.2.3.4 # ID_FQDN is 2 - Id format is ComputerName # ID_IPV6_ADDR is 5 - Id form is IPv6 Address # $payloadIPV4 = 1; $payloadFQDN = 2; $payloadIPV6 = 5; #Security Flags: # TunnelMode is 0x00000040 # TransportMode is 0x00000020 # PFS Enabled is 0x00000010 # Aggressive Mode is 0x00000008 # Main mode is 0x00000004 # IPSEC/IKE Enabled is 0x00000002 # Valid Flags is 0x00000001 # $securityTunnelMode = 0x40; $securityTransportMode = 0x20; $securityPFSEnable = 0x10; $securityAggressiveMode = 0x08; $securityMainMode = 0x04; $securityIPSECIKEEnabled = 0x02; $securityValidFlags = 0x01; #Login Flags: # ISCSI_LOGIN_FLAG_REQUIRE_IPSEC 0x00000001 # IPsec is required for the operation # # ISCSI_LOGIN_FLAG_MULTIPATH_ENABLED 0x00000002 # Multipathing is enabled for the target on this initiator # $loginRequireIPSEC = 0x01; $loginMultipathEnabled = 0x02; #AuthType: # ISCSI_NO_AUTH_TYPE = 0, # No iSCSI in-band authentication is used # # ISCSI_CHAP_AUTH_TYPE = 1, # One way CHAP (Target authenticates initiator is used) # # ISCSI_MUTUAL_CHAP_AUTH_TYPE = 2 # Mutual CHAP (Target and Initiator authenticate each other is used) # $authTypeNone = 0; $authTypeChap = 1; $authTypeMutualChap = 2; #Target Flags: # ISCSI_TARGET_FLAG_HIDE_STATIC_TARGET 0x00000002 # If this flag is set then the target will never be reported unless it # is also discovered dynamically. # # ISCSI_TARGET_FLAG_MERGE_TARGET_INFORMATION 0x00000004 # If this flag is set then the target information passed will be # merged with any target information already statically configured for # the target # $targetHideStaticTarget = 0x02; $targetMergeTargetInfo = 0x04; ########################################################### ## cmdlets #iscsicli AddTarget <TargetName> <TargetAlias> <TargetPortalAddress> # <TargetPortalSocket> <Target flags> # <Persist> <Login Flags> <Header Digest> <Data Digest> # <Max Connections> <DefaultTime2Wait> # <DefaultTime2Retain> <Username> <Password> <AuthType> # <Mapping Count> <Target Lun> <OS Bus> <Os Target> # <OS Lun> ... # #iscsicli QAddTarget <TargetName> <TargetPortalAddress> # function Add-Target { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [Alias("Name")] [string] # the name of the target $targetName, [Parameter(Mandatory=$true)] [Alias("Address")] [string] # the IP or DNS address of the target portal $targetPortalAddress ) process { & iscsicli qaddtarget $targetName, $targetPortalAddress; } } #iscsicli RemoveTarget <TargetName> # #RemovePersistentTarget <Initiator Name> <TargetName> # <Initiator Port Number> # <Target Portal Address> # <Target Portal Socket> # function Remove-Target { <# This command will remove a target from the list of persisted targets. Boot Configuration Known Issues (Windows Server 2003 Boot Initiator) The Microsoft iSCSI Software Initiator boot version GUI does not allow you to view which adapter is set to boot. In order to determine which adapter the system is set to boot with, you can use the following command: From a command prompt type “iscsibcg /showibf” to find the MAC address of the boot adapter Then run the command “ipconfig /all” Compare the MAC address of the adapter to those listed with ipconfig /all MPIO Failover in an iSCSI boot configuration using the Microsoft iSCSI Software Initiator In Fail Over Only, no load balancing is performed. The primary path functions as the active path and all other paths are standby paths. The active path is used for sending all I/O. If the active path fails, one of the standby paths becomes the active path. When the formerly active path is reconnected, it becomes a standby path and a "failback" does not occur. This behavior is due to Media Sensing is disabled by default in the boot version of the Microsoft iSCSI Software Initiator and is by design. However, the registry key can be changed to enable fail back. For more information, please see For more information: 239924 How to disable the Media Sensing feature for TCP/IP in Windows http://support.microsoft.com/default.aspx?scid=kb;EN-US;239924 #> [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='high')] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [Alias("Name")] [string] # the name of the target to remove $targetName, [Parameter(ValueFromPipelineByPropertyName=$true)] [Alias("Address")] [string] # the IP or DNS address of the target portal $targetPortalAddress, [Parameter(ValueFromPipelineByPropertyName=$true)] [Alias('Port')] [int] #the TCP port number of the target portal. Typically this is 3260, which is the well-known port number defined for use by iSCSI. $TargetPortalSocket = 3260, [Parameter(ValueFromPipelineByPropertyName=$true)] [Alias( "InitiatorInstanceName" )] [string] #the name of the initiator via which the SendTargets operation is performed. If not specified then the initiator used is selected by the iSCSI initiator service. $InitiatorName, [Parameter(ValueFromPipelineByPropertyName=$true)] [string] #is the physical port number on the initiator via which the SendTargets operation is performed. If not specified then the kernel mode initiator driver chooses the initiator port used. $InitiatorPort = '*', [Parameter()] [switch] # specify to remove a persistent connection $persist, [Parameter()] [switch] # specify to bypass standard PowerShell confirmation procedures $force ) process { Write-Verbose "remove-target ..."; Write-Verbose " TargetName: $targetName"; Write-Verbose " TargetPortalAddress: $targetPortalAddress"; Write-Verbose " TargetPortalSocket: $targetPortalSocket"; Write-Verbose " InitiatorInstanceName: $InitiatorName"; Write-Verbose " InitiatorPort: $initiatorPort"; Write-Verbose " Persist: $persist"; Write-Verbose " Force: $force"; if( -not ( $force -or $pscmdlet.ShouldProcess( $targetName, 'Remove iSCSI target' ) ) ) { return; } if( $persist -and $InitiatorName ) { $iscsi = "iscsicli removepersistenttarget $InitiatorName $targetName $InitiatorPort $targetPortalAddress $TargetPortalSocket" Write-Verbose $iscsi; invoke-expression $iscsi } else { $iscsi = "iscsicli removetarget $targetName"; Write-Verbose $iscsi; invoke-expression $iscsi } } } #iscsicli AddTargetPortal <TargetPortalAddress> <TargetPortalSocket> # [HBA Name] [Port Number] # <Security Flags> # <Login Flags> <Header Digest> <Data Digest> # <Max Connections> <DefaultTime2Wait> # <DefaultTime2Retain> <Username> <Password> <AuthType> # #iscsicli QAddTargetPortal <TargetPortalAddress> # [CHAP Username] [CHAP Password] # function Add-TargetPortal { <# This command will add a target portal to the list of persisted target portals. The iSCSI initiator service will perform a SendTargets operation to each target portal in the list whenever the service starts and whenever a full refresh of the target list is requested. #> #[CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [Alias("Address")] [string] # the IP or DNS address of the target portal. $targetPortalAddress, [Parameter()] [string] #Username is the string that should be used as the CHAP username when logging into the target. By specifying * for this parameter, the iSCSI initiator service will use the initiator node name as the CHAP username. $username, [Parameter()] [string] #Password is the string that should be used as the target’s CHAP secret when logging into the target. The initiator will use this secret to compute a hash value based on the challenge sent by the target. $password ) process { if( $username ) { & iscsicli qaddtargetportal $targetPortalAddress $username $password; } else { & iscsicli qaddtargetportal $targetPortalAddress; } } } #iscsicli RemoveTargetPortal <TargetPortalAddress> <TargetPortalSocket> [HBA Name] [Port Number] # function Remove-TargetPortal { <# This command will remove a target portal from the list of persisted target portals. The iSCSI initiator service will perform a SendTargets operation to each target portal in the list whenever the service starts and whenever a full refresh of the target list is requested. Note that the command does not purge the targets discovered via this target portal from the list of targets maintained by the service. #> [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [Alias('Name')] [string] # the IP or DNS address of the target portal. $targetPortalAddress, [Parameter()] [Alias('Port')] [int] #the TCP port number of the target portal. Typically this is 3260, which is the well-known port number defined for use by iSCSI. $TargetPortalSocket = 3260, [Parameter()] [string] #the name of the initiator via which the SendTargets operation is performed. If not specified then the initiator used is selected by the iSCSI initiator service. $InitiatorName = '', [Parameter()] [string] #is the physical port number on the initiator via which the SendTargets operation is performed. If not specified then the kernel mode initiator driver chooses the initiator port used. $InitiatorPort = '' ) process { & iscsicli removetargetportal $targetPortalAddress $TargetPortalSocket $InitiatorName $InitiatorPort } } #iscsicli RefreshTargetPortal <TargetPortalAddress> <TargetPortalSocket> [HBA Name] [Port Number] # function Update-TargetPortal { <# This command will perform a SendTargets operation to the target portal and include the discovered targets into the list of targets maintained by the service. It does not add the target portal to the persistent list. #> [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [Alias("Address")] [string] # the IP or DNS address of the target portal. $targetPortalAddress, [Parameter()] [Alias("Port")] [int] #the TCP port number of the target portal. Typically this is 3260, which is the well-known port number defined for use by iSCSI. $TargetPortalSocket = 3260, [Parameter()] [string] #the name of the initiator via which the SendTargets operation is performed. If not specified then the initiator used is selected by the iSCSI initiator service. $InitiatorName, [Parameter()] [int] #is the physical port number on the initiator via which the SendTargets operation is performed. If not specified then the kernel mode initiator driver chooses the initiator port used. $InitiatorPort ) process { & iscsicli refreshtargetportal $targetPortalAddress $TargetPortalSocket $InitiatorName $InitiatorPort } } #iscsicli ListTargets [ForceUpdate] # #iscsicli ListPersistentTargets # function Get-Target { <# This command will display the list of persistent targets configured for all initiators. #> [CmdletBinding(DefaultParameterSetName='Local')] param( [Parameter( ParameterSetName='Persistent' )] [switch] # specify to get persistent targets $persistent, [Parameter( ParameterSetName='Local' )] [switch] # specify to force refresh of target list during retrieval $force ) process { if( $persistent ) { $data = & iscsicli ListPersistentTargets | Out-String; $data | Write-Verbose; $data -replace "[`r`n]+","=" -split "==" | where { $_ -match ':\\s+' } | foreach { $_ | convertFrom-iSCSIOutput # Write-Verbose "section $_"; # $a = @{}; # $_ -split '=' | Select-String '^\\s+[\\S\\s]+:\\s+' | foreach{ # Write-Verbose "item entry $_"; # $k,$v = $_ -split ':',2 # $a[$k.trim(' ')] = $v.trim(' '); # # #todo - massage to match remove-target inputs # } # new-object psobject -Property $a; } } else { if( $force ) { $data = & iscsicli ListTargets T } else { $data = & iscsicli ListTargets } $data | Select-String '^\\s+\\S+:\\S+$' | foreach{ $_ -replace '^\\s+','' -replace '\\s+$','' }; } } } #iscsicli ListTargetPortals # function Get-TargetPortal { [CmdletBinding()] param() process { $data = & iscsicli ListTargetPortals | Out-String; $data | Write-Verbose; $data -replace "[`r`n]+","=" -split "==" | where { $_ -match ':\\s+' } | foreach { $_ | convertFrom-iSCSIOutput # Write-Debug "section $_"; # $a = @{}; # $_ -split '=' | Select-String '^\\s+[\\S\\s]+:\\s+' | foreach{ # Write-Debug "item entry $_"; # $k,$v = $_ -split ':',2 # $a[$k.trim(' ')] = $v.trim(' '); # } # new-object psobject -Property $a; } } } #iscsicli TargetInfo <TargetName> [Discovery Mechanism] # function Get-TargetInfo { <# This command will return information about the target specified by TargetName. The iSCSI initiator service maintains a separate set of information about every target organized by each mechanism by which it was discovered. This means that each instance of a target can have different information such as target portal groups. Discovery Mechanism is an optional parameter and if not specified then only the list of discovery mechanisms for the target are displayed. If Discovery Mechanism is specified then information about the target instance discovered by that mechanism is displayed. #> [CmdletBinding()] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string] $targetName, [Parameter()] [string] $discoveryMechanism ) process { } } #iscsicli LoginTarget <TargetName> <ReportToPNP> # <TargetPortalAddress> <TargetPortalSocket> # <InitiatorInstance> <Port number> <Security Flags> # <Login Flags> <Header Digest> <Data Digest> # <Max Connections> <DefaultTime2Wait> # <DefaultTime2Retain> <Username> <Password> <AuthType> <Key> # <Mapping Count> <Target Lun> <OS Bus> <Os Target> # <OS Lun> ... # #iscsicli PersistentLoginTarget <TargetName> <ReportToPNP> # <TargetPortalAddress> <TargetPortalSocket> # <InitiatorInstance> <Port number> <Security Flags> # <Login Flags> <Header Digest> <Data Digest> # <Max Connections> <DefaultTime2Wait> # <DefaultTime2Retain> <Username> <Password> <AuthType> <Key> # <Mapping Count> <Target Lun> <OS Bus> <Os Target> # <OS Lun> ... # #iscsicli QLoginTarget <TargetName> [CHAP Username] [CHAP Password] # function Connect-Target { <# This command will login to a target #> #iscsicli persistentlogintarget $t T * * * * * * * * * * * [* * *] * 0 [CmdletBinding( SupportsShouldProcess=$true )] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [Alias("Name")] [string] # the name of the target $targetName, [Parameter()] [string] # Username is the string that should be used as the CHAP username when logging into the target. By specifying * for this parameter, the iSCSI initiator service will use the initiator node name as the CHAP username. $username, [Parameter()] [string] # Password is the string that should be used as the target’s CHAP secret when logging into the target. The initiator will use this secret to compute a hash value based on the challenge sent by the target. $password, [Parameter()] [switch] # specify to persist the login information upon reboot $persist ) process { if( $username ) { $data = & iscsicli qlogintarget $targetName $username $password Write-Verbose "Raw iSCSIcli output: $data"; } else { $data = & iscsicli qlogintarget $targetName Write-Verbose "Raw iSCSIcli output: $data"; $username = '*'; $password = '*'; } Write-Verbose "Raw iSCSIcli output: $data"; if( $data -match 'already.+logged' ) { $s = get-session | where { $_.targetname -eq $targetName }; New-Object psobject -Property @{ SessionId=$s.SessionId; ConnectionId=$s.Connection.ConnectionID }; } else { # Session Id is 0xfffffa800f7900a8-0x4000013700000015 # Connection Id is 0xfffffa800f7900a8-0x23 ( $data | Out-String ) -replace '0x','' -replace "[`r`n]+",'=' | convertFrom-iSCSIOutput -field ' is '; } if( $persist ) { & iscsicli persistentlogintarget $targetName T * * * * * * * * * * * $username $password * * 0 | Out-Null } } } #iscsicli LogoutTarget <SessionId> # function Disconnect-Session { <# This command will attempt to logout of a target which was logged in via the session specified by SessionId. The iSCSI initiator service will not logout of a session if any devices exposed by it are currently in use. If the command fails then consult the system eventlog for additional information about the component that is using the device. #> [CmdletBinding( SupportsShouldProcess=$true, ConfirmImpact='high' )] param( [Parameter( Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true )] [string] $sessionId, [Parameter()] [switch] # specify to bypass standard PowerShell confirmation processes $force ) process { if( -not( $force -or $pscmdlet.shouldProcess( $sessionId, "Disconnect Session" ) ) ) { return; } $data = & iscsicli logouttarget $sessionId | Out-String; if( $data -notmatch 'success' ) { throw $data; } } } #iscsicli ListInitiators # function Get-Initiators { <# This command will display the list of initiator instance names that are running and operating with the iSCSI initiator service. #> [CmdletBinding()] param() process { & iscsicli listinitiators } } #iscsicli SessionList <Show Session Info> # function Get-Session { <# This command displays the list of active sessions for all initiators. Note that a session that has no connections is not connected to the target and is in a retry state. Microsoft iSCSI Initiator Version 6.1 Build 7601 Total of 2 sessions Session Id : fffffa800f7900a8-400001370000000d Initiator Node Name : iqn.1991-05.com.microsoft:archimedes Target Node Name : (null) Target Name : iqn.2008-08.com.starwindsoftware:127.0.0.1-target1 ISID : 40 00 01 37 00 00 TSID : 27 00 Number Connections : 1 Connections: Connection Id : fffffa800f7900a8-1b Initiator Portal : 0.0.0.0/58847 Target Portal : 192.168.1.108/3260 CID : 01 00 Devices: Device Type : Disk Device Number : 1 Storage Device Type : 7 Partition Number : 0 Friendly Name : ROCKET RAM DISK 1024 M SCSI Disk Device Device Description : Disk drive Reported Mappings : Port 1, Bus 0, Target Id 0, LUN 0 Location : Bus Number 0, Target Id 0, LUN 0 Initiator Name : ROOT\\ISCSIPRT\\0000_0 Target Name : iqn.2008-08.com.starwindsoftware:127.0.0.1-target1 Device Interface Name : \\\\?\\scsi#disk&ven_rocket&prod_ram_disk_1024_m#1&1c121344&0&000000#{53f56307-b6bf-11d0-9 4f2-00a0c91efb8b} Legacy Device Name : \\\\.\\PhysicalDrive1 Device Instance : 0x82c Volume Path Names : E:\\ Session Id : fffffa800f7900a8-400001370000000f Initiator Node Name : iqn.1991-05.com.microsoft:archimedes Target Node Name : (null) Target Name : iqn.2008-08.com.starwindsoftware:127.0.0.1-scratch ISID : 40 00 01 37 00 00 TSID : 2b 00 Number Connections : 1 Connections: Connection Id : fffffa800f7900a8-1d Initiator Portal : 0.0.0.0/59359 Target Portal : 192.168.1.106/3260 CID : 01 00 Devices: Device Type : Disk Device Number : 2 Storage Device Type : 7 Partition Number : 0 Friendly Name : ROCKET RAM DISK 256 MB SCSI Disk Device Device Description : Disk drive Reported Mappings : Port 1, Bus 0, Target Id 1, LUN 0 Location : Bus Number 0, Target Id 1, LUN 0 Initiator Name : ROOT\\ISCSIPRT\\0000_0 Target Name : iqn.2008-08.com.starwindsoftware:127.0.0.1-scratch Device Interface Name : \\\\?\\scsi#disk&ven_rocket&prod_ram_disk_256_mb#1&1c121344&0&000100#{53f56307-b6bf-11d0-9 4f2-00a0c91efb8b} Legacy Device Name : \\\\.\\PhysicalDrive2 Device Instance : 0x8ac #> [CmdletBinding()] param( [Parameter( ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true )] [string] $sessionId = '.*' ) process { Write-Verbose "Session ID filter: $sessionId"; $data = ( & iscsicli sessionlist ) | out-string; $data = $data -replace "[`r`n]+",'=' Write-Verbose "raw sessionlist info : $data"; $sessions = $data -split "Session Id\\s+:\\s+"; $sessions = $sessions | where { $_ -match "Connections:" } | foreach { $session, $data = ( "Session Id : " + $_ ) -split 'Connections:', 2; $connection, $device = $data -split "Devices:", 2; Write-Verbose "session $session"; Write-Verbose "connection $connection"; Write-Verbose "device $device"; $session, $connection, $device = $session, $connection, $device | convertFrom-iSCSIOutput; $session | Add-Member -PassThru -MemberType NoteProperty -Name Connection -Value $connection | Add-Member -MemberType NoteProperty -Name Device -Value $device; $session; } if( -not $sessions ) { Write-Verbose "no sessions found" return; } $sessions | write-verbose; $sessions | where { write-verbose "filtering $($_.SessionId) by $sessionId"; $_.SessionId -match $sessionId } } } function convertFrom-iSCSIOutput { [CmdletBinding()] param( [Parameter(ValueFromPipeline=$true)] [string] $data, [Parameter()] [string] $itemDelimiter = '=', [Parameter()] [string] $fieldSeparator = ':' ) process { Write-Debug "convertFrom-iSCSIOutput ..." Write-Debug " Data: $data"; Write-Debug " Item Delimiter: $itemdelimiter"; Write-Debug " Field Separator: $fieldSeparator"; $a = @{}; $data -split $itemDelimiter | where { $_ -match "$fieldSeparator\\s*" } | foreach { function add-ToA( $k, $v ) { $k = $k -replace ' ',''; Write-Debug "item key $k; value $v"; $a[$k] = $v; } Write-Debug "item entry $_"; $k,$v = $_ -split "\\s*$fieldSeparator\\s*",2; if( $k -match ' and ' ) { $k1, $k2 = $k -split ' and '; $v1, $v2 = $v -split '\\s+',2; add-ToA $k1 $v1 add-ToA $k2 $v2 } else { add-ToA $k $v } } new-object psobject -Property $a; } } ########################################################### ## initialization Export-ModuleMember -Function '*';
combined_dataset/train/non-malicious/Update VM Tools_1.ps1
Update VM Tools_1.ps1
######################################################## # Created by Brian English # for Charlotte County Government # No warranty suggested or implied ######################################################## ######################################################## #connect to VirtualCenter server (i.e. virtual-center-1) if ($args[0] -eq $null) {$hostName = Read-Host "What host do you want to connect to?"} else {$hostName = $args[0]} #connect to selected Virtualcenter or host server Connect-VIServer $hostName ######################################################## #get all vms listed in virtualcenter $vms = get-vm ######################################################## #check power state on each vm #if 'On' update tools Foreach ($i in $vms) { #if virtualcenter is virtualized skip it # a system restart would stop this script if ((get-vm -name $i).Name -eq $hostname) {"Skipping " + $hostname} #if primary DC or DNS is virtualized skip it too #elseif ((get-vm -name $i).Name -eq "DNS/DC/DHCP") #{"Skipping DNS/DC/DHCP server name"} else { if ((get-vm -name $i).PowerState -eq "PoweredOn") { $i Get-Date -format "hh:mm:ss" update-tools -guest (get-vmguest -vm (get-vm -name $i)) Get-Date -format "hh:mm:ss" }#if #}#if }#foreach
combined_dataset/train/non-malicious/sample_1_59.ps1
sample_1_59.ps1
ConvertFrom-StringData @' id_dpm_getsysinfo_activity=Gathering system information id_dpm_status_getsysinfo=Running DC_GetSystemInfo.ps1 '@ # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBP8804NUk2Cd6X # TbYBVKAucqhb0u31qtYwBWnmfjNBdqCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0 # Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD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kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT # HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB+8vLbDdn5TCVAAEA # AAH7MCIEIOcOJM95z1rtLRPImI9GcCxcLV/lXPRviSc4qDRq2ZeFMA0GCSqGSIb3 # DQEBCwUABIICAEDZzqiHsuvk4esFpl0ny0Vu69Vv8I/OKAQYUOixQrVjK/mfC2Vw # YqwX5CSNyTj08/dZCfMM48pi8dbqe83T4lVISsPUeBmRInVwL+0V01vaZuR/Mfu1 # YU1+CRpBYGWZQ7AMdct2o78ZbFDwvYUsYqokW5H8dupHG+3nEvpLJdfChRV75+8+ # 2jWPWDd0MW4ZvHJVNeWOuoeIdHmVa/BEQSJ9DrNOwlMiB4PyBM9/VBf0Hfr1dart # pmaw6EhHbVj11QxjZi257IRC6CoJdbMp4LOB6n3hKiCQiNJWI8MugXr7sZq+QnOp # vnaUDZpY25hK2SXh7Zzz+t9Au7j/tqoAiqXlt/1wv9mbFQGNVA9TNRbvOKzpaaW1 # 8kAbWUAZxbRL2rAiBoWg0azsffO52AcCFRbhCobQAKZb8jWh9viphNLUCkc+5Nj8 # dbfr3/bXVbdxJVzEkpJVawV0AwUSWZukACgnGFS512DEMJfBwpHt1eHntk/VemXz # xaVQ+vu1myMnaVTIkcFhat9+K+i3bOyC41usGSFiZZafrPQKYTbhKxc6Hpj++XAn # l8rDCd4iOEo01+PshE6ogMZSyPboh7OESac/1VHdjHemPrWV2OsgzLfcBafh4lNH # G0Odts5GYsg0nVkCVaZ5ICKxvd7WcPh1AUZ4EP2JYEPkEkQLtnCFjQWv # SIG # End signature block
combined_dataset/train/non-malicious/Resizer of pictures_2.ps1
Resizer of pictures_2.ps1
[reflection.assembly]::LoadWithPartialName("System.Drawing") $SizeLimit=1280 # required size of picture's long side $logfile="resizelog.txt" # log file for errors $toresize=$args[0] # list of directories to find and resize images. can be empty if ([string]$toresize -eq &#8220;&#8221;) { # if script startup parameter empty, use some default values $toresize=@("n:\\path1", "n:\\path2\\", "s:\\path3") } echo $toresize # visual control #Write-Host -NoNewLine ("Press any key.") # Optional "Press any key" #$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") #Write-Host "" $error.clear() # first part. find and resize jpgs Get-ChildItem -recurse $toresize -include *.jpg | foreach { $OldBitmap = new-object System.Drawing.Bitmap $_.FullName # open found jpg if ($error.count -ne 0) { # error handling $error | out-file $logfile -append -encoding default $error[($error.count-1)].TargetObject | out-file $logfile -append -encoding default echo $_>>$logfile $error.clear() } $LongSide=$OldBitmap.Width # locating long side of picture if ($OldBitmap.Width -lt $OldBitmap.Height) { $LongSide=$OldBitmap.Height } if ($LongSide -gt $SizeLimit) { # if long side is greater than our limit, process jpg if ($OldBitmap.Width -lt $OldBitmap.Height) { # calculate dimensions of picture resize to $newH=$SizeLimit $newW=[int]($OldBitmap.Width*$SizeLimit/$OldBitmap.Height) } else { $newW=$SizeLimit $newH=[int]($OldBitmap.Height*$newW/$OldBitmap.Width) } $NewBitmap = new-object System.Drawing.Bitmap $newW,$newH # create new bitmap $g=[System.Drawing.Graphics]::FromImage($NewBitmap) $g.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic # use high quality resize algorythm $g.DrawImage($OldBitmap, 0, 0, $newW, $newH) # resize our picture $name=$_.DirectoryName+"\\"+$_.name+".new" # generating name for new picture $NewBitmap.Save($name, ([system.drawing.imaging.imageformat]::jpeg)) # save newly created resized jpg $NewBitmap.Dispose() # cleaning up our mess $OldBitmap.Dispose() $n=get-childitem $name if ($n.length -ge $_.length) { # if resized jpg has greater size than original Write-host -NoNewLine "+" # draw "+" $n.delete() # and delete it } else { # if resized jpg is smaller than original if ($n.Exists -and $_.Exists) { $name=$_.FullName $_.Delete() # delete original $n.MoveTo($name) # rename new file to original name (replace old file with new) echo ($Name + " " + $LongSide) # write its name for visual control } } } else { # if long side is smaller than limit, draw dot for visual Write-host -NoNewLine "." $OldBitmap.Dispose() } } #second part. process other than jpgs bitmaps Get-ChildItem -recurse $toresize -include *.bmp, *.tif, *.gif | foreach { $OldBitmap = new-object System.Drawing.Bitmap $_.FullName # open picture if ($error.count -ne 0) { # handle errors if any $error | out-file $logfile -append -encoding default $error[($error.count-1)].TargetObject | out-file $logfile -append -encoding default $error.clear() } $LongSide=$OldBitmap.Width # find picture's long side if ($OldBitmap.Width -lt $OldBitmap.Height) { $LongSide=$OldBitmap.Height } if ($LongSide -gt $SizeLimit) { # if long side is greater than our limit, process picture if ($OldBitmap.Width -lt $OldBitmap.Height) { # calculating new dimensions $newH=$SizeLimit $newW=[int]($OldBitmap.Width*$SizeLimit/$OldBitmap.Height) } else { $newW=$SizeLimit $newH=[int]($OldBitmap.Height*$newW/$OldBitmap.Width) } $NewBitmap = new-object System.Drawing.Bitmap $newW,$newH # create new bitmap $g=[System.Drawing.Graphics]::FromImage($NewBitmap) $g.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic $g.DrawImage($OldBitmap, 0, 0, $newW, $newH) # copy resized image to it $name=$_.DirectoryName+"\\"+$_.name.substring(0, $_.name.indexof($_.extension))+".jpg" # generating new name, jpg extension $NewBitmap.Save($name, ([system.drawing.imaging.imageformat]::jpeg)) # save new file $NewBitmap.Dispose() $OldBitmap.Dispose() $n=get-childitem $name if ($n.length -ge $_.length) { # if new file is longer than original, $n.delete() # delete new file Write-host -NoNewLine "+" # and draw "+" for beauty } else { # if new file is shorter than original (as we expect) echo ($Name + " " + $LongSide) # draw its name $_.Delete() # delete oroginal } } else { # if long side is less than our limit, try to recompress it to jpg $name=$_.DirectoryName+"\\"+$_.name.substring(0, $_.name.indexof($_.extension))+".jpg" $OldBitmap.Save($name, ([system.drawing.imaging.imageformat]::jpeg)) $OldBitmap.Dispose() $n=get-childitem $name if ($n.length -ge $_.length) { # if new jpg is greater than original $n.delete() # delete new jpg Write-host -NoNewLine "-" # draw "-" for visual control } else { echo ($Name + " " + $LongSide) # draw new file name $_.Delete() # delete original } } }
combined_dataset/train/non-malicious/1624.ps1
1624.ps1
function Test-Port { param ( $ip = '127.0.0.1', $port = '515' ) begin { $tcp = New-Object Net.Sockets.TcpClient } process { try { $tcp.Connect($ip, $port) } catch {} if ($tcp.Connected) { $tcp.Close() $open = $true } else { $open = $false } [pscustomobject]@{ IP = $ip Port = $port Open = $open } } }
combined_dataset/train/non-malicious/sample_35_2.ps1
sample_35_2.ps1
# # Module manifest for module 'OCI.PSModules.Governancerulescontrolplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Governancerulescontrolplane.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '96ae80bb-9cf9-48b1-b722-28d177d3da7a' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Governancerulescontrolplane Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '81.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Governancerulescontrolplane.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIGovernancerulescontrolplaneEnforcedGovernanceRule', 'Get-OCIGovernancerulescontrolplaneEnforcedGovernanceRulesList', 'Get-OCIGovernancerulescontrolplaneGovernanceRule', 'Get-OCIGovernancerulescontrolplaneGovernanceRulesList', 'Get-OCIGovernancerulescontrolplaneInclusionCriteriaList', 'Get-OCIGovernancerulescontrolplaneInclusionCriterion', 'Get-OCIGovernancerulescontrolplaneTenancyAttachment', 'Get-OCIGovernancerulescontrolplaneTenancyAttachmentsList', 'Get-OCIGovernancerulescontrolplaneWorkRequest', 'Get-OCIGovernancerulescontrolplaneWorkRequestErrorsList', 'Get-OCIGovernancerulescontrolplaneWorkRequestLogsList', 'Get-OCIGovernancerulescontrolplaneWorkRequestsList', 'Invoke-OCIGovernancerulescontrolplaneRetryGovernanceRule', 'Invoke-OCIGovernancerulescontrolplaneRetryTenancyAttachment', 'New-OCIGovernancerulescontrolplaneGovernanceRule', 'New-OCIGovernancerulescontrolplaneInclusionCriterion', 'Remove-OCIGovernancerulescontrolplaneGovernanceRule', 'Remove-OCIGovernancerulescontrolplaneInclusionCriterion', 'Stop-OCIGovernancerulescontrolplaneWorkRequest', 'Update-OCIGovernancerulescontrolplaneGovernanceRule' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Governancerulescontrolplane' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/2814.ps1
2814.ps1
$data = $null foreach ($file in (ls *svcall.xml)) { $data += Import-Clixml $file } $data | Select-Object Caption, StartName | Sort-Object Caption, StartName | Group-Object Caption, StartName | Sort-Object Name
combined_dataset/train/non-malicious/60e46e16-ef39-4620-84a5-bc955433e811.ps1
60e46e16-ef39-4620-84a5-bc955433e811.ps1
[void]([reflection.assembly]::LoadWithPartialName("Microsoft.office.server")) $serverContext = [Microsoft.Office.Server.ServerContext]::Default $upm = [Microsoft.Office.Server.UserProfiles.UserProfileManager]$serverContext @@ $upm.psbase.properties | ? { $_.isvisibleonviewer } | select DisplayName, name, displayorder, managedpropertyname | % { "<SPSWC:ProfilePropertyCheckValue PropertyNames=""$($_.Name)"" runat=""server"" Text=""&lt;tr&gt;&lt;td class=&quot;ms-profilelabel&quot;gt;$($_.DisplayName): &lt;/td&gt;&lt;td width=&quot;65%&quot; valign=&quot;top&quot;&gt;""/><SPSWC:ProfilePropertyValue PropertyName=""$($_.name)"" class=""ms-profilevalue"" runat=""server"" /><SPSWC:ProfilePropertyCheckValue PropertyNames=""$($_.Name)"" runat=""server"" Text=""&lt;/td&gt;&lt;/tr&gt;""/>" } >a.txt; ii a.txt
combined_dataset/train/non-malicious/2596.ps1
2596.ps1
function Split-Job ( $Scriptblock = $(throw 'You must specify a command or script block!'), [int]$MaxPipelines=10, [switch]$UseProfile, [string[]]$Variable, [string[]]$Alias ) { $Queue = [Collections.Queue]::Synchronized([Collections.Queue]@($Input)) $QueueLength = $Queue.Count if ($MaxPipelines -gt $QueueLength) {$MaxPipelines = $QueueLength} $Script = "Set-Location '$PWD'; " $Script += '$Queue = $($Input); ' $Script += '& {trap {continue}; while ($Queue.Count) {$Queue.Dequeue()}} |' $Script += $Scriptblock $Pipelines = New-Object System.Collections.ArrayList function Add-Pipeline { $Runspace = [System.Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace($Host) $Runspace.Open() if ($UseProfile) { $Pipeline = $Runspace.CreatePipeline(". '$PROFILE'") $Pipeline.Invoke() $Pipeline.Dispose() } if ($Variable) { Get-Variable $Variable -Scope 2 | foreach { trap {continue} $Runspace.SessionStateProxy.SetVariable($_.Name, $_.Value) } } if ($Alias) { $Pipeline = $Runspace.CreatePipeline({$Input | Set-Alias -value {$_.Definition}}) $Null = $Pipeline.Input.Write((Get-Alias $Alias -Scope 2), $True) $Pipeline.Input.Close() $Pipeline.Invoke() $Pipeline.Dispose() } $Pipeline = $Runspace.CreatePipeline($Script) $Null = $Pipeline.Input.Write($Queue) $Pipeline.Input.Close() $Pipeline.InvokeAsync() $Null = $Pipelines.Add($Pipeline) } function Remove-Pipeline ($Pipeline) { $Pipeline.RunSpace.Close() $Pipeline.Dispose() $Pipelines.Remove($Pipeline) } while ($Pipelines.Count -lt $MaxPipelines -and $Queue.Count) {Add-Pipeline} while ($Pipelines.Count) { Write-Progress 'Split-Job' "Queues: $($Pipelines.Count)" ` -PercentComplete (100 - [Int]($Queue.Count)/$QueueLength*100) foreach ($Pipeline in (New-Object System.Collections.ArrayList(,$Pipelines))) { if ( -not $Pipeline.Output.EndOfPipeline -or -not $Pipeline.Error.EndOfPipeline ) { $Pipeline.Output.NonBlockingRead() $Pipeline.Error.NonBlockingRead() | Write-Error } else { if ($Pipeline.PipelineStateInfo.State -eq 'Failed') { Write-Error $Pipeline.PipelineStateInfo.Reason if ($Queue.Count -lt $QueueLength) {Add-Pipeline} } Remove-Pipeline $Pipeline } } Start-Sleep -Milliseconds 100 } }
combined_dataset/train/non-malicious/3101.ps1
3101.ps1
$powershellCoreModules = @( "Microsoft.PowerShell.Host" "Microsoft.PowerShell.Core" "Microsoft.PowerShell.Diagnostics" "Microsoft.PowerShell.Management" "Microsoft.PowerShell.Security" "Microsoft.PowerShell.Utility" "Microsoft.WsMan.Management" ) $extension = ".cab" $testCases = @{ "Microsoft.PowerShell.Core" = @{ HelpFiles = "System.Management.Automation.dll-help.xml" HelpInfoFiles = "Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_HelpInfo.xml" CompressedFiles = "Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_en-US_HelpContent$extension" HelpInstallationPath = "$pshome\en-US" } "Microsoft.PowerShell.Diagnostics" = @{ HelpFiles = "Microsoft.PowerShell.Commands.Diagnostics.dll-help.xml" HelpInfoFiles = "Microsoft.PowerShell.Diagnostics_ca046f10-ca64-4740-8ff9-2565dba61a4f_HelpInfo.xml" CompressedFiles = "Microsoft.PowerShell.Diagnostics_ca046f10-ca64-4740-8ff9-2565dba61a4f_en-US_helpcontent$extension" HelpInstallationPath = "$pshome\en-US" } "Microsoft.PowerShell.Host" = @{ HelpFiles = "Microsoft.PowerShell.ConsoleHost.dll-help.xml" HelpInfoFiles = "Microsoft.PowerShell.Host_56d66100-99a0-4ffc-a12d-eee9a6718aef_HelpInfo.xml" CompressedFiles = "Microsoft.PowerShell.Host_56d66100-99a0-4ffc-a12d-eee9a6718aef_en-US_helpcontent$extension" HelpInstallationPath = "$pshome\en-US" } "Microsoft.PowerShell.Management" = @{ HelpFiles = "Microsoft.PowerShell.Commands.Management.dll-help.xml" HelpInfoFiles = "Microsoft.PowerShell.Management_eefcb906-b326-4e99-9f54-8b4bb6ef3c6d_HelpInfo.xml" CompressedFiles = "Microsoft.PowerShell.Management_eefcb906-b326-4e99-9f54-8b4bb6ef3c6d_en-US_helpcontent$extension" HelpInstallationPath = "$pshome\en-US" } "Microsoft.PowerShell.Security" = @{ HelpFiles = "Microsoft.PowerShell.Security.dll-help.xml" HelpInfoFiles = "Microsoft.PowerShell.Security_a94c8c7e-9810-47c0-b8af-65089c13a35a_HelpInfo.xml" CompressedFiles = "Microsoft.PowerShell.Security_a94c8c7e-9810-47c0-b8af-65089c13a35a_en-US_helpcontent$extension" HelpInstallationPath = "$pshome\en-US" } "Microsoft.PowerShell.Utility" = @{ HelpFiles = "Microsoft.PowerShell.Commands.Utility.dll-Help.xml", "Microsoft.PowerShell.Utility-help.xml" HelpInfoFiles = "Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_HelpInfo.xml" CompressedFiles = "Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_en-US_helpcontent$extension" HelpInstallationPath = "$pshome\en-US" } "Microsoft.WSMan.Management" = @{ HelpFiles = "Microsoft.WSMan.Management.dll-help.xml" HelpInfoFiles = "Microsoft.WsMan.Management_766204A6-330E-4263-A7AB-46C87AFC366C_HelpInfo.xml" CompressedFiles = "Microsoft.WsMan.Management_766204A6-330E-4263-A7AB-46C87AFC366C_en-US_helpcontent$extension" HelpInstallationPath = "$pshome\en-US" } } if(($PSVersionTable.PSVersion.Major -ge 5) -and ($PSVersionTable.PSVersion.Minor -ge 1)) { $testCases += @{ "Microsoft.PowerShell.LocalAccounts" = @{ HelpFiles = "Microsoft.Powershell.LocalAccounts.dll-help.xml" HelpInfoFiles = "Microsoft.PowerShell.LocalAccounts_8e362604-2c0b-448f-a414-a6a690a644e2_HelpInfo.xml" CompressedFiles = "Microsoft.PowerShell.LocalAccounts_8e362604-2c0b-448f-a414-a6a690a644e2_en-US_HelpContent$extension" HelpInstallationPath = "$pshome\Modules\Microsoft.PowerShell.LocalAccounts\*\en-US" } } $powershellCoreModules += "Microsoft.PowerShell.LocalAccounts" } $modulesInBox = $powershellCoreModules function GetFiles { param ( [string]$fileType = "*help.xml", [ValidateNotNullOrEmpty()] [string]$path ) Get-ChildItem $path -Include $fileType -Recurse -ea SilentlyContinue | Select-Object -ExpandProperty FullName } function ValidateInstalledHelpContent { param ( [ValidateNotNullOrEmpty()] [string]$moduleName ) $helpFilesInstalled = @(GetFiles -path $testCases[$moduleName].HelpInstallationPath | ForEach-Object {Split-Path $_ -Leaf}) $expectedHelpFiles = @($testCases[$moduleName].HelpFiles) $helpFilesInstalled.Count | Should Be $expectedHelpFiles.Count foreach ($fileName in $expectedHelpFiles) { $helpFilesInstalled -contains $fileName | Should Be $true } } function RunUpdateHelpTests { param ( [switch]$useSourcePath ) foreach ($moduleName in $modulesInBox) { It "Validate Update-Help for module '$moduleName'" { Get-ChildItem $testCases[$moduleName].HelpInstallationPath -Include @("about_*.txt","*help.xml") -Recurse -ea SilentlyContinue | Remove-Item -Force -ErrorAction SilentlyContinue if ($useSourcePath) { Update-Help -Module $moduleName -Force -SourcePath "$PSScriptRoot\..\..\updatablehelp\5.1\$moduleName" } else { Update-Help -Module $moduleName -Force } ValidateInstalledHelpContent -moduleName $moduleName } } } Describe "Validate Update-Help -SourcePath for all PowerShell Core modules." { BeforeAll { $SavedProgressPreference = $ProgressPreference $ProgressPreference = "SilentlyContinue" } AfterAll { $ProgressPreference = $SavedProgressPreference } RunUpdateHelpTests -useSourcePath }
combined_dataset/train/non-malicious/Get-WebSite_5.ps1
Get-WebSite_5.ps1
function Get-WebSite { <# .SYNOPSIS Retrieves information about a website. .DESCRIPTION Retrieves information about a website. .PARAMETER Url URL of the website to test access to. .PARAMETER UseDefaultCredentials Use the currently authenticated user's credentials .PARAMETER Proxy Used to connect via a proxy .PARAMETER TimeOut Timeout to connect to site, in milliseconds .PARAMETER Credential Provide alternate credentials .NOTES Name: Get-WebSite Author: Boe Prox DateCreated: 08Feb2011 .EXAMPLE Get-WebSite -url "http://www.bing.com" Description ------------ Returns information about Bing.Com to include StatusCode and type of web server being used to host the site. #> [cmdletbinding( DefaultParameterSetName = 'url', ConfirmImpact = 'low' )] Param( [Parameter( Mandatory = $True, Position = 0, ParameterSetName = '', ValueFromPipeline = $True)] [string][ValidatePattern("^(http|https)\\://*")]$Url, [Parameter( Position = 1, Mandatory = $False, ParameterSetName = 'defaultcred')] [switch]$UseDefaultCredentials, [Parameter( Mandatory = $False, ParameterSetName = '')] [string]$Proxy, [Parameter( Mandatory = $False, ParameterSetName = '')] [Int]$Timeout, [Parameter( Mandatory = $False, ParameterSetName = 'altcred')] [switch]$Credential ) Begin { $psBoundParameters.GetEnumerator() | % { Write-Verbose "Parameter: $_" } #Create the initial WebRequest object using the given url Write-Verbose "Creating the web request object" $webRequest = [net.WebRequest]::Create($url) #Use Proxy address if specified If ($PSBoundParameters.ContainsKey('Proxy')) { #Create Proxy Address for Web Request Write-Verbose "Creating proxy address and adding into Web Request" $webRequest.Proxy = New-Object -TypeName Net.WebProxy($proxy,$True) } #Set timeout If ($PSBoundParameters.ContainsKey('TimeOut')) { #Setting the timeout on web request Write-Verbose "Setting the timeout on web request" $webRequest.Timeout = $timeout } #Determine if using Default Credentials If ($PSBoundParameters.ContainsKey('UseDefaultCredentials')) { #Set to True, otherwise remains False Write-Verbose "Using Default Credentials" $webrequest.UseDefaultCredentials = $True } #Determine if using Alternate Credentials If ($PSBoundParameters.ContainsKey('Credentials')) { #Prompt for alternate credentals Write-Verbose "Prompt for alternate credentials" $wc.Credential = (Get-Credential).GetNetworkCredential() } #Set TimeStamp prior to attempting connection $then = get-date } Process { Try { #Make connection to gather response from site $response = $webRequest.GetResponse() #If successful, get the date for comparison $now = get-date #Generate report Write-Verbose "Generating report from website connection and response" $report = @{ URL = $url StatusCode = $response.Statuscode -as [int] StatusDescription = $response.StatusDescription ResponseTime = "$(($now - $then).totalseconds)" WebServer = $response.Server Size = $response.contentlength } } Catch { #Get timestamp of failed attempt $now = get-date #Put the current error into a variable for later use $errorstring = "$($error[0])" #Generate report $report = @{ URL = $url StatusCode = ([regex]::Match($errorstring,"\\b\\d{3}\\b")).value StatusDescription = (($errorstring.split('\\)')[2]).split('.\\')[0]).Trim() ResponseTime = "$(($now - $then).totalseconds)" WebServer = $response.Server Size = $response.contentlength } } } End { #Display Report New-Object PSObject -property $report } }
combined_dataset/train/non-malicious/sample_26_13.ps1
sample_26_13.ps1
# # Module manifest for module 'OCI.PSModules.Resourcesearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Resourcesearch.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '7fdc6e7d-ec41-48a8-9c23-5e5149a3e83b' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Resourcesearch Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '75.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Resourcesearch.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIResourcesearchResourceType', 'Get-OCIResourcesearchResourceTypesList', 'Invoke-OCIResourcesearchSearchResources' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Resourcesearch' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/530.ps1
530.ps1
function Backup-AllSPWebs{ [CmdletBinding()] param( [Parameter(Position=0, Mandatory=$true)] [String] $Path ) if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"} $SPSites = $SPWebApp | Get-SPsite -Limit all foreach($SPSite in $SPSites){ $SPWebs = $SPSite | Get-SPWeb -Limit all foreach ($SPWeb in $SPWebs){ Write-Progress -Activity "Backup SharePoint websites" -status $SPWeb.title -percentComplete ([int]([array]::IndexOf($SPWebs, $SPWeb)/$SPWebs.Count*100)) $RelativePath = $SPSite.HostName + "\" + $SPWeb.RootFolder.ServerRelativeUrl.Replace("/","\").TrimEnd("\") $BackupPath = Join-Path -Path $Path -ChildPath $RelativePath if(!(Test-Path -path $BackupPath)){New-Item $BackupPath -Type Directory} $FileName = $SPWeb.Title + " $FilePath = Join-Path $BackupPath -ChildPath $FileName Export-SPWeb -Identity $SPWeb.Url -Path $FilePath -IncludeVersions All -IncludeUserSecurity -Force -NoLogFile -CompressionSize 1000 } } }
combined_dataset/train/non-malicious/sample_63_8.ps1
sample_63_8.ps1
# Get the version of the Torizon IDE Extension from package.json $env:TEST_EXTENSION_VERSION = ((Get-Content "package.json" -Raw) | ConvertFrom-Json).version $env:TEST_VSCODE_CLEANUP = $true # Start the tests from a clean environment, unless explictly setting to false # the env variable if ($env:TEST_VSCODE_CLEANUP -Eq $true) { # cleanup Write-Output "Clearing dotvscode and ~/.apollox" # remove dotvscode if (Test-Path "dotvscode") { Remove-Item -Recurse -Force "dotvscode" } # remove .apollox if (Test-Path -Path "$env:HOME/.apollox") { Remove-Item -Recurse -Force "$env:HOME/.apollox" } } if (!(Test-Path "dotvscode")) { # get test-resources # If vscode-extension-tester hasn't been released for the latest VSCode: # https://github.com/redhat-developer/vscode-extension-tester # use the -c <vscode version> parameter, ex: npx extest get-vscode -c 1.86.2 # When bumping vscode-extension-tester also bump this version here to the latest supported npx extest get-vscode -s "dotvscode" npx extest get-chromedriver -s "dotvscode" } # clean file stream Write-Host "" > "dotvscode/currentTestTerminalOutput.log" # remove out and recompiled it, this is useful for local tests if (Test-Path .\out) { Remove-Item -Recurse -Force .\out } # compile and pack # apollox npm --prefix ../apollox run pack $APOLLOX_FILE = ((Get-Content "package.json" -Raw) | ConvertFrom-Json).dependencies.apollox $APOLLOX_FILE = $APOLLOX_FILE.replace('file:','') Copy-Item $APOLLOX_FILE . # apollox-vscode npm install npm run pack # install npx extest install-vsix -e "dotvscode/extensions" -f ./apollox-vscode-linux-x64-$env:TEST_EXTENSION_VERSION.vsix -s "dotvscode"
combined_dataset/train/non-malicious/Bulk Change AD Passwords.ps1
Bulk Change AD Passwords.ps1
#------------------------------------------------------------- # install http://www.quest.com/powershell/activeroles-server.aspx Add-PSSnapin Quest.ActiveRoles.ADManagement # CSV Format : NTAccountName,oldpassword,newpassword $UserList = Import-Csv c:\\temp\\users.csv # | select-object -first 2 $userlist | foreach-object { Write-output ----------------------------------------------- Write-output $_.NTAccountName $ADUser= Get-QADUser $_.NTAccountName $ADSIUser = [adsi] $ADUser.Path Write-output $ADSIUser.displayName Write-output "Changing password from $($_.OldPassword) to $($_.NewPassword) ...." $result = $ADSIUser.psbase.invoke("ChangePassword",$_.OldPassword, $_.NewPassword) Write-output "Password change result $result" ## Error and success handling is needed 0 is OK the rest is an error ## http://msdn.microsoft.com/en-us/library/aa772195(v=VS.85).aspx }
combined_dataset/train/non-malicious/sample_50_24.ps1
sample_50_24.ps1
# powershell completion for azcmagent -*- shell-script -*- function __azcmagent_debug { if ($env:BASH_COMP_DEBUG_FILE) { "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" } } filter __azcmagent_escapeStringWithSpecialChars { $_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' } [scriptblock]${__azcmagentCompleterBlock} = { param( $WordToComplete, $CommandAst, $CursorPosition ) # Get the current command line and convert into a string $Command = $CommandAst.CommandElements $Command = "$Command" __azcmagent_debug "" __azcmagent_debug "========= starting completion logic ==========" __azcmagent_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition" # The user could have moved the cursor backwards on the command-line. # We need to trigger completion from the $CursorPosition location, so we need # to truncate the command-line ($Command) up to the $CursorPosition location. # Make sure the $Command is longer then the $CursorPosition before we truncate. # This happens because the $Command does not include the last space. if ($Command.Length -gt $CursorPosition) { $Command=$Command.Substring(0,$CursorPosition) } __azcmagent_debug "Truncated command: $Command" $ShellCompDirectiveError=1 $ShellCompDirectiveNoSpace=2 $ShellCompDirectiveNoFileComp=4 $ShellCompDirectiveFilterFileExt=8 $ShellCompDirectiveFilterDirs=16 $ShellCompDirectiveKeepOrder=32 # Prepare the command to request completions for the program. # Split the command at the first space to separate the program and arguments. $Program,$Arguments = $Command.Split(" ",2) $RequestComp="$Program __complete $Arguments" __azcmagent_debug "RequestComp: $RequestComp" # we cannot use $WordToComplete because it # has the wrong values if the cursor was moved # so use the last argument if ($WordToComplete -ne "" ) { $WordToComplete = $Arguments.Split(" ")[-1] } __azcmagent_debug "New WordToComplete: $WordToComplete" # Check for flag with equal sign $IsEqualFlag = ($WordToComplete -Like "--*=*" ) if ( $IsEqualFlag ) { __azcmagent_debug "Completing equal sign flag" # Remove the flag part $Flag,$WordToComplete = $WordToComplete.Split("=",2) } if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) { # If the last parameter is complete (there is a space following it) # We add an extra empty parameter so we can indicate this to the go method. __azcmagent_debug "Adding extra empty parameter" # PowerShell 7.2+ changed the way how the arguments are passed to executables, # so for pre-7.2 or when Legacy argument passing is enabled we need to use # `"`" to pass an empty argument, a "" or '' does not work!!! if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or ($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -or (($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -and $PSNativeCommandArgumentPassing -eq 'Legacy')) { $RequestComp="$RequestComp" + ' `"`"' } else { $RequestComp="$RequestComp" + ' ""' } } __azcmagent_debug "Calling $RequestComp" # First disable ActiveHelp which is not supported for Powershell ${env:AZCMAGENT_ACTIVE_HELP}=0 #call the command store the output in $out and redirect stderr and stdout to null # $Out is an array contains each line per element Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null # get directive from last line [int]$Directive = $Out[-1].TrimStart(':') if ($Directive -eq "") { # There is no directive specified $Directive = 0 } __azcmagent_debug "The completion directive is: $Directive" # remove directive (last element) from out $Out = $Out | Where-Object { $_ -ne $Out[-1] } __azcmagent_debug "The completions are: $Out" if (($Directive -band $ShellCompDirectiveError) -ne 0 ) { # Error code. No completion. __azcmagent_debug "Received error from custom completion go code" return } $Longest = 0 [Array]$Values = $Out | ForEach-Object { #Split the output in name and description $Name, $Description = $_.Split("`t",2) __azcmagent_debug "Name: $Name Description: $Description" # Look for the longest completion so that we can format things nicely if ($Longest -lt $Name.Length) { $Longest = $Name.Length } # Set the description to a one space string if there is none set. # This is needed because the CompletionResult does not accept an empty string as argument if (-Not $Description) { $Description = " " } @{Name="$Name";Description="$Description"} } $Space = " " if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) { # remove the space here __azcmagent_debug "ShellCompDirectiveNoSpace is called" $Space = "" } if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or (($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) { __azcmagent_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported" # return here to prevent the completion of the extensions return } $Values = $Values | Where-Object { # filter the result $_.Name -like "$WordToComplete*" # Join the flag back if we have an equal sign flag if ( $IsEqualFlag ) { __azcmagent_debug "Join the equal sign flag back to the completion value" $_.Name = $Flag + "=" + $_.Name } } # we sort the values in ascending order by name if keep order isn't passed if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) { $Values = $Values | Sort-Object -Property Name } if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) { __azcmagent_debug "ShellCompDirectiveNoFileComp is called" if ($Values.Length -eq 0) { # Just print an empty string here so the # shell does not start to complete paths. # We cannot use CompletionResult here because # it does not accept an empty string as argument. "" return } } # Get the current mode $Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function __azcmagent_debug "Mode: $Mode" $Values | ForEach-Object { # store temporary because switch will overwrite $_ $comp = $_ # PowerShell supports three different completion modes # - TabCompleteNext (default windows style - on each key press the next option is displayed) # - Complete (works like bash) # - MenuComplete (works like zsh) # You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function <mode> # CompletionResult Arguments: # 1) CompletionText text to be used as the auto completion result # 2) ListItemText text to be displayed in the suggestion list # 3) ResultType type of completion result # 4) ToolTip text for the tooltip with details about the object switch ($Mode) { # bash like "Complete" { if ($Values.Length -eq 1) { __azcmagent_debug "Only one completion left" # insert space after value [System.Management.Automation.CompletionResult]::new($($comp.Name | __azcmagent_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") } else { # Add the proper number of spaces to align the descriptions while($comp.Name.Length -lt $Longest) { $comp.Name = $comp.Name + " " } # Check for empty description and only add parentheses if needed if ($($comp.Description) -eq " " ) { $Description = "" } else { $Description = " ($($comp.Description))" } [System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)") } } # zsh like "MenuComplete" { # insert space after value # MenuComplete will automatically show the ToolTip of # the highlighted value at the bottom of the suggestions. [System.Management.Automation.CompletionResult]::new($($comp.Name | __azcmagent_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") } # TabCompleteNext and in case we get something unknown Default { # Like MenuComplete but we don't want to add a space here because # the user need to press space anyway to get the completion. # Description will not be shown because that's not possible with TabCompleteNext [System.Management.Automation.CompletionResult]::new($($comp.Name | __azcmagent_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") } } } } Register-ArgumentCompleter -CommandName 'azcmagent' -ScriptBlock ${__azcmagentCompleterBlock} # SIG # Begin signature block # MIInwQYJKoZIhvcNAQcCoIInsjCCJ64CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC4+uImHyFxBqHS # ZHBy5EaNTJYt5GkqsvpEdjFrCBXPHqCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG # 0W8Sb0vxi/vorcLHOL9i+t2D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0wblfIWZZEas0XihwEo8R0PVr8CaDiuM # k8gcMSu4OxH5TJKSN6zPWsCCCRUTlI3IEprL6kC/+ErHFjmuc1dMhHA5IGDJ8h1m # skkn5yX4WJpwYIrTGhEP6HDBqxmG0FAZj+NzC4z/FyVMcyVBa6jMjFrJ/2WQsFB8 # yFwWO6A= # SIG # End signature block
combined_dataset/train/non-malicious/sample_20_4.ps1
sample_20_4.ps1
# # Module manifest for module 'OCI.PSModules.Osubbillingschedule' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'd4547f1d-f4cf-431b-a0cb-3af8714cc42f' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Osubbillingschedule Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '79.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Osubbillingschedule.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIOsubbillingscheduleBillingSchedulesList' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Osubbillingschedule' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_12_75.ps1
sample_12_75.ps1
# # Module manifest for module 'OCI.PSModules.Mysql' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mysql.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'ad8c5447-7619-4d20-8318-cfb7688ec98d' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Mysql Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '74.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Mysql.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Add-OCIMysqlHeatWaveCluster', 'Get-OCIMysqlBackup', 'Get-OCIMysqlBackupsList', 'Get-OCIMysqlChannel', 'Get-OCIMysqlChannelsList', 'Get-OCIMysqlConfiguration', 'Get-OCIMysqlConfigurationsList', 'Get-OCIMysqlDbSystem', 'Get-OCIMysqlDbSystemsList', 'Get-OCIMysqlHeatWaveCluster', 'Get-OCIMysqlHeatWaveClusterMemoryEstimate', 'Get-OCIMysqlReplica', 'Get-OCIMysqlReplicasList', 'Get-OCIMysqlShapesList', 'Get-OCIMysqlVersionsList', 'Get-OCIMysqlWorkRequest', 'Get-OCIMysqlWorkRequestErrorsList', 'Get-OCIMysqlWorkRequestLogsList', 'Get-OCIMysqlWorkRequestsList', 'Invoke-OCIMysqlResumeChannel', 'Move-OCIMysqlBackupCompartment', 'New-OCIMysqlBackup', 'New-OCIMysqlChannel', 'New-OCIMysqlConfiguration', 'New-OCIMysqlDbSystem', 'New-OCIMysqlHeatWaveClusterMemoryEstimate', 'New-OCIMysqlReplica', 'Remove-OCIMysqlBackup', 'Remove-OCIMysqlChannel', 'Remove-OCIMysqlConfiguration', 'Remove-OCIMysqlDbSystem', 'Remove-OCIMysqlHeatWaveCluster', 'Remove-OCIMysqlReplica', 'Reset-OCIMysqlChannel', 'Restart-OCIMysqlDbSystem', 'Restart-OCIMysqlHeatWaveCluster', 'Start-OCIMysqlDbSystem', 'Start-OCIMysqlHeatWaveCluster', 'Stop-OCIMysqlDbSystem', 'Stop-OCIMysqlHeatWaveCluster', 'Update-OCIMysqlBackup', 'Update-OCIMysqlChannel', 'Update-OCIMysqlConfiguration', 'Update-OCIMysqlDbSystem', 'Update-OCIMysqlHeatWaveCluster', 'Update-OCIMysqlReplica' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Mysql' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_60_65.ps1
sample_60_65.ps1
# # Module manifest for module 'OCI.PSModules.Artifacts' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Artifacts.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '1fe5e04b-2e80-402c-b279-8d3ea9eca7dc' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Artifacts Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '88.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Artifacts.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIArtifactsContainerConfiguration', 'Get-OCIArtifactsContainerImage', 'Get-OCIArtifactsContainerImageSignature', 'Get-OCIArtifactsContainerImageSignaturesList', 'Get-OCIArtifactsContainerImagesList', 'Get-OCIArtifactsContainerRepositoriesList', 'Get-OCIArtifactsContainerRepository', 'Get-OCIArtifactsGenericArtifact', 'Get-OCIArtifactsGenericArtifactByPath', 'Get-OCIArtifactsGenericArtifactsList', 'Get-OCIArtifactsRepositoriesList', 'Get-OCIArtifactsRepository', 'Move-OCIArtifactsContainerRepositoryCompartment', 'Move-OCIArtifactsRepositoryCompartment', 'New-OCIArtifactsContainerImageSignature', 'New-OCIArtifactsContainerRepository', 'New-OCIArtifactsRepository', 'Remove-OCIArtifactsContainerImage', 'Remove-OCIArtifactsContainerImageSignature', 'Remove-OCIArtifactsContainerRepository', 'Remove-OCIArtifactsContainerVersion', 'Remove-OCIArtifactsGenericArtifact', 'Remove-OCIArtifactsGenericArtifactByPath', 'Remove-OCIArtifactsRepository', 'Restore-OCIArtifactsContainerImage', 'Update-OCIArtifactsContainerConfiguration', 'Update-OCIArtifactsContainerImage', 'Update-OCIArtifactsContainerImageSignature', 'Update-OCIArtifactsContainerRepository', 'Update-OCIArtifactsGenericArtifact', 'Update-OCIArtifactsGenericArtifactByPath', 'Update-OCIArtifactsRepository' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Artifacts' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_64_39.ps1
sample_64_39.ps1
# # Module manifest for module 'OCI.PSModules.Threatintelligence' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Threatintelligence.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'c229474b-5b4b-4431-8a80-8bdccc68f37d' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Threatintelligence Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.3.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Threatintelligence.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIThreatintelligenceIndicator', 'Get-OCIThreatintelligenceIndicatorCountsList', 'Get-OCIThreatintelligenceIndicatorsList', 'Get-OCIThreatintelligenceThreatTypesList', 'Invoke-OCIThreatintelligenceSummarizeIndicators' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Threatintelligence' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/2227.ps1
2227.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")] [ValidateNotNullOrEmpty()] [ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})] [string]$SiteServer, [parameter(Mandatory=$false, HelpMessage="Show a progressbar displaying the current operation")] [switch]$ShowProgress ) Begin { try { Write-Verbose -Message "Determining SiteCode for Site Server: '$($SiteServer)'" $SiteCodeObjects = Get-WmiObject -Namespace "root\SMS" -Class SMS_ProviderLocation -ComputerName $SiteServer -ErrorAction Stop foreach ($SiteCodeObject in $SiteCodeObjects) { if ($SiteCodeObject.ProviderForLocalSite -eq $true) { $SiteCode = $SiteCodeObject.SiteCode Write-Debug -Message "SiteCode: $($SiteCode)" } } } catch [System.UnauthorizedAccessException] { Write-Warning -Message "Access denied" ; break } catch [System.Exception] { Write-Warning -Message "Unable to determine SiteCode" ; break } try { Import-Module -Name ConfigurationManager -ErrorAction Stop -Verbose:$false } catch [System.UnauthorizedAccessException] { Write-Warning -Message "Access denied" ; break } catch [System.Exception] { Write-Warning -Message $_.Exception.Message ; break } $CurrentLocation = $PSScriptRoot } Process { if ($PSBoundParameters["ShowProgress"]) { $ProgressCount = 0 } $AppHashTable = New-Object -TypeName System.Collections.Hashtable Write-Verbose -Message "Reading all Applications" $Applications = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_ApplicationLatest -Filter "isExpired = 'False'" foreach ($Application in $Applications) { $Application.Get() if ($Application.PackageID -ne "") { $AppHashTable.Add($Application.PackageID, $Application.ModelName) } } Write-Verbose -Message "Querying for packages in a failed distribution state" $DistributionFailures = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_PackageStatusDistPointsSummarizer -Filter "State = '7'" if ($DistributionFailures -ne $null) { foreach ($ContentFailure in $DistributionFailures) { if ($AppHashTable["$($ContentFailure.PackageID)"]) { Write-Verbose -Message "Found Application with PackageID '$($ContentFailure.PackageID)', will attempt to update content" $ApplicationModelName = $AppHashTable["$($ContentFailure.PackageID)"] $ApplicationName = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_ApplicationLatest -Filter "ModelName = '$($ApplicationModelName)'" | Select-Object -ExpandProperty LocalizedDisplayName $DeploymentTypes = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_DeploymentType -Filter "(AppModelName = '$($ApplicationModelName)') AND (isLatest = 'True')" foreach ($DeploymentType in $DeploymentTypes) { $SiteDrive = $SiteCode + ":" Set-Location -Path $SiteDrive -Verbose:$false $DeploymentTypeName = $DeploymentType | Select-Object -ExpandProperty LocalizedDisplayName if ($PSCmdlet.ShouldProcess($DeploymentTypeName, "Update Content")) { Update-CMDistributionPoint -DeploymentTypeName $DeploymentTypeName -ApplicationName $ApplicationName -Verbose:$false Write-Verbose -Message "Successfully updated content for DeploymentType '$($DeploymentTypeName)' on Application '$($ApplicationName)'" } } Set-Location -Path $CurrentLocation -Verbose:$false } } } else { Write-Output -InputObject "There where no unsuccessful content distributions found" } Set-Location -Path $CurrentLocation -Verbose:$false }
combined_dataset/train/non-malicious/Get-WindowsExperience.ps1
Get-WindowsExperience.ps1
function Get-WindowsExperienceRating { #.Synopsis # Gets the Windows Experience Ratings #.Parameter ComputerName # The name(s) of the computer(s) to get the Windows Experience (WinSat) numbers for. [CmdletBinding()] param( [Parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [string[]]$ComputerName='localhost' ) process { $winSat = Get-WmiObject -ComputerName $ComputerName Win32_WinSAT if($WinSat.WinSatAssessmentState -ne 1) { Write-Warning "WinSAT data for '$($winSat.__SERVER)' is out of date ($($winSat.WinSatAssessmentState))" } Select-Object -Input $winSat -Property @{name="Computer";expression={$_.__SERVER}}, *Score #, WinSPRLevel } }
combined_dataset/train/non-malicious/sample_11_80.ps1
sample_11_80.ps1
ConvertFrom-StringData @' id_netframeworkngenfiles_title=.Net Framework nGen files id_netframeworkngenfiles_status=Collecting .Net Framework nGen files '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB0AItCwfynkl68 # 9CpbfMjsojyDLsAKhskPPBZIdpCiwKCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0 # Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt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IFRpbWUtU3RhbXAgUENBIDIw # MTACEzMAAAHviT9WoVjMqNoAAQAAAe8wIgQgeShDcrFcwpJG448b+b5dMVUiGXFk # NZd/gVpYymSjj+cwDQYJKoZIhvcNAQELBQAEggIACVkWbmuY3doJpC7VSOl7MkLy # nJGGVD4SCs3LdT11JAxdRpI/Kq7x3UH81J72VirULcDcyqYNiRQd42bS1HCnFXMn # iYO0Yx3n2ENYBZE/jGXb+ualrkocllTconiydGWuynFguOHNGljuNhJd3lBDNuZu # vWy4wShs3R0Y7sNQBjrVSLYL9MAz0zYSBm+OQ4/ZsWx4cg0FzaPe3IxdvdPtMd5m # nPKpI2AI7fpqW0vp15fwmHt2xeeNXF7yVxnwTP7rNbA5u3FB9BJdb2/9UMuxJXaQ # NvxDLDeMQTkYrl+mCP99QUZ0WmPM+TyTfezBGA/B94V5INaUaTB6282M1aSzdxYP # RPZdvgWRbbOR0dme5aM0Lgxybb0sXOhYJtGFQ1aGqH9uc78jgHSYtEL5KNNBEsXI # C48u0LwmhIBIQu3yC3cwB32oE7noGkodkHQ9aZTiMYJjsVWHLCVEqiuNrdpj5qUO # JCTSDAeEoMhnxUDtGJvA4cLqTjgUhvQnbwvC/DNaczyAihiHMzFzS1kqYTFXCmFn # RlgoaUa0xUpbN8cY0IRsOePA90HJzitHstlZ1Nx5rko+Lr8tzDUOIxhNr217DYjl # r4SW9d5MSpGIc6jM2NTCWaEXglagnwasmwgRMjrbAJMCaSeNj1reZptolw3kr/Nz # KpGhKGiFYPCa/teWUu4= # SIG # End signature block
combined_dataset/train/non-malicious/sample_39_37.ps1
sample_39_37.ps1
# # Module manifest for module 'Microsoft.Sdn.LoadBalancers' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.Sdn.LoadBalancers.psm1' # Version number of this module. ModuleVersion = '3.17.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'DBB7F730-24A4-4C9B-98D7-3CBBC9E8FA74' # Author of this module Author = 'SME' # Company or vendor of this module CompanyName = 'Microsoft' # Copyright statement for this module Copyright = '(c) 2018 Microsoft. All rights reserved.' # Description of the functionality provided by this module # Description = '' # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '5.0' # Name of the Windows PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the Windows PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # CLRVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module # RequiredModules = @() # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @( 'Get-BackendIpConfigurations', 'Get-BackendPools', 'Get-BackendPoolsdependonType', 'Get-FrontendIPConfiguration', 'Get-Healthprobes', 'Get-InboudNatRules', 'Get-IpConfiguartionsDependonType', 'Get-LoadBalancerConfiguration', 'Get-LoadBalancerList', 'Get-LoadBalancerMuxAvailability', 'Get-LoadBalancingRules', 'Get-LogicalNetworks', 'Get-NetworkInterfaces', 'Get-OutboundNatRules', 'Get-PublicIPAddresses', 'Get-SelectedLoadBalancer', 'Get-SubnetsofLogicalNetwork', 'Get-SubnetsofVirtualNetwork', 'Get-TargetNetworkIpConfiguration', 'Get-VirtualNetworks', 'New-BackEndIPConfiguration', 'New-FrontendIPConfiguration', 'New-HealthProbe', 'New-InboundNatRule', 'New-LoadBalancer', 'New-LoadBalancingRule', 'New-OutboundNATRule', 'Remove-BackendIPConfiguration', 'Remove-FrontendIPConfiguration', 'Remove-HealthProbe', 'Remove-InboundNatRule', 'Remove-LoadBalancer', 'Remove-LoadBalancingRule', 'Remove-OutboundNatRule', 'Update-BackendPool', 'Update-FrontEndIPConfiguration', 'Update-HealthProbe', 'Update-InboundNatRule', 'Update-LoadBalancingRule', 'Update-OutboundNatRule', 'Get-CimWin32LogicalDisk', 'Get-CimWin32NetworkAdapter', 'Get-CimWin32PhysicalMemory', 'Get-CimWin32Processor', 'Get-ClusterInventory', 'Get-ClusterNodes', 'Get-DecryptedDataFromNode', 'Get-EncryptionJWKOnNode', 'Get-ServerInventory' ) # Function attributes: {"localScripts":["Get-BackendIpConfigurations","Get-BackendPools","Get-BackendPoolsdependonType","Get-FrontendIPConfiguration","Get-Healthprobes","Get-InboudNatRules","Get-IpConfiguartionsDependonType","Get-LoadBalancerConfiguration","Get-LoadBalancerList","Get-LoadBalancerMuxAvailability","Get-LoadBalancingRules","Get-LogicalNetworks","Get-NetworkInterfaces","Get-OutboundNatRules","Get-PublicIPAddresses","Get-SelectedLoadBalancer","Get-SubnetsofLogicalNetwork","Get-SubnetsofVirtualNetwork","Get-TargetNetworkIpConfiguration","Get-VirtualNetworks","New-BackEndIPConfiguration","New-FrontendIPConfiguration","New-HealthProbe","New-InboundNatRule","New-LoadBalancer","New-LoadBalancingRule","New-OutboundNATRule","Remove-BackendIPConfiguration","Remove-FrontendIPConfiguration","Remove-HealthProbe","Remove-InboundNatRule","Remove-LoadBalancer","Remove-LoadBalancingRule","Remove-OutboundNatRule","Update-BackendPool","Update-FrontEndIPConfiguration","Update-HealthProbe","Update-InboundNatRule","Update-LoadBalancingRule","Update-OutboundNatRule"],"externalScripts":["Get-CimWin32LogicalDisk","Get-CimWin32NetworkAdapter","Get-CimWin32PhysicalMemory","Get-CimWin32Processor","Get-ClusterInventory","Get-ClusterNodes","Get-DecryptedDataFromNode","Get-EncryptionJWKOnNode","Get-ServerInventory"]} # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @() # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. # Tags = @() # A URL to the license for this module. # LicenseUri = '' # A URL to the main website for this project. # ProjectUri = '' # A URL to an icon representing this module. # IconUri = '' # ReleaseNotes of this module # ReleaseNotes = '' } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' } # SIG # Begin signature block # MIInwgYJKoZIhvcNAQcCoIInszCCJ68CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBXcVy8LiC99KmS # 8EIMmfWf3vFlChXfVnRqVZHdxmiNl6CCDXYwggX0MIID3KADAgECAhMzAAADTrU8 # esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBx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c81HvoFQZDROAeryTA2raWRi4IlpSHL0w4r2AQlIhwHpMWAxuozeH+xmV # cKhnjAU9b97eHXCWzbMrGCfYwoS53xrtJ9pV2t57XF1y4ZTh+5Uj8mVczJviw+iX # LXbK/yX/UN65Kt4q4N8ZDHMSeI3hux+jC7U2ABC1Pxn7ICCNfY2gl+oQDsUQNEzo # X5AZBAXQvIeLEMxBFMbukGUxDpkjWWXf3+PcTUMDsnPpfO7ky936YEW2KAuFMAG9 # BaT8ZigQYUh4D/1gPur8Ps/OM/U3qtkgfRxhC38ENjQCI+HkJzOWC6JkERaapPnH # J3CJDS4KnMXxkZZOv+6drxpEhDiz6FfUV9f9CBzhE//GefO2WnudcLKUj4fECkUd # NqR1Q9UgoJzxd+74GfoweA+lmTjfwqu2Gjeav9FISfaEH7lBsWicqPx9s8vaDPb5 # 9KsVAE2n # SIG # End signature block
combined_dataset/train/non-malicious/1582.ps1
1582.ps1
function Find-MrModuleUpdate { [CmdletBinding()] [OutputType('Mr.ModuleUpdate')] param ( [ValidateNotNullOrEmpty()] [string[]]$Name, [ValidateSet('AllUsers', 'CurrentUser')] [string]$Scope ) $AllUsersPath = "$env:ProgramFiles\WindowsPowerShell\Modules\*" $CurrentUserPath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules\*" switch ($Scope) { 'AllUsers' {$Path = $AllUsersPath; break} 'CurrentUser' {$Path = $CurrentUserPath; break} Default {$Path = $AllUsersPath, $CurrentUserPath} } $Params = @{ ListAvailable = $true } if ($PSBoundParameters.Name) { $Params.Name = $Name } $Modules = Get-Module @Params foreach ($p in $Path) { $ScopedModules = $Modules | Where-Object ModuleBase -like $p | Sort-Object -Property Name, Version -Descending | Get-Unique foreach ($Module in $ScopedModules) { Remove-Variable -Name InstallInfo -ErrorAction SilentlyContinue $Repo = Find-Module -Name $Module.Name -ErrorAction SilentlyContinue if ($Repo) { $Diff = Compare-Object -ReferenceObject $Module -DifferenceObject $Repo -Property Name, Version | Where-Object SideIndicator -eq '=>' if ($Diff) { $PSGetModuleInfoPath = "$($Module.ModuleBase)\PSGetModuleInfo.xml" if (Test-Path -Path $PSGetModuleInfoPath) { $InstallInfo = Import-Clixml -Path $PSGetModuleInfoPath } switch ($Module.ModuleBase) { {$_ -like $AllUsersPath} {$Location = 'AllUsers'; break} {$_ -like $CurrentUserPath} {$Location = 'CurrentUser'; break} Default {Throw 'An unexpected error has occured.'} } [pscustomobject]@{ Name = $Module.Name InstalledVersion = $Module.Version InstalledLocation = $Location Repository = $Repo.Repository RepositoryVersion = $Diff.Version InstalledFromRepository = $InstallInfo.Repository PSTypeName = 'Mr.ModuleUpdate' } } } } } }
combined_dataset/train/non-malicious/validate an IP address_1.ps1
validate an IP address_1.ps1
# validate given IP address in $ip1 variable $ip1 = "192.168.22.455" ($ip1.split(".") | where-object { $_ -ge 1 -and $_ -le 255 } | Where-Object { $_ -match "\\d{1,3}"} | Measure-Object).count -eq 4
combined_dataset/train/non-malicious/922.ps1
922.ps1
$resourceGroup = "myResourceGroup" $location = "westeurope" $vmName = "myVM" New-AzResourceGroup -Name $resourceGroup -Location $location $cred = Get-Credential -Message "Enter a username and password for the virtual machine." New-AzVM ` -ResourceGroupName $resourceGroup ` -Name $vmName ` -Location $location ` -ImageName "Win2016Datacenter" ` -VirtualNetworkName "myVnet" ` -SubnetName "mySubnet" ` -SecurityGroupName "myNetworkSecurityGroup" ` -PublicIpAddressName "myPublicIp" ` -Credential $cred ` -OpenPorts 80 $PublicSettings = '{"ModulesURL":"https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-iis-server-windows-vm/ContosoWebsite.ps1.zip", "configurationFunction": "ContosoWebsite.ps1\\ContosoWebsite", "Properties": {"MachineName": "myVM"} }' Set-AzVMExtension -ExtensionName "DSC" -ResourceGroupName $resourceGroup -VMName $vmName ` -Publisher "Microsoft.Powershell" -ExtensionType "DSC" -TypeHandlerVersion 2.19 ` -SettingString $PublicSettings -Location $location
combined_dataset/train/non-malicious/sample_56_17.ps1
sample_56_17.ps1
# # Module manifest for module 'OCI.PSModules.Cloudmigrations' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudmigrations.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'b42be880-f45d-4128-a505-71c63f0f1b48' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Cloudmigrations Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Cloudmigrations.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Export-OCICloudmigrationsMigrationPlan', 'Get-OCICloudmigrationsAvailableShapesList', 'Get-OCICloudmigrationsMigration', 'Get-OCICloudmigrationsMigrationAsset', 'Get-OCICloudmigrationsMigrationAssetsList', 'Get-OCICloudmigrationsMigrationPlan', 'Get-OCICloudmigrationsMigrationPlansList', 'Get-OCICloudmigrationsMigrationsList', 'Get-OCICloudmigrationsReplicationProgress', 'Get-OCICloudmigrationsReplicationSchedule', 'Get-OCICloudmigrationsReplicationSchedulesList', 'Get-OCICloudmigrationsTargetAsset', 'Get-OCICloudmigrationsTargetAssetsList', 'Get-OCICloudmigrationsWorkRequest', 'Get-OCICloudmigrationsWorkRequestErrorsList', 'Get-OCICloudmigrationsWorkRequestLogsList', 'Get-OCICloudmigrationsWorkRequestsList', 'Import-OCICloudmigrationsMigrationPlan', 'Invoke-OCICloudmigrationsExecuteMigrationPlan', 'Invoke-OCICloudmigrationsRefreshMigration', 'Invoke-OCICloudmigrationsRefreshMigrationAsset', 'Invoke-OCICloudmigrationsRefreshMigrationPlan', 'Move-OCICloudmigrationsMigrationCompartment', 'Move-OCICloudmigrationsMigrationPlanCompartment', 'Move-OCICloudmigrationsReplicationScheduleCompartment', 'New-OCICloudmigrationsMigration', 'New-OCICloudmigrationsMigrationAsset', 'New-OCICloudmigrationsMigrationPlan', 'New-OCICloudmigrationsReplicationSchedule', 'New-OCICloudmigrationsTargetAsset', 'Remove-OCICloudmigrationsMigration', 'Remove-OCICloudmigrationsMigrationAsset', 'Remove-OCICloudmigrationsMigrationPlan', 'Remove-OCICloudmigrationsReplicationSchedule', 'Remove-OCICloudmigrationsTargetAsset', 'Start-OCICloudmigrationsAssetReplication', 'Start-OCICloudmigrationsMigrationReplication', 'Stop-OCICloudmigrationsWorkRequest', 'Update-OCICloudmigrationsMigration', 'Update-OCICloudmigrationsMigrationAsset', 'Update-OCICloudmigrationsMigrationPlan', 'Update-OCICloudmigrationsReplicationSchedule', 'Update-OCICloudmigrationsTargetAsset' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Cloudmigrations' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/3945.ps1
3945.ps1
function Test-VirtualNetworkeExpressRouteGatewayConnectionCRUD { $rgname = "onesdkTestConnection" $vnetConnectionName = Get-ResourceName $location = Get-ProviderLocation "Microsoft.Network/vpnGateways" "West US" try { $resourceGroup = Get-AzResourceGroup -Name $rgname Assert-NotNull $resourceGroup $gw = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname Assert-AreEqual 1 @($gw).Count $circuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname Assert-AreEqual 1 @($circuit).Count $actual = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $gw -ConnectionType ExpressRoute -RoutingWeight 3 -PeerId $circuit.Id $expected = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $expected.Name $actual.Name Assert-AreEqual "ExpressRoute" $expected.ConnectionType Assert-AreEqual "3" $expected.RoutingWeight Assert-AreEqual $False $expected.ExpressRouteGatewayBypass $list = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -Name "*" Assert-True { $list.Count -ge 0 } Get-AzExpressRouteCircuitARPTable -ResourceGroupName $rgname -ExpressRouteCircuitName $circuit.Name -PeeringType AzurePrivatePeering -DevicePath Primary $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force Assert-AreEqual true $delete $list = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName Assert-AreEqual 0 @($list).Count $connection = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $gw -ConnectionType ExpressRoute -RoutingWeight 3 -PeerId $circuit.Id -ExpressRouteGatewayBypass $getConnection = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual $getConnection.ResourceGroupName $connection.ResourceGroupName Assert-AreEqual $getConnection.Name $connection.Name Assert-AreEqual "ExpressRoute" $getConnection.ConnectionType Assert-AreEqual "3" $getConnection.RoutingWeight Assert-AreEqual $True $getConnection.ExpressRouteGatewayBypass $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force Assert-AreEqual true $delete $list = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName Assert-AreEqual 0 @($list).Count } finally { } } function Test-VirtualNetworkGatewayConnectionWithBgpCRUD { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $domainNameLabel = Get-ResourceName $vnetName = Get-ResourceName $localnetName = Get-ResourceName $vnetConnectionName = Get-ResourceName $publicIpName = Get-ResourceName $vnetGatewayConfigName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet $vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname $subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel $vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard -Asn 55000 $vnetGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname Assert-AreEqual $vnetGateway.BgpSettings.Asn $actual.BgpSettings.Asn $actual = New-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName -location $location -AddressPrefix 192.168.0.0/16 -GatewayIpAddress 192.168.3.10 -Asn 1337 -BgpPeeringAddress "192.168.1.1" -PeerWeight 5 $localnetGateway = Get-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName Assert-AreEqual $localnetGateway.BgpSettings.Asn $actual.BgpSettings.Asn Assert-AreEqual $localnetGateway.BgpSettings.BgpPeeringAddress $actual.BgpSettings.BgpPeeringAddress Assert-AreEqual $localnetGateway.BgpSettings.PeerWeight $actual.BgpSettings.PeerWeight $actual = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey abc -EnableBgp $true $connection = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual $connection.EnableBgp $actual.EnableBgp $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force Assert-AreEqual true $delete } finally { Clean-ResourceGroup $rgname } } function Test-VirtualNetworkGatewayConnectionWithTrafficSelector { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $domainNameLabel = Get-ResourceName $vnetName = Get-ResourceName $localnetName = Get-ResourceName $vnetConnectionName = Get-ResourceName $publicIpName = Get-ResourceName $vnetGatewayConfigName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet $vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname $subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet $trafficSelector = New-AzIpsecTrafficSelectorPolicy -LocalAddressRange ("20.20.0.0/16") -RemoteAddressRange ("10.10.0.0/16") $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel $vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard -Asn 55000 $vnetGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname Assert-AreEqual $vnetGateway.BgpSettings.Asn $actual.BgpSettings.Asn $actual = New-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName -location $location -AddressPrefix 192.168.0.0/16 -GatewayIpAddress 192.168.3.10 $localnetGateway = Get-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName $actual = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey abc -TrafficSelectorPolicy ($trafficSelector) $connection = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-NotNull $connection; Assert-NotNull $connection.TrafficSelectorPolicies; Assert-AreEqual $connection.TrafficSelectorPolicies.Count 1 $connectionTrafficSelector = $connection.TrafficSelectorPolicies[0]; Assert-AreEqual $trafficSelector.LocalAddressRanges[0] $connectionTrafficSelector.LocalAddressRanges[0]; Assert-AreEqual $trafficSelector.RemoteAddressRanges[0] $connectionTrafficSelector.RemoteAddressRanges[0]; $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force Assert-AreEqual true $delete } finally { Clean-ResourceGroup $rgname } } function Test-VirtualNetworkGatewayConnectionWithIpsecPoliciesCRUD { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $domainNameLabel = Get-ResourceName $vnetName = Get-ResourceName $localnetName = Get-ResourceName $vnetConnectionName = Get-ResourceName $publicIpName = Get-ResourceName $vnetGatewayConfigName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet $vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname $subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel $vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard $vnetGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname $actual = New-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName -location $location -AddressPrefix 192.168.0.0/16 -GatewayIpAddress 192.168.3.10 $localnetGateway = Get-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName $ipsecPolicy = New-AzIpsecPolicy -IpsecEncryption "GCMAES256" -IpsecIntegrity "GCMAES256" -IkeEncryption "AES256" -IkeIntegrity "SHA256" -DhGroup "DHGroup14" -PfsGroup "PFS2048" Assert-AreEqual $ipsecPolicy.SALifeTimeSeconds 27000 Assert-AreEqual $ipsecPolicy.SADataSizeKilobytes 102400000 $ipsecPolicy = New-AzIpsecPolicy -SALifeTimeSeconds 3000 -SADataSizeKilobytes 10000 -IpsecEncryption "GCMAES256" -IpsecIntegrity "GCMAES256" -IkeEncryption "AES256" -IkeIntegrity "SHA256" -DhGroup "DHGroup14" -PfsGroup "PFS2048" $job = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey abc -EnableBgp $false -UsePolicyBasedTrafficSelectors $true -IpsecPolicies $ipsecPolicy -AsJob $job | Wait-Job $actual = $job | Receive-Job $connection = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual $connection.UsePolicyBasedTrafficSelectors $actual.UsePolicyBasedTrafficSelectors Assert-AreEqual $connection.IpsecPolicies.Count $actual.IpsecPolicies.Count Assert-AreEqual $connection.IpsecPolicies[0].SALifeTimeSeconds $actual.IpsecPolicies[0].SALifeTimeSeconds Assert-AreEqual $connection.IpsecPolicies[0].SADataSizeKilobytes $actual.IpsecPolicies[0].SADataSizeKilobytes Assert-AreEqual $connection.IpsecPolicies[0].IpsecEncryption $actual.IpsecPolicies[0].IpsecEncryption Assert-AreEqual $connection.IpsecPolicies[0].IpsecIntegrity $actual.IpsecPolicies[0].IpsecIntegrity Assert-AreEqual $connection.IpsecPolicies[0].IkeEncryption $actual.IpsecPolicies[0].IkeEncryption Assert-AreEqual $connection.IpsecPolicies[0].IkeIntegrity $actual.IpsecPolicies[0].IkeIntegrity Assert-AreEqual $connection.IpsecPolicies[0].DhGroup $actual.IpsecPolicies[0].DhGroup Assert-AreEqual $connection.IpsecPolicies[0].PfsGroup $actual.IpsecPolicies[0].PfsGroup $job = Set-AzVirtualNetworkGatewayConnection -VirtualNetworkGatewayConnection $connection -UsePolicyBasedTrafficSelectors $false -IpsecPolicies @() -Force -AsJob $job | Wait-Job $actual = $job | Receive-Job $connection = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual false $connection.UsePolicyBasedTrafficSelectors Assert-AreEqual 0 $connection.IpsecPolicies.Count $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force Assert-AreEqual true $delete } finally { Clean-ResourceGroup $rgname } } function Test-VirtualNetworkGatewayConnectionWithActiveActiveGateway { $rgname = Get-ResourceGroupName $rname1 = Get-ResourceName $rname2 = Get-ResourceName $domainNameLabel11 = Get-ResourceName $domainNameLabel12 = Get-ResourceName $domainNameLabel2 = Get-ResourceName $vnetName1 = Get-ResourceName $vnetName2 = Get-ResourceName $vnetConnectionName1 = Get-ResourceName $vnetConnectionName2 = Get-ResourceName $publicIpName11 = Get-ResourceName $publicIpName12 = Get-ResourceName $publicIpName2 = Get-ResourceName $vnetGatewayConfigName11 = Get-ResourceName $vnetGatewayConfigName12 = Get-ResourceName $vnetGatewayConfigName2 = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $subnet1 = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet1 = New-AzVirtualNetwork -Name $vnetName1 -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet1 $vnet1 = Get-AzVirtualNetwork -Name $vnetName1 -ResourceGroupName $rgname $subnet1 = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet1 $publicip11 = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName11 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel11 $vnetIpConfig11 = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName11 -PublicIpAddress $publicip11 -Subnet $subnet1 $publicip12 = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName12 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel12 $vnetIpConfig12 = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName12 -PublicIpAddress $publicip12 -Subnet $subnet1 $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname1 -Location $location -IpConfigurations $vnetIpConfig11,$vnetIpConfig12 -GatewayType Vpn -VpnType RouteBased -EnableBgp $false -GatewaySku HighPerformance -EnableActiveActiveFeature $vnetGateway1 = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname1 $subnet2 = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 192.168.200.0/26 $vnet2 = New-AzVirtualNetwork -Name $vnetName2 -ResourceGroupName $rgname -Location $location -AddressPrefix 192.168.0.0/16 -Subnet $subnet2 $vnet2 = Get-AzVirtualNetwork -Name $vnetName2 -ResourceGroupName $rgname $subnet2 = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet2 $publicip2 = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName2 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel2 $vnetIpConfig2 = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName2 -PublicIpAddress $publicip2 -Subnet $subnet2 $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2 -location $location -IpConfigurations $vnetIpConfig2 -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard $vnetGateway2 = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2 $actual1 = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName1 -location $location -VirtualNetworkGateway1 $vnetGateway1 -VirtualNetworkGateway2 $vnetGateway2 -ConnectionType Vnet2Vnet -RoutingWeight 3 -SharedKey abc $actual2 = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName2 -location $location -VirtualNetworkGateway1 $vnetGateway2 -VirtualNetworkGateway2 $vnetGateway1 -ConnectionType Vnet2Vnet -RoutingWeight 3 -SharedKey abc $connection1 = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName1 Assert-NotNull $connection1.TunnelConnectionStatus $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName1 -PassThru -Force Assert-AreEqual true $delete $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName2 -PassThru -Force Assert-AreEqual true $delete } finally { Clean-ResourceGroup $rgname } } function Test-VirtualNetworkGatewayConnectionCRUD { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $domainNameLabel = Get-ResourceName $vnetName = Get-ResourceName $localnetName = Get-ResourceName $vnetConnectionName = Get-ResourceName $publicIpName = Get-ResourceName $vnetGatewayConfigName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet $vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname $subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel $vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -EnableBgp $false $vnetGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname Assert-AreEqual $vnetGateway.ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $vnetGateway.Name $actual.Name $actual = New-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName -location $location -AddressPrefix 192.168.0.0/16 -GatewayIpAddress 192.168.3.10 $localnetGateway = Get-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName Assert-AreEqual $localnetGateway.ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $localnetGateway.Name $actual.Name Assert-AreEqual "192.168.3.10" $localnetGateway.GatewayIpAddress Assert-AreEqual "192.168.0.0/16" $localnetGateway.LocalNetworkAddressSpace.AddressPrefixes[0] $localnetGateway.Location = $location $actual = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey abc -ConnectionProtocol IKEv1 $expected = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $expected.Name $actual.Name Assert-AreEqual "IPsec" $expected.ConnectionType Assert-AreEqual "3" $expected.RoutingWeight Assert-AreEqual "IKEv1" $expected.ConnectionProtocol $list = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname Assert-AreEqual 1 @($list).Count Assert-AreEqual $list[0].ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $list[0].Name $actual.Name Assert-AreEqual "IPsec" $list[0].ConnectionType Assert-AreEqual "3" $list[0].RoutingWeight $expected.Location = $location $expected.VirtualNetworkGateway1.Location = $location $expected.LocalNetworkGateway2.Location = $location $expected.RoutingWeight = "4" $expected.SharedKey = "xyz" $actual = Set-AzVirtualNetworkGatewayConnection -VirtualNetworkGatewayConnection $expected -Tag @{ testtagKey="SomeTagKey"; testtagValue="SomeKeyValue" } -Force $expected = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual 2 $expected.Tag.Count Assert-AreEqual $true $expected.Tag.Contains("testtagKey") $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force Assert-AreEqual true $delete $list = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName Assert-AreEqual 0 @($list).Count } finally { Clean-ResourceGroup $rgname } } function Test-VirtualNetworkGatewayConnectionSharedKeyCRUD { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $domainNameLabel = Get-ResourceName $vnetName = Get-ResourceName $localnetName = Get-ResourceName $vnetConnectionName = Get-ResourceName $publicIpName = Get-ResourceName $vnetGatewayConfigName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet $vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname $subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel $vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -EnableBgp $false Assert-AreEqual $rgname $actual.ResourceGroupName Assert-AreEqual $rname $actual.Name Assert-AreEqual "Vpn" $actual.GatewayType Assert-AreEqual "RouteBased" $actual.VpnType Assert-AreEqual $false $actual.EnableBgp $vnetGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname Assert-AreEqual $vnetGateway.ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $vnetGateway.Name $actual.Name $actual = New-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName -location $location -AddressPrefix 192.168.0.0/16 -GatewayIpAddress 192.168.3.11 $localnetGateway = Get-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName Assert-AreEqual $localnetGateway.ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $localnetGateway.Name $actual.Name Assert-AreEqual "192.168.3.11" $localnetGateway.GatewayIpAddress Assert-AreEqual "192.168.0.0/16" $localnetGateway.LocalNetworkAddressSpace.AddressPrefixes[0] $localnetGateway.Location = $location $actual = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey abc $expected = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName Assert-AreEqual $expected.Name $actual.Name Assert-AreEqual "IPsec" $expected.ConnectionType Assert-AreEqual "3" $expected.RoutingWeight Assert-AreEqual "abc" $expected.SharedKey $actual = Set-AzVirtualNetworkGatewayConnectionSharedKey -ResourceGroupName $rgname -name $vnetConnectionName -Value "TestSharedKeyValue" -Force Assert-AreEqual "TestSharedKeyValue" $actual $expected = Get-AzVirtualNetworkGatewayConnectionSharedKey -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreEqual "TestSharedKeyValue" $expected Start-TestSleep 60000 $actual = Reset-AzVirtualNetworkGatewayConnectionSharedKey -ResourceGroupName $rgname -name $vnetConnectionName -KeyLength 50 -Force Assert-AreNotEqual "TestSharedKeyValue" $actual $expected = Get-AzVirtualNetworkGatewayConnectionSharedKey -ResourceGroupName $rgname -name $vnetConnectionName Assert-AreNotEqual "TestSharedKeyValue" $expected } finally { Clean-ResourceGroup $rgname } } function Test-VirtualNetworkGatewayConnectionVpnDeviceConfigurations { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $domainNameLabel = Get-ResourceName $vnetName = Get-ResourceName $localnetName = Get-ResourceName $vnetConnectionName = Get-ResourceName $publicIpName = Get-ResourceName $vnetGatewayConfigName = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } $subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet $vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname $subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel $vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard $vnetGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname $actual = New-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName -location $location -AddressPrefix 192.168.0.0/16 -GatewayIpAddress 192.168.3.10 $localnetGateway = Get-AzLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName $ipsecPolicy = New-AzIpsecPolicy -IpsecEncryption "GCMAES256" -IpsecIntegrity "GCMAES256" -IkeEncryption "AES256" -IkeIntegrity "SHA256" -DhGroup "DHGroup14" -PfsGroup "PFS2048" Assert-AreEqual $ipsecPolicy.SALifeTimeSeconds 27000 Assert-AreEqual $ipsecPolicy.SADataSizeKilobytes 102400000 $ipsecPolicy = New-AzIpsecPolicy -SALifeTimeSeconds 3000 -SADataSizeKilobytes 10000 -IpsecEncryption "GCMAES256" -IpsecIntegrity "GCMAES256" -IkeEncryption "AES256" -IkeIntegrity "SHA256" -DhGroup "DHGroup14" -PfsGroup "PFS2048" $actual = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey abc -EnableBgp $false -UsePolicyBasedTrafficSelectors $true -IpsecPolicies $ipsecPolicy $connection = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName $supportedVpnDevices = Get-AzVirtualNetworkGatewaySupportedVpnDevice -ResourceGroupName $rgname -name $rname $supportedDevicesXml = [xml]$supportedVpnDevices $vendorNode = $supportedDevicesXml.SelectSingleNode("//Vendor") $deviceNode = $vendorNode.FirstChild $vendorName = $vendorNode.Attributes["name"].Value $deviceName = $deviceNode.Attributes["name"].Value $firmwareVersion = $deviceNode.FirstChild.Attributes["name"].Value $vpnDeviceConfigurationScript = Get-AzVirtualNetworkGatewayConnectionVpnDeviceConfigScript -ResourceGroupName $rgname -name $vnetConnectionName -DeviceVendor $vendorName -DeviceFamily $deviceName -FirmwareVersion $firmwareVersion Write-Host $vpnDeviceConfigurationScript } finally { Clean-ResourceGroup $rgname } } function Test-VirtualNetworkGatewayConnectionPacketCapture { $rgname = Get-ResourceGroupName $rname1 = Get-ResourceName $rname2 = Get-ResourceName $domainNameLabel1 = Get-ResourceName $domainNameLabel2 = Get-ResourceName $vnetName1 = Get-ResourceName $vnetName2 = Get-ResourceName $vnetConnectionName1 = Get-ResourceName $vnetConnectionName2 = Get-ResourceName $publicIpName1 = Get-ResourceName $publicIpName2 = Get-ResourceName $vnetGatewayConfigName1 = Get-ResourceName $vnetGatewayConfigName2 = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement "WestCentralUS" $resourceTypeParent = "Microsoft.Network/connections" $location = Get-ProviderLocation $resourceTypeParent "WestCentralUS" try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } if ((Get-NetworkTestMode) -ne 'Playback') { $storetype = 'Standard_GRS' $containerName = "testcontainer" $storeName = 'sto' + $rgname; New-AzStorageAccount -ResourceGroupName $rgname -Name $storeName -Location $location -Type $storetype $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value New-AzStorageContainer -Name $containerName -Context $context $container = Get-AzStorageContainer -Name $containerName -Context $context $now=get-date $sasurl = New-AzureStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri } else { $sasurl = "https://storage/test123?sp=racwdl&stvigopKcy" } $subnet1 = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24 $vnet1 = New-AzVirtualNetwork -Name $vnetName1 -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet1 $vnet1 = Get-AzVirtualNetwork -Name $vnetName1 -ResourceGroupName $rgname $subnet1 = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet1 $publicip1 = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName1 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel1 $vnetIpConfig1 = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName1 -PublicIpAddress $publicip1 -Subnet $subnet1 $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname1 -Location $location -IpConfigurations $vnetIpConfig1 -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard $vnetGateway1 = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname1 $subnet2 = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 192.168.200.0/26 $vnet2 = New-AzVirtualNetwork -Name $vnetName2 -ResourceGroupName $rgname -Location $location -AddressPrefix 192.168.0.0/16 -Subnet $subnet2 $vnet2 = Get-AzVirtualNetwork -Name $vnetName2 -ResourceGroupName $rgname $subnet2 = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet2 $publicip2 = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName2 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel2 $vnetIpConfig2 = New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName2 -PublicIpAddress $publicip2 -Subnet $subnet2 $actual = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2 -location $location -IpConfigurations $vnetIpConfig2 -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard $vnetGateway2 = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2 $actual1 = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName1 -location $location -VirtualNetworkGateway1 $vnetGateway1 -VirtualNetworkGateway2 $vnetGateway2 -ConnectionType Vnet2Vnet -RoutingWeight 3 -SharedKey abc $actual2 = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName2 -location $location -VirtualNetworkGateway1 $vnetGateway2 -VirtualNetworkGateway2 $vnetGateway1 -ConnectionType Vnet2Vnet -RoutingWeight 3 -SharedKey abc $connection = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName1 $output = Start-AzVirtualNetworkGatewayConnectionPacketCapture -ResourceGroupName $rgname -Name $vnetConnectionName1 Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Name $output.Name Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Location $output.Location Assert-AreEqual $output.Code "Succeeded" $output = Stop-AzVirtualNetworkGatewayConnectionPacketCapture -ResourceGroupName $rgname -Name $vnetConnectionName1 -SasUrl $sasurl Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Name $output.Name Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Location $output.Location Assert-AreEqual $output.Code "Succeeded" $a="{`"TracingFlags`":11,`"MaxPacketBufferSize`":120,`"MaxFileSize`":500,`"Filters`":[{`"SourceSubnets`":[`"10.19.0.4/32`",`"10.20.0.4/32`"],`"DestinationSubnets`":[`"10.20.0.4/32`",`"10.19.0.4/32`"],`"IpSubnetValueAsAny`":true,`"TcpFlags`":-1,`"PortValueAsAny`":true,`"CaptureSingleDirectionTrafficOnly`":true}]}" $output = Start-AzVirtualNetworkGatewayConnectionPacketCapture -InputObject $connection -FilterData $a Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Name $output.Name Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Location $output.Location Assert-AreEqual $output.Code "Succeeded" $output = Stop-AzVirtualNetworkGatewayConnectionPacketCapture -InputObject $connection -SasUrl $sasurl Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Name $output.Name Assert-AreEqual $connection.ResourceGroupName $output.ResourceGroupName Assert-AreEqual $connection.Location $output.Location Assert-AreEqual $output.Code "Succeeded" $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $connection.ResourceGroupName -name $vnetConnectionName1 -PassThru -Force Assert-AreEqual true $delete $delete = Remove-AzVirtualNetworkGatewayConnection -ResourceGroupName $actual2.ResourceGroupName -name $vnetConnectionName2 -PassThru -Force Assert-AreEqual true $delete $list = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $connection.ResourceGroupName Assert-AreEqual 0 @($list).Count } finally { Clean-ResourceGroup $rgname } }
combined_dataset/train/non-malicious/Findup_20.ps1
Findup_20.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System.Text.RegularExpressions; namespace Findup { public class FileLengthComparer : IComparer<FileInfo> { public int Compare(FileInfo x, FileInfo y) { return (x.Length.CompareTo(y.Length)); } } class Findup { public static Dictionary<string, List<string>> optionspaths = new Dictionary<string, List<string>> { {"-x", new List<string>()},{"-i",new List<string>()},{"-xf",new List<string>()},{"-if",new List<string>()}, {"-xd",new List<string>()},{"-id",new List<string>()},{"-paths",new List<string>()} }; public static Dictionary<string, Boolean> optionsbools = new Dictionary<string, bool> { { "-recurse", false }, { "-regex", false }, { "-noerr", false }, {"-delete",false} }; public static long numOfDupes = 0; // number of duplicate files found. public static long dupeBytes = 0; // number of bytes in duplicates. public static long bytesrecovered = 0; // Bytes recovered from deleting dupes. public static long deletedfiles = 0; // Number of deleted dupes. public static string delconfirm; public static void Main(string[] args) { Console.WriteLine("Findup.exe v2.0 - By James Gentile - JamesRaymondGentile@gmail.com - 2012."); Console.WriteLine(" "); string optionspathskey = "-paths"; List<FileInfo> files = new List<FileInfo>(); int i = 0; for (i = 0; i < args.Length; i++) { string argitem=args[i].ToLower(); if ((System.String.Compare(argitem, "-help", true) == 0) || (System.String.Compare(argitem, "-h", true) == 0)) { Console.WriteLine("Usage: findup.exe <file/directory #1..#N> [-recurse] [-noerr] [-x/-i/-xd/-id/-xf/-if] <files/directories/regex> [-regex] [-delete]"); Console.WriteLine(" "); Console.WriteLine("Options: -help - displays this help message."); Console.WriteLine(" -recurse - recurses through subdirectories when directories or file specifications (e.g. *.txt) are specified."); Console.WriteLine(" -noerr - discards error messages."); Console.WriteLine(" -delete - delete each duplicate file with confirmation."); Console.WriteLine(" -x - eXcludes if full file path starts with (or RegEx matches if -regex supplied) one of the items following this switch until another switch is used."); Console.WriteLine(" -i - include if full file path starts with (or Regex matches if -regex supplied) one of the items following this switch until another switch is used."); Console.WriteLine(" -xd - eXcludes all directories (using RegEx if -regex supplied) including subdirs following this switch until another switch is used."); Console.WriteLine(" -id - Include only directories (using RegEx if -regex supplied) including subdirs following this switch until another switch is used."); Console.WriteLine(" -xf - eXcludes all files (using RegEx if -regex supplied) following this switch until another switch is used."); Console.WriteLine(" -if - Include only files (using RegEx if -regex supplied) following this switch until another switch is used."); Console.WriteLine(" -regex - Use Regex notation for exclude (-x) and include (-i) option."); Console.WriteLine(" -paths - not needed unless you want to specify files/dirs after an include/exclude without using another non-exclude/non-include option."); Console.WriteLine(" "); Console.WriteLine("Examples: findup.exe c:\\\\finances -recurse -noerr"); Console.WriteLine(" - Find dupes in c:\\\\finance."); Console.WriteLine(" - recurse all subdirs of c:\\\\finance."); Console.WriteLine(" - suppress error messages."); Console.WriteLine(" findup.exe c:\\\\users\\\\alice\\\\plan.txt d:\\\\data -recurse -x d:\\\\data\\\\webpics"); Console.WriteLine(" - Find dupes in c:\\\\users\\\\alice\\\\plan.txt, d:\\\\data"); Console.WriteLine(" - recurse subdirs in d:\\\\data."); Console.WriteLine(" - exclude any files in d:\\\\data\\\\webpics and subdirs."); Console.WriteLine(" findup.exe c:\\\\data *.txt c:\\\\reports\\\\quarter.doc -x \\"(jim)\\" -regex"); Console.WriteLine(" - Find dupes in c:\\\\data, *.txt in current directory and c:\\\\reports\\\\quarter.doc"); Console.WriteLine(" - exclude any file with 'jim' in the name as specified by the Regex item \\"(jim)\\""); Console.WriteLine(" findup.exe c:\\\\data *.txt c:\\\\reports\\\\bobsmithquarter.doc -x \\"[bf]\\" -i \\"(smith)\\" -regex"); Console.WriteLine(" - Find dupes in c:\\\\data, *.txt in current directory and c:\\\\reports\\\\bobsmithquarter.doc"); Console.WriteLine(" - Include only files with 'smith' and exclude any file with letters b or f in the name as specified by the Regex items \\"[bf]\\",\\"(smith)\\""); Console.WriteLine("Note: Exclude takes precedence over Include."); Console.WriteLine(" -xd,-id,-xf,-if are useful if for instance you want to apply a RegEx to only file names but not directory names or vice versa."); Console.WriteLine(" if for instance you wanted all files that contained the letter \\"d\\" on your D: drive but didn't want the d:\\\\ to cause all files on the d:\\\\ "); Console.WriteLine(" drive to be included, you would specify:"); Console.WriteLine(" findup.exe d:\\\\ -recurse -noerr -regex -if \\"[d]\\" "); return; } if (optionsbools.ContainsKey(argitem)) { optionsbools[argitem] = true; optionspathskey = "-paths"; continue; } if (optionspaths.ContainsKey(argitem)) { optionspathskey = argitem; continue; } optionspaths[optionspathskey].Add(argitem); } if (optionspaths["-paths"].Count == 0) { WriteErr("No files, file specifications, or directories specified. Try findup.exe -help. Assuming current directory."); optionspaths["-paths"].Add("."); } Console.Write("Getting file info and sorting file list..."); getFiles(optionspaths["-paths"], "*.*", optionsbools["-recurse"], files); if (files.Count < 2) { WriteErr("\\nFindup.exe needs at least 2 files to compare. Try findup.exe -help"); return; } files.Sort(new FileLengthComparer()); Console.WriteLine("Completed!"); Console.Write("Building dictionary of file sizes, SHA512 hashes and full paths..."); var SizeHashName = new Dictionary<long, Dictionary<string,List<string>>>(); for (i = 0; i < (files.Count - 1); i++) { if (files[i].Length != files[i + 1].Length) { continue; } var breakout = false; while (true) { var _SHA512 = SHA512.Create(); try { using (var fstream = File.OpenRead(files[i].FullName)) { _SHA512.ComputeHash(fstream); } System.Text.Encoding enc = System.Text.Encoding.ASCII; string SHA512string = enc.GetString(_SHA512.Hash); if (!SizeHashName.ContainsKey(files[i].Length)) SizeHashName.Add(files[i].Length, new Dictionary<string,List<string>>()); if (!SizeHashName[files[i].Length].ContainsKey(SHA512string)) SizeHashName[files[i].Length][SHA512string] = new List<string>() {}; SizeHashName[files[i].Length][SHA512string].Add(files[i].FullName); } catch (Exception e) { WriteErr("Hash error: " + e.Message); } if (breakout == true) {break;} i++; if (i == (files.Count - 1)) { breakout = true; continue; } breakout = (files[i].Length != files[i + 1].Length); } } Console.WriteLine("Completed!"); foreach (var SizeGroup in SizeHashName) { foreach (var HashGroup in SizeGroup.Value) { var SGK = (long)SizeGroup.Key; var HGVC = (int)HashGroup.Value.Count; if (HGVC > 1) { Console.WriteLine("{0:N0} Duplicate files. {1:N0} Bytes each. {2:N0} Bytes total : ", HGVC, SGK, SGK*HGVC); foreach (var FileName in HashGroup.Value) { Console.WriteLine(FileName); numOfDupes++; if (optionsbools["-delete"]) if (DeleteDupe(FileName)) { bytesrecovered += SGK; } } dupeBytes += SGK * HGVC; } } } Console.WriteLine("\\n "); Console.WriteLine("Files checked : {0:N0}", files.Count); Console.WriteLine("Duplicate files : {0:N0}", numOfDupes); Console.WriteLine("Duplicate bytes : {0:N0}", dupeBytes); Console.WriteLine("Deleted duplicates : {0:N0}", deletedfiles); Console.WriteLine("Bytes recovered : {0:N0}", bytesrecovered); return; // Exit after displaying statistics. } private static void WriteErr(string Str) { if (!optionsbools["-noerr"]) Console.WriteLine(Str); } private static Boolean DeleteDupe(string FileName) { Console.Write("Delete this file <y/N> <ENTER>?"); delconfirm = Console.ReadLine(); if ((delconfirm[0] == 'Y') || (delconfirm[0] == 'y')) { try { File.Delete(FileName); Console.WriteLine("File Successfully deleted."); deletedfiles++; return true; } catch (Exception e) { Console.WriteLine("File could not be deleted: " + e.Message); } } return false; } private static Boolean CheckAll(string full) { if (!CheckWorker(full, optionspaths["-x"])) return false; if ((optionspaths["-i"].Count > 0) == CheckWorker(full, optionspaths["-i"])) return false; var filePart = Path.GetFileName(full); var dirPart = Path.GetDirectoryName(full); if (!CheckWorker(filePart, optionspaths["-xf"])) return false; if (!CheckWorker(dirPart, optionspaths["-xd"])) return false; if ((optionspaths["-if"].Count > 0) == CheckWorker(filePart, optionspaths["-if"])) return false; if ((optionspaths["-id"].Count > 0) == CheckWorker(dirPart, optionspaths["-id"])) return false; return true; } private static Boolean CheckWorker(string full, List<string> pathsitems) { foreach (var x in pathsitems) { if (optionsbools["-regex"]) { try { Regex rgx = new Regex(x); if (rgx.IsMatch(full)) return false; } catch (Exception e) { WriteErr("Invalid regex used: " + x + " exception: " + e); } } else { if (full.ToLower().StartsWith(x)) { return false; } } } return true; } private static void getFiles(List<string> pathRec, string searchPattern, Boolean recursiveFlag, List<FileInfo> returnList) { foreach (string d in pathRec) { getFiles(d, searchPattern, recursiveFlag, returnList); } return; } private static void getFiles(string[] pathRec, string searchPattern, Boolean recursiveFlag, List<FileInfo> returnList) { foreach (string d in pathRec) { getFiles(d, searchPattern, recursiveFlag, returnList); } return; } private static void getFiles(string pathRec, string searchPattern, Boolean recursiveFlag, List<FileInfo> returnList) { string dirPart; string filePart; if (File.Exists(pathRec)) { try { FileInfo addf = (new FileInfo(pathRec)); if (((addf.Attributes & FileAttributes.ReparsePoint) == 0) && CheckAll(addf.FullName)) returnList.Add(addf); } catch (Exception e) { WriteErr("Add file error: " + e.Message); } } else if (Directory.Exists(pathRec)) { try { DirectoryInfo Dir = new DirectoryInfo(pathRec); foreach (FileInfo addf in (Dir.GetFiles(searchPattern))) { if (((addf.Attributes & FileAttributes.ReparsePoint) == 0) && CheckAll(addf.FullName)) returnList.Add(addf); } } catch (Exception e) { WriteErr("Add files from Directory error: " + e.Message); } if (recursiveFlag) { try { getFiles((Directory.GetDirectories(pathRec)), searchPattern, recursiveFlag, returnList); } catch (Exception e) { WriteErr("Add Directory error: " + e.Message); } } } else { try { filePart = Path.GetFileName(pathRec); dirPart = Path.GetDirectoryName(pathRec); } catch (Exception e) { WriteErr("Parse error on: " + pathRec); WriteErr(@"Make sure you don't end a directory with a \\ when using quotes. The console arg parser doesn't accept that."); WriteErr("Exception: " + e.Message); return; } if (filePart.IndexOfAny(new char[] {'?','*'}) >= 0) { if ((dirPart == null) || (dirPart == "")) dirPart = Directory.GetCurrentDirectory(); if (Directory.Exists(dirPart)) { getFiles(dirPart, filePart, recursiveFlag, returnList); return; } } WriteErr("Invalid file path, directory path, file specification, or program option specified: " + pathRec); } } } }
combined_dataset/train/non-malicious/sample_43_72.ps1
sample_43_72.ps1
--- name: Request a gRPC C# feature about: Suggest an idea for this project labels: kind/enhancement, priority/P2, lang/C# assignees: apolcyn --- <!-- PLEASE DO NOT POST A QUESTION HERE. This form is for bug reports and feature requests ONLY! For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new) --> ### Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] ### Describe the solution you'd like A clear and concise description of what you want to happen. ### Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. ### Additional context Add any other context about the feature request here.
combined_dataset/train/non-malicious/3799.ps1
3799.ps1
function Log($test, $message) { Out-File -FilePath "$test.log" -Append -InputObject $message } function Test-AEMExtensionBasicWindowsWAD { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { $vm = Create-AdvancedVM -rgname $rgname -loc $loc $vmname = $vm.Name $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-False { $testResult.Result } (GetWrongTestResult $testResult $true) Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorage -EnableWAD $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.AzureCAT.AzureEnhancedMonitoring' Assert-AreEqual $extension.ExtensionType 'AzureCATExtensionHandler' Assert-AreEqual $extension.Name 'AzureCATExtensionHandler' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WaitTimeInMinutes 50 -SkipStorageCheck Assert-True { $testResult.Result } (GetWrongTestResult $testResult $false) Assert-True { ($testResult.PartialResults.Count -gt 0) } Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionBasicWindows { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { $vm = Create-AdvancedVM -rgname $rgname -loc $loc $vmname = $vm.Name $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-False { $testResult.Result } Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorage $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.AzureCAT.AzureEnhancedMonitoring' Assert-AreEqual $extension.ExtensionType 'AzureCATExtensionHandler' Assert-AreEqual $extension.Name 'AzureCATExtensionHandler' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WaitTimeInMinutes 50 -SkipStorageCheck Assert-True { $testResult.Result } Assert-True { ($testResult.PartialResults.Count -gt 0) } Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedWindowsWAD { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { Write-Debug "Start the test Test-AEMExtensionAdvancedWindows" $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_DS2' -stotype 'Premium_LRS' -nicCount 2 $vmname = $vm.Name Write-Host "Test-AEMExtensionAdvancedWindows: VM created" Write-Debug "Test-AEMExtensionAdvancedWindows: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedWindows: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-False { $res.Result } (GetWrongTestResult $res $true) Write-Debug "Test-AEMExtensionAdvancedWindows: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Write-Debug "Test-AEMExtensionAdvancedWindows: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage -EnableWAD Write-Debug "Test-AEMExtensionAdvancedWindows: Set done" Write-Debug "Test-AEMExtensionAdvancedWindows: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.AzureCAT.AzureEnhancedMonitoring' Assert-AreEqual $extension.ExtensionType 'AzureCATExtensionHandler' Assert-AreEqual $extension.Name 'AzureCATExtensionHandler' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Write-Debug "Test-AEMExtensionAdvancedWindows: Get done" Write-Debug "Test-AEMExtensionAdvancedWindows: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-True { $res.Result } (GetWrongTestResult $res $false) Assert-True { ($res.PartialResults.Count -gt 0) } Write-Debug "Test-AEMExtensionAdvancedWindows: Test done" Write-Debug "Test-AEMExtensionAdvancedWindows: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Write-Debug "Test-AEMExtensionAdvancedWindows: Remove done" Write-Debug "Test-AEMExtensionAdvancedWindows: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedWindows: Get after remove done" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedWindows { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { Write-Debug "Start the test Test-AEMExtensionAdvancedWindows" $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_DS2' -stotype 'Premium_LRS' -nicCount 2 $vmname = $vm.Name Write-Debug "Test-AEMExtensionAdvancedWindows: VM created" Write-Debug "Test-AEMExtensionAdvancedWindows: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedWindows: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-False { $res.Result } Write-Debug "Test-AEMExtensionAdvancedWindows: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Write-Debug "Test-AEMExtensionAdvancedWindows: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage Write-Debug "Test-AEMExtensionAdvancedWindows: Set done" Write-Debug "Test-AEMExtensionAdvancedWindows: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.AzureCAT.AzureEnhancedMonitoring' Assert-AreEqual $extension.ExtensionType 'AzureCATExtensionHandler' Assert-AreEqual $extension.Name 'AzureCATExtensionHandler' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Write-Debug "Test-AEMExtensionAdvancedWindows: Get done" Write-Debug "Test-AEMExtensionAdvancedWindows: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-True { $res.Result } Assert-True { ($res.PartialResults.Count -gt 0) } Write-Debug "Test-AEMExtensionAdvancedWindows: Test done" Write-Debug "Test-AEMExtensionAdvancedWindows: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Write-Debug "Test-AEMExtensionAdvancedWindows: Remove done" Write-Debug "Test-AEMExtensionAdvancedWindows: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedWindows: Get after remove done" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedWindowsMD { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { Write-Debug "Start the test Test-AEMExtensionAdvancedWindowsMD" $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_DS2' -stotype 'Premium_LRS' -nicCount 2 -useMD $vmname = $vm.Name Write-Debug "Test-AEMExtensionAdvancedWindowsMD: VM created" Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-False { $res.Result } Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Set done" Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.AzureCAT.AzureEnhancedMonitoring' Assert-AreEqual $extension.ExtensionType 'AzureCATExtensionHandler' Assert-AreEqual $extension.Name 'AzureCATExtensionHandler' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Assert-True { ($extension.PublicSettings.Contains("osdisk.caching")) } Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Get done" Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-True { $res.Result } Assert-True { ($res.PartialResults.Count -gt 0) } Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Test done" Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Remove done" Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedWindowsMD: Get after remove done" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedLinuxMD { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { Write-Host "Start the test Test-AEMExtensionAdvancedLinuxMD" $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_DS2' -stotype 'Premium_LRS' -nicCount 2 -useMD -linux $vmname = $vm.Name $vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname Add-AzVMDataDisk -VM $vm -StorageAccountType Premium_LRS -Lun (($vm.StorageProfile.DataDisks | select -ExpandProperty Lun | Measure-Object -Maximum).Maximum + 1) -CreateOption Empty -DiskSizeInGB 2059 | Update-AzVM Write-Debug "Test-AEMExtensionAdvancedLinuxMD: VM created" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck $tmp = $res;$out = &{while ($true) { if ($tmp) { foreach ($tmpRes in $tmp) {($tmpRes.TestName + " " + $tmpRes.Result)};$tmp = @($tmp.PartialResults)} else {break}}}; Assert-False { $res.Result } "Test result is not false $out" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Set done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.OSTCExtensions' Assert-AreEqual $extension.ExtensionType 'AzureEnhancedMonitorForLinux' Assert-AreEqual $extension.Name 'AzureEnhancedMonitorForLinux' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck $tmp = $res;$out = &{while ($true) { if ($tmp) { foreach ($tmpRes in $tmp) {($tmpRes.TestName + " " + $tmpRes.Result)};$tmp = @($tmp.PartialResults)} else {break}}}; Assert-True { $res.Result } "Test result is not false $out" Assert-True { ($res.PartialResults.Count -gt 0) } Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Remove done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get after remove done" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionBasicLinuxWAD { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { $vm = Create-AdvancedVM -rgname $rgname -loc $loc -linux $vmname = $vm.Name $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-False { $testResult.Result } Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorage -EnableWAD $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.OSTCExtensions' Assert-AreEqual $extension.ExtensionType 'AzureEnhancedMonitorForLinux' Assert-AreEqual $extension.Name 'AzureEnhancedMonitorForLinux' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WaitTimeInMinutes 50 -SkipStorageCheck Assert-True { $testResult.Result } Assert-True { ($testResult.PartialResults.Count -gt 0) } Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionBasicLinux { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { $vm = Create-AdvancedVM -rgname $rgname -loc $loc -linux $vmname = $vm.Name $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-False { $testResult.Result } Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorage $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.OSTCExtensions' Assert-AreEqual $extension.ExtensionType 'AzureEnhancedMonitorForLinux' Assert-AreEqual $extension.Name 'AzureEnhancedMonitorForLinux' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg $testResult = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WaitTimeInMinutes 50 -SkipStorageCheck Assert-True { $testResult.Result } Assert-True { ($testResult.PartialResults.Count -gt 0) } Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedLinuxWAD { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { Write-Debug "Start the test Test-AEMExtensionAdvancedLinux" $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_DS2' -stotype 'Premium_LRS' -nicCount 2 -linux $vmname = $vm.Name Write-Debug "Test-AEMExtensionAdvancedLinux: VM created" Write-Debug "Test-AEMExtensionAdvancedLinux: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinux: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Write-Debug ("Test-AEMExtensionAdvancedLinux: Test result " + $res.Result) Assert-False { $res.Result } (GetWrongTestResult $res $true) Write-Debug "Test-AEMExtensionAdvancedLinux: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Write-Debug "Test-AEMExtensionAdvancedLinux: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage -EnableWAD Write-Debug "Test-AEMExtensionAdvancedLinux: Set done" Write-Debug "Test-AEMExtensionAdvancedLinux: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.OSTCExtensions' Assert-AreEqual $extension.ExtensionType 'AzureEnhancedMonitorForLinux' Assert-AreEqual $extension.Name 'AzureEnhancedMonitorForLinux' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Write-Debug "Test-AEMExtensionAdvancedLinux: Get done" Write-Debug "Test-AEMExtensionAdvancedLinux: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-True { $res.Result } (GetWrongTestResult $res $false) Assert-True { ($res.PartialResults.Count -gt 0) } Write-Debug "Test-AEMExtensionAdvancedLinux: Test done" Write-Debug "Test-AEMExtensionAdvancedLinux: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Write-Debug "Test-AEMExtensionAdvancedLinux: Remove done" Write-Debug "Test-AEMExtensionAdvancedLinux: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinux: Get after remove done" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedLinux { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { Write-Debug "Start the test Test-AEMExtensionAdvancedLinux" $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_DS2' -stotype 'Premium_LRS' -nicCount 2 -linux $vmname = $vm.Name Write-Debug "Test-AEMExtensionAdvancedLinux: VM created" Write-Debug "Test-AEMExtensionAdvancedLinux: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinux: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Write-Debug ("Test-AEMExtensionAdvancedLinux: Test result " + $res.Result) Assert-False { $res.Result } Write-Debug "Test-AEMExtensionAdvancedLinux: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Write-Debug "Test-AEMExtensionAdvancedLinux: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage Write-Debug "Test-AEMExtensionAdvancedLinux: Set done" Write-Debug "Test-AEMExtensionAdvancedLinux: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.OSTCExtensions' Assert-AreEqual $extension.ExtensionType 'AzureEnhancedMonitorForLinux' Assert-AreEqual $extension.Name 'AzureEnhancedMonitorForLinux' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Write-Debug "Test-AEMExtensionAdvancedLinux: Get done" Write-Debug "Test-AEMExtensionAdvancedLinux: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck Assert-True { $res.Result } Assert-True { ($res.PartialResults.Count -gt 0) } Write-Debug "Test-AEMExtensionAdvancedLinux: Test done" Write-Debug "Test-AEMExtensionAdvancedLinux: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Write-Debug "Test-AEMExtensionAdvancedLinux: Remove done" Write-Debug "Test-AEMExtensionAdvancedLinux: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinux: Get after remove done" } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedLinuxMD_E { $rgname = Get-ComputeTestResourceName [string]$loc = Get-ComputeVMLocation; $loc = $loc.Replace(' ', ''); try { Write-Debug "Start the test Test-AEMExtensionAdvancedLinuxMD_E" $ultraSSDInfo = Get-AzComputeResourceSku | where { $_.LocationInfo.Location -eq $loc -and $_.Name -eq "UltraSSD_LRS" }; Write-Debug "Test-AEMExtensionAdvancedLinuxMD_E: Got UltraSSD info $($ultraSSDInfo)" $zoneparams = @{} if ($ultraSSDInfo) { $zoneparams.Add("zone", $ultraSSDInfo.LocationInfo.Zones[0]) } $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_E4s_v3' -stotype 'Premium_LRS' -nicCount 2 -useMD -linux @zoneparams Write-Debug "Test-AEMExtensionAdvancedLinuxMD_E: VM created" $vmname = $vm.Name $vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname Add-AzVMDataDisk -VM $vm -StorageAccountType Premium_LRS -Lun (($vm.StorageProfile.DataDisks | select -ExpandProperty Lun | Measure-Object -Maximum).Maximum + 1) -CreateOption Empty -DiskSizeInGB 2059 | Update-AzVM Add-AzVMDataDisk -VM $vm -StorageAccountType Premium_LRS -Lun (($vm.StorageProfile.DataDisks | select -ExpandProperty Lun | Measure-Object -Maximum).Maximum + 1) -CreateOption Empty -DiskSizeInGB 16000 | Update-AzVM Add-AzVMDataDisk -VM $vm -StorageAccountType Premium_LRS -Lun (($vm.StorageProfile.DataDisks | select -ExpandProperty Lun | Measure-Object -Maximum).Maximum + 1) -CreateOption Empty -DiskSizeInGB 32000 | Update-AzVM if ($ultraSSDInfo) { $nul = Stop-AzVm -ResourceGroupName $rgname -Name $vmname -Force $vm = Get-AzVM -ResourceGroupName $rgname -VMName $vmname $vm | update-azvm -UltraSSDEnabled $true $nul = Start-AzVm -ResourceGroupName $rgname -Name $vmname $ultraDisk = New-AzDiskConfig -SkuName UltraSSD_LRS -DiskSizeGB 512 -DiskIOPSReadWrite 5000 -DiskMBpsReadWrite 20 -CreateOption Empty -Location $loc -Zone $ultraSSDInfo.LocationInfo.Zones[0] ` | New-AzDisk -ResourceGroupName $rgname -DiskName "ultrassd" Add-AzVMDataDisk -VM $vm -ManagedDiskId $ultraDisk.Id -Lun (($vm.StorageProfile.DataDisks | select -ExpandProperty Lun | Measure-Object -Maximum).Maximum + 1) -CreateOption Attach ` | Update-AzVM } else { Write-Debug "Test-AEMExtensionAdvancedLinuxMD_E: not testing UltraSSD because the resource sku is not available" } Write-Debug "Test-AEMExtensionAdvancedLinuxMD: VM created" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck $tmp = $res;$out = &{while ($true) { if ($tmp) { foreach ($tmpRes in $tmp) {($tmpRes.TestName + " " + $tmpRes.Result)};$tmp = @($tmp.PartialResults)} else {break}}}; Assert-False { $res.Result } "Test result is not false $out" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Set done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.OSTCExtensions' Assert-AreEqual $extension.ExtensionType 'AzureEnhancedMonitorForLinux' Assert-AreEqual $extension.Name 'AzureEnhancedMonitorForLinux' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck $tmp = $res;$out = &{while ($true) { if ($tmp) { foreach ($tmpRes in $tmp) {($tmpRes.TestName + " " + $tmpRes.Result)};$tmp = @($tmp.PartialResults)} else {break}}}; Assert-True { $res.Result } "Test result is not false $out" Assert-True { ($res.PartialResults.Count -gt 0) } Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Test done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Remove done" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Write-Debug "Test-AEMExtensionAdvancedLinuxMD: Get after remove done" } catch { Write-Debug "Exception while running test: $($_)" throw } finally { Clean-ResourceGroup $rgname } } function Test-AEMExtensionAdvancedLinuxMD_D { $rgname = Get-ComputeTestResourceName [string]$loc = Get-ComputeVMLocation; $loc = $loc.Replace(' ', ''); try { Log "Test-AEMExtensionAdvancedLinuxMD_D" "Start the test Test-AEMExtensionAdvancedLinuxMD" $vm = Create-AdvancedVM -rgname $rgname -loc $loc -vmsize 'Standard_D2s_v3' -stotype 'Premium_LRS' -nicCount 2 -useMD -linux Log "Test-AEMExtensionAdvancedLinuxMD_D" "VM created" $vmname = $vm.Name $vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname Add-AzVMDataDisk -VM $vm -StorageAccountType Premium_LRS -Lun (($vm.StorageProfile.DataDisks | select -ExpandProperty Lun | Measure-Object -Maximum).Maximum + 1) -CreateOption Empty -DiskSizeInGB 2059 | Update-AzVM Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: VM created" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Get with no extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" "Extension is not null" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Test with no extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck $tmp = $res;$out = &{while ($true) { if ($tmp) { foreach ($tmpRes in $tmp) {($tmpRes.TestName + " " + $tmpRes.Result)};$tmp = @($tmp.PartialResults)} else {break}}}; Assert-False { $res.Result } "Test result is not false $out" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Test done" $stoname = 'sto' + $rgname + "2"; New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type 'Standard_LRS'; Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Set with no extension" Set-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -WADStorageAccountName $stoname -SkipStorage Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Set done" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Get with extension" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension Assert-AreEqual $extension.Publisher 'Microsoft.OSTCExtensions' Assert-AreEqual $extension.ExtensionType 'AzureEnhancedMonitorForLinux' Assert-AreEqual $extension.Name 'AzureEnhancedMonitorForLinux' $settings = $extension.PublicSettings | ConvertFrom-Json Assert-NotNull $settings.cfg Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Get done" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Test with extension" $res = Test-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname -SkipStorageCheck $tmp = $res;$out = &{while ($true) { if ($tmp) { foreach ($tmpRes in $tmp) {($tmpRes.TestName + " " + $tmpRes.Result)};$tmp = @($tmp.PartialResults)} else {break}}}; Assert-True { $res.Result } "Test result is not false $out" Assert-True { ($res.PartialResults.Count -gt 0) } Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Test done" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Remove with extension" Remove-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Remove done" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Get after remove" $extension = Get-AzVMAEMExtension -ResourceGroupName $rgname -VMName $vmname Assert-Null $extension "Extension is not null" Log "Test-AEMExtensionAdvancedLinuxMD_D" "Test-AEMExtensionAdvancedLinuxMD: Get after remove done" } finally { Clean-ResourceGroup $rgname } } function Create-AdvancedVM($rgname, $vmname, $loc, $vmsize, $stotype, $nicCount, [Switch] $linux, [Switch] $useMD, $zone) { Write-Debug "Start Create-AdvancedVM" $rgname = if ([string]::IsNullOrEmpty($rgname)) { Get-ComputeTestResourceName } else { $rgname } $vmname = if ([string]::IsNullOrEmpty($vmname)) { 'vm' + $rgname } else { $vmname } $loc = if ([string]::IsNullOrEmpty($loc)) { Get-ComputeVMLocation } else { $loc } $vmsize = if ([string]::IsNullOrEmpty($vmsize)) { 'Standard_A2' } else { $vmsize } $stotype = if ([string]::IsNullOrEmpty($stotype)) { 'Standard_LRS' } else { $stotype } $nicCount = if ([string]::IsNullOrEmpty($nicCount)) { 1 } else { [int]$nicCount } $g = New-AzResourceGroup -Name $rgname -Location $loc -Force; $zoneparams = @{} if ($zone) { $zoneparams.Add("Zone", $zone) } $p = New-AzVMConfig -VMName $vmname -VMSize $vmsize @zoneparams; Assert-AreEqual $p.HardwareProfile.VmSize $vmsize; Write-Debug "Start Create-AdvancedVM - Config done" $subnet = New-AzVirtualNetworkSubnetConfig -Name ('subnet' + $rgname) -AddressPrefix "10.0.0.0/24"; $vnet = New-AzVirtualNetwork -Force -Name ('vnet' + $rgname) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -Subnet $subnet; $vnet = Get-AzVirtualNetwork -Name ('vnet' + $rgname) -ResourceGroupName $rgname; $subnetId = $vnet.Subnets[0].Id; $pubip = New-AzPublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -AllocationMethod Static -DomainNameLabel ('pubip' + $rgname) -Sku Standard; $pubip = Get-AzPublicIpAddress -Name ('pubip' + $rgname) -ResourceGroupName $rgname; $pubipId = $pubip.Id; Write-Debug "Start Create-AdvancedVM - adding pip $($pubip.Id)" $pibparams = @{} $pibparams.Add("PublicIpAddressId", $pubip.Id) $nicPrimParams = @{} $nicPrimParams.Add("Primary", $true) for ($i = 0;$i -lt $nicCount;$i++) { $nic = New-AzNetworkInterface -Force -Name ('nic' + $i + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId @pibparams $nic = Get-AzNetworkInterface -Name ('nic' + $i + $rgname) -ResourceGroupName $rgname; $nicId = $nic.Id; $p = Add-AzVMNetworkInterface -VM $p -Id $nicId @nicPrimParams; Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[$i].Id $nicId; $pibparams = @{} $nicPrimParams = @{} } Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count $nicCount; Write-Debug "Start Create-AdvancedVM 1" $stoname = 'sto' + $rgname; $s = New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype; $global:stoaccount = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname; $stokey = (Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $stoname).Key1; $osDiskName = 'osDisk'; $osDiskCaching = 'ReadWrite'; $osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/os.vhd"; $dataDiskVhdUri1 = "https://$stoname.blob.core.windows.net/test/data1.vhd"; $dataDiskVhdUri2 = "https://$stoname.blob.core.windows.net/test/data2.vhd"; $dataDiskVhdUri3 = "https://$stoname.blob.core.windows.net/test/data3.vhd"; $osURI = @{} $disk1Uri = @{} $disk2Uri = @{} $disk3Uri = @{} Write-Debug "Start Create-AdvancedVM 2" if (-not $useMD) { $osURI = @{"VhdUri"=$osDiskVhdUri} $disk1Uri = @{"VhdUri"=$dataDiskVhdUri1} $disk2Uri = @{"VhdUri"=$dataDiskVhdUri2} $disk3Uri = @{"VhdUri"=$dataDiskVhdUri3} } $p = Set-AzVMOSDisk -VM $p -Name $osDiskName @osURI -Caching $osDiskCaching -CreateOption FromImage -DiskSizeInGB 128; Write-Debug "Start Create-AdvancedVM 3" $p = Add-AzVMDataDisk -VM $p -Name 'testDataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 1 @disk1Uri -CreateOption Empty; $p = Add-AzVMDataDisk -VM $p -Name 'testDataDisk2' -Caching 'ReadOnly' -DiskSizeInGB 11 -Lun 2 @disk2Uri -CreateOption Empty; $p = Add-AzVMDataDisk -VM $p -Name 'testDataDisk3' -Caching 'ReadOnly' -DiskSizeInGB 12 -Lun 3 @disk3Uri -CreateOption Empty; $p = Remove-AzVMDataDisk -VM $p -Name 'testDataDisk3'; Assert-AreEqual $p.StorageProfile.OsDisk.Caching $osDiskCaching; Assert-AreEqual $p.StorageProfile.OsDisk.Name $osDiskName; if (-not $useMD) { Assert-AreEqual $p.StorageProfile.OsDisk.Vhd.Uri $osDiskVhdUri; } Assert-AreEqual $p.StorageProfile.DataDisks.Count 2; Assert-AreEqual $p.StorageProfile.DataDisks[0].Caching 'ReadOnly'; Assert-AreEqual $p.StorageProfile.DataDisks[0].DiskSizeGB 10; Assert-AreEqual $p.StorageProfile.DataDisks[0].Lun 1; if (-not $useMD) { Assert-AreEqual $p.StorageProfile.DataDisks[0].Vhd.Uri $dataDiskVhdUri1; } Assert-AreEqual $p.StorageProfile.DataDisks[1].Caching 'ReadOnly'; Assert-AreEqual $p.StorageProfile.DataDisks[1].DiskSizeGB 11; Assert-AreEqual $p.StorageProfile.DataDisks[1].Lun 2; if (-not $useMD) { Assert-AreEqual $p.StorageProfile.DataDisks[1].Vhd.Uri $dataDiskVhdUri2; } Write-Debug "Start Create-AdvancedVM 4" $user = "Foo12"; $password = $PLACEHOLDER; $securePassword = ConvertTo-SecureString $password -AsPlainText -Force; $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); $computerName = 'test'; $vhdContainer = "https://$stoname.blob.core.windows.net/test"; Write-Debug "Start Create-AdvancedVM 5" if ($linux) { $p = Set-AzVMOperatingSystem -VM $p -Linux -ComputerName $computerName -Credential $cred; $imgRef = Get-LinuxImage; $p = ($imgRef | Set-AzVMSourceImage -VM $p); } else { $p = Set-AzVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred -ProvisionVMAgent; $imgRef = Get-DefaultCRPWindowsImageOffline; $p = ($imgRef | Set-AzVMSourceImage -VM $p); } Write-Debug "Start Create-AdvancedVM 6" Assert-AreEqual $p.OSProfile.AdminUsername $user; Assert-AreEqual $p.OSProfile.ComputerName $computerName; Assert-AreEqual $p.OSProfile.AdminPassword $password; if (-not $linux) { Assert-AreEqual $p.OSProfile.WindowsConfiguration.ProvisionVMAgent $true; } Assert-AreEqual $p.StorageProfile.ImageReference.Offer $imgRef.Offer; Assert-AreEqual $p.StorageProfile.ImageReference.Publisher $imgRef.PublisherName; Assert-AreEqual $p.StorageProfile.ImageReference.Sku $imgRef.Skus; Assert-AreEqual $p.StorageProfile.ImageReference.Version $imgRef.Version; Write-Debug "Start Create-AdvancedVM 7" $vmConfig = $p | convertto-json Write-Debug "Start Create-AdvancedVM 8 $vmConfig" $p = Set-AzVMBootDiagnostic -VM $p -Disable Write-Debug "Start Create-AdvancedVM - creating VM $($vmConfig)" Write-Debug "Start Create-AdvancedVM - creating VM $($vmConfig)" $v = New-AzVM -ResourceGroupName $rgname -Location $loc -VM $p; $vm = Get-AzVM -ResourceGroupName $rgname -VMName $vmname return $vm } function Get-LinuxImage { return Create-ComputeVMImageObject 'SUSE' 'SLES' '12-SP4' 'latest'; } function GetWrongTestResult($TestResult, $searchFor, $level) { $result = "" if (-not $level) {$level = 0} if ($TestResult.Result -eq $searchFor) { $result += [String]::new("`t", $level) + $TestResult.TestName + " is not expected. Actual result is " + $TestResult.Result + [Environment]::NewLine } foreach ($tmpRes in $TestResult.PartialResults) { $result += GetWrongTestResult $tmpRes $searchFor ($level+1) } return $result }
combined_dataset/train/non-malicious/sample_42_10.ps1
sample_42_10.ps1
# # Module manifest for module 'OCI.PSModules.Artifacts' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Artifacts.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '1fe5e04b-2e80-402c-b279-8d3ea9eca7dc' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Artifacts Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '80.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Artifacts.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIArtifactsContainerConfiguration', 'Get-OCIArtifactsContainerImage', 'Get-OCIArtifactsContainerImageSignature', 'Get-OCIArtifactsContainerImageSignaturesList', 'Get-OCIArtifactsContainerImagesList', 'Get-OCIArtifactsContainerRepositoriesList', 'Get-OCIArtifactsContainerRepository', 'Get-OCIArtifactsGenericArtifact', 'Get-OCIArtifactsGenericArtifactByPath', 'Get-OCIArtifactsGenericArtifactsList', 'Get-OCIArtifactsRepositoriesList', 'Get-OCIArtifactsRepository', 'Move-OCIArtifactsContainerRepositoryCompartment', 'Move-OCIArtifactsRepositoryCompartment', 'New-OCIArtifactsContainerImageSignature', 'New-OCIArtifactsContainerRepository', 'New-OCIArtifactsRepository', 'Remove-OCIArtifactsContainerImage', 'Remove-OCIArtifactsContainerImageSignature', 'Remove-OCIArtifactsContainerRepository', 'Remove-OCIArtifactsContainerVersion', 'Remove-OCIArtifactsGenericArtifact', 'Remove-OCIArtifactsGenericArtifactByPath', 'Remove-OCIArtifactsRepository', 'Restore-OCIArtifactsContainerImage', 'Update-OCIArtifactsContainerConfiguration', 'Update-OCIArtifactsContainerImage', 'Update-OCIArtifactsContainerImageSignature', 'Update-OCIArtifactsContainerRepository', 'Update-OCIArtifactsGenericArtifact', 'Update-OCIArtifactsGenericArtifactByPath', 'Update-OCIArtifactsRepository' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Artifacts' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_58_70.ps1
sample_58_70.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ [CmdletBinding(DefaultParametersetName="Unsecure")] param ( [Parameter(ParameterSetName="Unsecure", Mandatory=$true)] [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$true)] [string] $NodeName, [Parameter(ParameterSetName="Unsecure", Mandatory=$true)] [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$true)] [string] $NodeType, [Parameter(ParameterSetName="Unsecure", Mandatory=$true)] [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$true)] [string] $NodeIpAddressOrFQDN, [Parameter(ParameterSetName="Unsecure", Mandatory=$true)] [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$true)] [string] $ExistingClientConnectionEndpoint, [Parameter(ParameterSetName="Unsecure", Mandatory=$true)] [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$true)] [string] $UpgradeDomain, [Parameter(ParameterSetName="Unsecure", Mandatory=$true)] [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$true)] [string] $FaultDomain, [Parameter(ParameterSetName="Unsecure", Mandatory=$false)] [Parameter(ParameterSetName="Certificate", Mandatory=$false)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$false)] [switch] $AcceptEULA, [Parameter(ParameterSetName="Unsecure", Mandatory=$false)] [Parameter(ParameterSetName="Certificate", Mandatory=$false)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$false)] [switch] $Force, [Parameter(ParameterSetName="Unsecure", Mandatory=$false)] [Parameter(ParameterSetName="Certificate", Mandatory=$false)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$false)] [switch] $NoCleanupOnFailure, [Parameter(ParameterSetName="Unsecure", Mandatory=$false)] [Parameter(ParameterSetName="Certificate", Mandatory=$false)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$false)] [switch] $BypassUpgradeStateValidation, [Parameter(ParameterSetName="Unsecure", Mandatory=$false)] [Parameter(ParameterSetName="Certificate", Mandatory=$false)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$false)] [switch] $FabricIsPreInstalled, [Parameter(ParameterSetName="Unsecure", Mandatory=$false)] [Parameter(ParameterSetName="Certificate", Mandatory=$false)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$false)] [string] $FabricRuntimePackagePath, [Parameter(ParameterSetName="Unsecure", Mandatory=$false)] [Parameter(ParameterSetName="Certificate", Mandatory=$false)] [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$false)] [int] $TimeoutInSeconds, [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [switch] $X509Credential, [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [string] $ServerCertThumbprint, [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [string] $StoreLocation, [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [string] $StoreName, [Parameter(ParameterSetName="Certificate", Mandatory=$true)] [string] $FindValueThumbprint, [Parameter(ParameterSetName="WindowsSecurity", Mandatory=$true)] [switch] $WindowsCredential ) $Identity = [System.Security.Principal.WindowsIdentity]::GetCurrent() $Principal = New-Object System.Security.Principal.WindowsPrincipal($Identity) $IsAdmin = $Principal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) if(!$IsAdmin) { Write-Host "Please run the script with administrative privileges." -ForegroundColor "Red" exit 1 } if(!$AcceptEULA.IsPresent) { $EulaAccepted = Read-Host 'Do you accept the license terms for using Microsoft Azure Service Fabric located in the root of your package download? If you do not accept the license terms you may not use the software. [Y] Yes [N] No [?] Help (default is "N")' if($EulaAccepted -ne "y" -and $EulaAccepted -ne "Y") { Write-host "You need to accept the license terms for using Microsoft Azure Service Fabric located in the root of your package download before you can use the software." -ForegroundColor "Red" exit 1 } } $ThisScriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $DeployerBinPath = Join-Path $ThisScriptPath -ChildPath "DeploymentComponents" if(!(Test-Path $DeployerBinPath)) { $DCAutoExtractorPath = Join-Path $ThisScriptPath "DeploymentComponentsAutoextractor.exe" if(!(Test-Path $DCAutoExtractorPath)) { Write-Host "Standalone package DeploymentComponents and DeploymentComponentsAutoextractor.exe are not present local to the script location." exit 1 } #Extract DeploymentComponents $DCAutoExtractorCommand = "`"$DCAutoExtractorPath`" /E /Y /L `"$ThisScriptPath`"" # special case for older powershell versions < 5 if ($PSVersionTable.PSVersion.Major -lt 5) { $DCAutoExtractorCommand = "`"`"$DCAutoExtractorPath`" /E /Y /L `"$ThisScriptPath`"`"" } Write-Host "running autoextractor command: $DCAutoExtractorCommand" $DCExtractOutput = cmd.exe /c "$DCAutoExtractorCommand && exit 0 || exit 1" if($LASTEXITCODE -eq 1) { Write-Host "Extracting DeploymentComponents Cab ran into an issue." Write-Host $DCExtractOutput exit 1 } else { Write-Host "DeploymentComponents extracted." } } $SystemFabricModulePath = Join-Path $DeployerBinPath -ChildPath "System.Fabric.dll" if(!(Test-Path $SystemFabricModulePath)) { Write-Host "Run the script local to the Standalone package directory." exit 1 } $MicrosoftServiceFabricCabFileAbsolutePath = $null if ((Test-Path variable:FabricRuntimePackagePath) ` -and ![string]::IsNullOrEmpty($FabricRuntimePackagePath)) { $MicrosoftServiceFabricCabFileAbsolutePath = Resolve-Path $FabricRuntimePackagePath if(!(Test-Path $MicrosoftServiceFabricCabFileAbsolutePath)) { Write-Host "Microsoft Service Fabric Runtime package not found in the specified directory : $FabricRuntimePackagePath" exit 1 } Write-Verbose "Using runtime package $MicrosoftServiceFabricCabFileAbsolutePath" } else { $RuntimeBinPath = Join-Path $ThisScriptPath -ChildPath "DeploymentRuntimePackages" if(!(Test-Path $RuntimeBinPath)) { Write-Host "No directory exists for Runtime packages. Creating a new directory." md $RuntimeBinPath | Out-Null Write-Host "Done creating $RuntimeBinPath" } Write-Verbose "Will use downloaded runtime package for deployment from $RuntimeBinPath" } $ServiceFabricPowershellModulePath = Join-Path $DeployerBinPath -ChildPath "ServiceFabric.psd1" if (!(Test-Path variable:TimeoutInSeconds) ` -or ($TimeoutInSeconds -le 0)) { $TimeoutInSeconds = 300 Write-Verbose "TimeoutInSeconds was not set. Defaulting to $TimeoutInSeconds seconds." } $parentVerbosePreference = $VerbosePreference # Invoke in separate AppDomain if($X509Credential) { Write-Verbose "X509Credential: $X509Credential" $argList = @{ "DeployerBinPath" = $DeployerBinPath; "ExistingClientConnectionEndpoint" = $ExistingClientConnectionEndpoint; "ServiceFabricPowershellModulePath" = $ServiceFabricPowershellModulePath; "NodeName" = $NodeName; "NodeType" = $NodeType; "NodeIpAddressOrFQDN" = $NodeIpAddressOrFQDN; "UpgradeDomain" = $UpgradeDomain; "FaultDomain" = $FaultDomain; "Force" = $Force.IsPresent; "NoCleanupOnFailure" = $NoCleanupOnFailure.IsPresent; "BypassUpgradeStateValidation" = $BypassUpgradeStateValidation.IsPresent; "FabricIsPreInstalled" = $FabricIsPreInstalled.IsPresent; "MicrosoftServiceFabricCabFileAbsolutePath" = $MicrosoftServiceFabricCabFileAbsolutePath; "TimeoutInSeconds" = $TimeoutInSeconds; "parentVerbosePreference" = $parentVerbosePreference; "WindowsCredential" = $false; "X509Credential" = $true; "ServerCertThumbprint" = $ServerCertThumbprint; "StoreLocation" = $StoreLocation; "StoreName" = $StoreName; "FindValueThumbprint" = $FindValueThumbprint; } } else { if($WindowsCredential) { Write-Verbose "WindowsCredential: $WindowsCredential" $argList = @{ "DeployerBinPath" = $DeployerBinPath; "ExistingClientConnectionEndpoint" = $ExistingClientConnectionEndpoint; "ServiceFabricPowershellModulePath" = $ServiceFabricPowershellModulePath; "NodeName" = $NodeName; "NodeType" = $NodeType; "NodeIpAddressOrFQDN" = $NodeIpAddressOrFQDN; "UpgradeDomain" = $UpgradeDomain; "FaultDomain" = $FaultDomain; "Force" = $Force.IsPresent; "NoCleanupOnFailure" = $NoCleanupOnFailure.IsPresent; "BypassUpgradeStateValidation" = $BypassUpgradeStateValidation.IsPresent; "FabricIsPreInstalled" = $FabricIsPreInstalled.IsPresent; "MicrosoftServiceFabricCabFileAbsolutePath" = $MicrosoftServiceFabricCabFileAbsolutePath; "TimeoutInSeconds" = $TimeoutInSeconds; "parentVerbosePreference" = $parentVerbosePreference; "WindowsCredential" = $true; } } else { Write-Verbose "Not X509Credential nor WindowsCredential." $argList = @{ "DeployerBinPath" = $DeployerBinPath; "ExistingClientConnectionEndpoint" = $ExistingClientConnectionEndpoint; "ServiceFabricPowershellModulePath" = $ServiceFabricPowershellModulePath; "NodeName" = $NodeName; "NodeType" = $NodeType; "NodeIpAddressOrFQDN" = $NodeIpAddressOrFQDN; "UpgradeDomain" = $UpgradeDomain; "FaultDomain" = $FaultDomain; "Force" = $Force.IsPresent; "NoCleanupOnFailure" = $NoCleanupOnFailure.IsPresent; "BypassUpgradeStateValidation" = $BypassUpgradeStateValidation.IsPresent; "FabricIsPreInstalled" = $FabricIsPreInstalled.IsPresent; "MicrosoftServiceFabricCabFileAbsolutePath" = $MicrosoftServiceFabricCabFileAbsolutePath; "TimeoutInSeconds" = $TimeoutInSeconds; "parentVerbosePreference" = $parentVerbosePreference; } } } if ($parentVerbosePreference -ne "SilentlyContinue") { $argList.Keys | ForEach-Object { Write-Verbose "$($_)=$($argList.$_)" } } $standaloneArgsFilepath=Join-Path $([System.IO.Path]::GetTempPath()) "SFStandaloneArgs.txt" if (Test-Path $standaloneArgsFilepath) { Remove-Item $standaloneArgsFilepath -Force 2> $null } $argList.Keys | ForEach-Object { Add-Content $standaloneArgsFilepath "$($_)=$($argList.$_)" } $standaloneArgsFilepath = Resolve-Path $standaloneArgsFilepath $shelloutArgs = @( $standaloneArgsFilepath ) Powershell -Command { param ( [Parameter(Mandatory=$true)] [string] $ParamFilepath ) Get-Content $ParamFilepath | Where-Object {$_.length -gt 0} | Where-Object {!$_.StartsWith("#")} | ForEach-Object { $var = $_.Split('=') if ($var.Length -eq 2) { New-Variable -Name $var[0] -Value $var[1] -Force } } Remove-Item $ParamFilepath -Force 2> $null if (![string]::IsNullOrEmpty($Force)) { $Force = [Convert]::ToBoolean($Force); } else { $Force = $false} if (![string]::IsNullOrEmpty($NoCleanupOnFailure)) { $NoCleanupOnFailure = [Convert]::ToBoolean($NoCleanupOnFailure); } else { $NoCleanupOnFailure = $false} if (![string]::IsNullOrEmpty($BypassUpgradeStateValidation)) { $BypassUpgradeStateValidation = [Convert]::ToBoolean($BypassUpgradeStateValidation); } else { $BypassUpgradeStateValidation = $false} if (![string]::IsNullOrEmpty($FabricIsPreInstalled)) { $FabricIsPreInstalled = [Convert]::ToBoolean($FabricIsPreInstalled); } else { $FabricIsPreInstalled = $false} if (![string]::IsNullOrEmpty($WindowsCredential)) { $WindowsCredential = [Convert]::ToBoolean($WindowsCredential); } else { $WindowsCredential = $false} if (![string]::IsNullOrEmpty($X509Credential)) { $X509Credential = [Convert]::ToBoolean($X509Credential); } else { $X509Credential = $false} if (![string]::IsNullOrEmpty($TimeoutInSeconds)) { $TimeoutInSeconds = [Convert]::ToInt32($TimeoutInSeconds); } #Add FabricCodePath Environment Path $env:path = "$($DeployerBinPath);" + $env:path #Import Service Fabric Powershell Module Import-Module $ServiceFabricPowershellModulePath Try { # Connect to the existing cluster Write-Verbose "Connecting to the cluster at $ExistingClientConnectionEndpoint" if($X509Credential) { Connect-ServiceFabricCluster -ConnectionEndpoint $ExistingClientConnectionEndpoint -X509Credential -ServerCertThumbprint $ServerCertThumbprint -StoreLocation $StoreLocation -StoreName $StoreName -FindValue $FindValueThumbprint -FindType FindByThumbprint } else { if($WindowsCredential) { Connect-ServiceFabricCluster $ExistingClientConnectionEndpoint -WindowsCredential } else { Connect-ServiceFabricCluster $ExistingClientConnectionEndpoint } } } Catch { Write-Host "Cannot form client connection to cluster. Check your ClientConnectionEndpoint and security credentials. Exception thrown : $($_.Exception.ToString())" -ForegroundColor Red exit 1 } if ($ClusterConnection -eq $null) { Write-Host "Could not form client connection to cluster. Check your ClientConnectionEndpoint and security credentials." -ForegroundColor Red exit 1 } if ($FabricIsPreInstalled) { Write-Host "Switch FabricIsPreInstalled is set, so assuming Fabric runtime is already installed on the machine." } elseif (!(Test-Path variable:MicrosoftServiceFabricCabFileAbsolutePath) ` -or [string]::IsNullOrEmpty($MicrosoftServiceFabricCabFileAbsolutePath)) { Try { # Get runtime package details $UpgradeStatus = Get-ServiceFabricClusterUpgrade } Catch { Write-Host "Could not query current cluster version. Check your ClientConnectionEndpoint and security credentials." -ForegroundColor Red exit 1 } if ($UpgradeStatus.UpgradeState -ne "RollingForwardCompleted" -And $UpgradeStatus.UpgradeState -ne "RollingBackCompleted") { if ($BypassUpgradeStateValidation) { Write-Host "BypassUpgradeStateValidation is set but cannot be used without FabricRuntimePackagePath when cluster version cannot be automatically inferred from the upgrade state." -ForegroundColor Red } Write-Host "New node cannot be added to the cluster while upgrade is in progress or before cluster has finished bootstrapping. To monitor upgrade state run Get-ServiceFabricClusterUpgrade and wait until UpgradeState switches to either RollingForwardCompleted or RollingBackCompleted." -ForegroundColor Red exit 1 } Try { $RuntimeCabFilename = "MicrosoftAzureServiceFabric." + $UpgradeStatus.TargetCodeVersion + ".cab" $DeploymentPackageRoot = Split-Path -parent $DeployerBinPath $RuntimeBinPath = Join-Path $DeploymentPackageRoot -ChildPath "DeploymentRuntimePackages" $MicrosoftServiceFabricCabFilePath = Join-Path $RuntimeBinPath -ChildPath $RuntimeCabFilename if (!(Test-Path $MicrosoftServiceFabricCabFilePath)) { $RuntimePackageDetails = Get-ServiceFabricRuntimeSupportedVersion $RequiredPackage = $RuntimePackageDetails.RuntimePackages | where { $_.Version -eq $UpgradeStatus.TargetCodeVersion } if ($RequiredPackage -eq $null) { Write-Host "The required runtime version is no longer supported. Please upgrade your cluster to the latest version before adding a node." -ForegroundColor Red exit 1 } $Version = $UpgradeStatus.TargetCodeVersion Write-Host "Runtime package version $Version was not found in DeploymentRuntimePackages folder and needed to be downloaded." (New-Object System.Net.WebClient).DownloadFile($RuntimePackageDetails.GoalRuntimeLocation, $MicrosoftServiceFabricCabFilePath) Write-Host "Runtime package has been successfully downloaded to $MicrosoftServiceFabricCabFilePath." } $MicrosoftServiceFabricCabFileAbsolutePath = Resolve-Path $MicrosoftServiceFabricCabFilePath } Catch { Write-Host "Runtime package cannot be downloaded. Check your internet connectivity. If the cluster is not connected to the internet run Get-ServiceFabricClusterUpgrade and note the TargetCodeVersion. Run Get-ServiceFabricRuntimeSupportedVersion from a machine connected to the internet to get the download links for all supported fabric versions. Download the package corresponding to your TargetCodeVersion. Pass -FabricRuntimePackageOutputDirectory <Path to runtime package> to AddNode.ps1 in addition to other parameters. Exception thrown : $($_.Exception.ToString())" -ForegroundColor Red exit 1 } } #Add Node to an existing cluster Try { $AddNodeTimeoutDuration=[System.TimeSpan]::FromSeconds($TimeoutInSeconds) $AddNodeTimeout=[System.DateTime]::UtcNow + $AddNodeTimeoutDuration Get-ServiceFabricNode | ft $VerbosePreference = $parentVerbosePreference $params = @{ 'NodeName' = $NodeName; 'NodeType' = $NodeType; 'IpAddressOrFQDN' = $NodeIpAddressOrFQDN; 'UpgradeDomain' = $UpgradeDomain; 'FaultDomain' = $FaultDomain; 'FabricRuntimePackagePath' = $MicrosoftServiceFabricCabFileAbsolutePath; 'NoCleanupOnFailure' = $NoCleanupOnFailure; 'Force' = $Force; 'BypassUpgradeStateValidation' = $BypassUpgradeStateValidation; 'FabricIsPreInstalled' = $FabricIsPreInstalled; } if ((Test-Path variable:TimeoutInSeconds) ` -and ($TimeoutInSeconds -gt 0)) { $params += @{'TimeoutSec' = $TimeoutInSeconds;} } Write-Host "Adding Node $NodeName" Add-ServiceFabricNode @params Write-Host "Waiting for node to join cluster." -NoNewline $nodeJoined=$false $firstRun=$true do { if (!$nodeJoined -and !$firstRun) { Write-Host "." -NoNewline Start-Sleep -s 10 } $result=Get-ServiceFabricNode | Where-Object { [System.String]::Compare($_.NodeName, $NodeName, [System.StringComparison]::InvariantCulture) -eq 0 } $nodeJoined=$result.Count -gt 0 $firstRun=$false } while(!$nodeJoined -and ([System.DateTime]::UtcNow -lt $AddNodeTimeout)) Write-Host "" # Newline if(-not $nodeJoined) { Write-Host "Node did not join within timeout of $TimeoutInSeconds seconds." -ForegroundColor Red exit 1 } Get-ServiceFabricNode | ft Write-Host "Node $NodeName joined the cluster!" -ForegroundColor Green } Catch { if($VerbosePreference -eq "SilentlyContinue") { Write-Host "Add Node failed. Call with -Verbose for more details" -ForegroundColor Red } Write-Host "Add node to existing cluster failed with exception: $($_.Exception.ToString())" -ForegroundColor Red exit 1 } } -args $shelloutArgs -OutputFormat Text $env:Path = [System.Environment]::GetEnvironmentVariable("path","Machine") # SIG # Begin signature block # MIInkwYJKoZIhvcNAQcCoIInhDCCJ4ACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAaWS1eDTImCPqr # XkXx+JOiU509Id8D94uRE9I3NDASNqCCDXYwggX0MIID3KADAgECAhMzAAACy7d1 # OfsCcUI2AAAAAALLMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjIwNTEyMjA0NTU5WhcNMjMwNTExMjA0NTU5WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQC3sN0WcdGpGXPZIb5iNfFB0xZ8rnJvYnxD6Uf2BHXglpbTEfoe+mO//oLWkRxA # wppditsSVOD0oglKbtnh9Wp2DARLcxbGaW4YanOWSB1LyLRpHnnQ5POlh2U5trg4 # 3gQjvlNZlQB3lL+zrPtbNvMA7E0Wkmo+Z6YFnsf7aek+KGzaGboAeFO4uKZjQXY5 # RmMzE70Bwaz7hvA05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rnChN404aMUOP7fOSkEBO55jPNwwOy3Jtv1WDz3/ # wNY0LEZyDw== # SIG # End signature block
combined_dataset/train/non-malicious/3578.ps1
3578.ps1
function Get-ResourceGroupName { return getAssetName } function Get-ApiManagementServiceName { return getAssetName } function Get-ProviderLocation($provider) { $locations = Get-ProviderLocations $provider if ($locations -eq $null) { "West US" } else { $locations[0] } } function Get-ProviderLocations($provider) { if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { $namespace = $provider.Split("/")[0] if($provider.Contains("/")) { $type = $provider.Substring($namespace.Length + 1) $location = Get-AzResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type} if ($location -eq $null) { return @("West US", "East US") } else { return $location.Locations[0] } } return @("West US", "East US") } return @("West US", "East US") }
combined_dataset/train/non-malicious/Note, open Notepad++.ps1
Note, open Notepad++.ps1
# Limited Notepad++ support with the simple call 'Note' So long Notepad! function Note { <# .Synopsis Opens Notepad++ .Description Opens Notepad++ .Parameter File File name(s) to open, accepts wildcards. (absolute or relative path name) .Parameter MultiInstance Launch another Notepad++ instance .Parameter PluginsOff Launch Notepad++ without plugins, good for debugging cause of a crash, Notepad++ or plugins? .Parameter Language Launch Notepad++ by applying indicated language to the file to open. .Parameter SessionOff Launch Notepad++ without any session. (without loading files opened when notepad++ was last in use.) .Parameter TabBarOff Launch Notepad++ without tabbar. .Example Note -Language xml -MultiInstance -TabBarOff -File C:\\Script\\MyScript.ps1 Opens file 'MyScript.ps1' as xml file in a new instance of Notepad++ with no tab bar. .Link http://notepad-plus.sourceforge.net/uk/cmdLine-HOWTO.php .Link http://notepad-plus.sourceforge.net/ .Link http://poshcode.org/notepad++lexer/ .Link http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Command_Line_Switches .Notes Most of this script is courtesy of PoshCode. Added a couple features to handle the lack of a -File parameter as well as creation of a file. #> [CmdletBinding()] Param ( [Parameter(ValueFromPipeline=$true,Position=1)] [Alias("FileName","LitteralPath","Path")] [string[]] $File , [Parameter()] [string]$Language , [Parameter()] [Switch]$MultiInstance , [Parameter()] [Switch]$PluginsOff , [Parameter()] [Switch]$SessionOff , [Parameter()] [Switch]$TabBarOff ) BEGIN { $NPP = "C:\\Program Files (x86)\\Notepad++\\Notepad++.exe" $Param = @( if($Language) {"-l$Language"} if($MultiInstance) {"-multiInst"} if($PluginsOff) {"-noPlugins"} if($SessionOff) {"-nosession"} if($TabBarOff) {"-notabbar"} " " )-join " " } Process { ### # No -File parameter was received, opens Notepad++ anyway ### if($File -eq $null){ Write-Host "hmmm....`nOpening Notepad++" -foregroundcolor "green" Write-Verbose "$NPP $param" [void][Diagnostics.Process]::Start($NPP,$param).WaitForInputIdle(500) }elseif(Test-Path $File){ ForEach($Path in $File){ ForEach($f in Convert-Path (Resolve-Path $Path)){ $parameters = $param + """" + $f + """" Write-Verbose "$NPP $parameters" [void][Diagnostics.Process]::Start($NPP,$parameters).WaitForInputIdle(500) } } ### # A nonexistent -File parameter was received. # Query user to attempt creation or not. ### }elseif(!(Test-Path $File)){ $Title = "File did not exist." $Message = "Would you like to attempt to create?" $Yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes",` "Passes file name to Notepad++ to attempt creation." $No = New-Object System.Management.Automation.Host.ChoiceDescription "&No",` "Does not pass file name to Notepad++. Face it, you misspelled something =(" $Options = [System.Management.Automation.Host.ChoiceDescription[]]($Yes, $No) $Result = $Host.UI.PromptForChoice($Title, $Message, $Options, 0) Switch($Result){ 0{ $Parameters = $Param + $File Write-Verbose "$NPP $Parameters" [void][Diagnostics.Process]::Start($NPP,$Parameters).WaitForInputIdle(500) } 1{ Write-Host "Yes, well..." -foregroundcolor "Green" } } } } } # I just wanted 120 lines =P
combined_dataset/train/non-malicious/sample_42_24.ps1
sample_42_24.ps1
# # Module manifest for module 'ThreadJob' # @{ # Script module or binary module file associated with this manifest. RootModule = '.\Microsoft.PowerShell.ThreadJob.dll' # Version number of this module. ModuleVersion = '2.0.3' # ID used to uniquely identify this module GUID = '0e7b895d-2fec-43f7-8cae-11e8d16f6e40' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' # Description of the functionality provided by this module Description = " PowerShell's built-in BackgroundJob jobs (Start-Job) are run in separate processes on the local machine. They provide excellent isolation but are resource heavy. Running hundreds of BackgroundJob jobs can quickly absorb system resources. This module extends the existing PowerShell BackgroundJob to include a new thread based ThreadJob job. This is a lighter weight solution for running concurrent PowerShell scripts that works within the existing PowerShell job infrastructure. ThreadJob jobs will tend to run quicker because there is lower overhead and they do not use the remoting serialization system. And they will use up fewer system resources. In addition output objects returned from the job will be 'live' since they are not re-hydrated from the serialization system. However, there is less isolation. If one ThreadJob job crashes the process then all ThreadJob jobs running in that process will be terminated. This module exports a single cmdlet, Start-ThreadJob, which works similarly to the existing Start-Job cmdlet. The main difference is that the jobs which are created run in separate threads within the local process. One difference is that ThreadJob jobs support a ThrottleLimit parameter to limit the number of running jobs, and thus active threads, at a time. If more jobs are started then they go into a queue and wait until the current number of jobs drops below the throttle limit. Source for this module is at GitHub. Please submit any issues there. https://github.com/PaulHigin/PSThreadJob Added Runspace cleanup. Added Using variable expression support. Added StreamingHost parameter to stream host data writes to a provided host object. Added Information stream handling. Bumped version to 2.0.0, and now only support PowerShell version 5.1 and higher. Fixed using keyword bug with PowerShell preview version, and removed unneeded version check. Added setting current working directory to running jobs, when available. Added help URI to module. " # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '5.1' # Cmdlets to export from this module CmdletsToExport = 'Start-ThreadJob' HelpInfoURI = 'https://go.microsoft.com/fwlink/?linkid=2113345' } # SIG # Begin signature block # MIInwgYJKoZIhvcNAQcCoIInszCCJ68CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIB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yb3NvZnQgQ29ycG9yYXRp # b24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB # 2o7VyVoA0RGxAAEAAAHaMCIEIKaaEoOXEjjHeAD99MmoMlDVtIg/PdqddyY0aIfg # 87njMA0GCSqGSIb3DQEBCwUABIICAHSt6Dgye/NCLJEx/fm/32ythVo0Q7f7LJop # 8GrV8LMa9kUx8gVP1UXW0Sy7VSwXsISc9s570LKgH8l9h6BGZs7huw4Wrvkhaj9K # FHkCpdidkzz34Sj5/AtfUac+qe9AXL/aWaCZVtQudXufXgZmdb9oFW3H7D4JcBdu # knyBojzGMcetaZJOHejBlesJVuPJclyV5qabD7DDxqqHQVq6YpuUIz3hyGxkWRz0 # xffV8PlVc992QYUQm6EQ3c9fxFavuvv9rQ4n5kaKMPsbIUgjO6VZ9O0xI6KWlAqt # jJ66zoasfkZAzvrAGRtW4KNZz19Zg9m9S0Kg/h5SsPbBWtXaoHbYUaRYSyy8k7y0 # iTgCcfHl51BPzYnTxigG1gKObu5nFjAEy5d/yQTuUfH34QHmQaxEpmjXbesOEJP6 # BEi/zIak/Adfg7Z3AFOOIHtR0btSYnNNblweWoxODReroDZBqZexLH3TngcbLsck # accj6JyWciv58JXgsYHPMHCrUZQ7S+Pj/GWU63hJ8K8+1RrRAvqTK9t3njEvek4s # US9Hqp9xLl5bXPXbtgci2ZzaZPXIAmb0SzQeZhybARyGMY6h+lX/nBXV+2s6P/UF # Ivy/Y6E6Znrfn0CxqqhdB97fIlnPB45Z1b//o7BSuGTncJ/4it0ogno0ZJ46qqK6 # giotBLWs # SIG # End signature block
combined_dataset/train/non-malicious/sample_8_45.ps1
sample_8_45.ps1
# # Module manifest for module 'OCI.PSModules.Ocvp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocvp.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '05a069dc-62d0-41ee-b47b-3fe73fff277d' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Ocvp Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '92.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Ocvp.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIOcvpCluster', 'Get-OCIOcvpClustersList', 'Get-OCIOcvpEsxiHost', 'Get-OCIOcvpEsxiHostsList', 'Get-OCIOcvpSddc', 'Get-OCIOcvpSddcsList', 'Get-OCIOcvpSupportedCommitmentsList', 'Get-OCIOcvpSupportedHostShapesList', 'Get-OCIOcvpSupportedVmwareSoftwareVersionsList', 'Get-OCIOcvpWorkRequest', 'Get-OCIOcvpWorkRequestErrorsList', 'Get-OCIOcvpWorkRequestLogsList', 'Get-OCIOcvpWorkRequestsList', 'Invoke-OCIOcvpDowngradeHcx', 'Invoke-OCIOcvpInplaceUpgrade', 'Invoke-OCIOcvpRefreshHcxLicenseStatus', 'Invoke-OCIOcvpReplaceHost', 'Invoke-OCIOcvpRetrievePassword', 'Invoke-OCIOcvpSwapBilling', 'Invoke-OCIOcvpUpgradeHcx', 'Move-OCIOcvpSddcCompartment', 'New-OCIOcvpCluster', 'New-OCIOcvpEsxiHost', 'New-OCIOcvpSddc', 'Remove-OCIOcvpCluster', 'Remove-OCIOcvpEsxiHost', 'Remove-OCIOcvpSddc', 'Stop-OCIOcvpDowngradeHcx', 'Update-OCIOcvpCluster', 'Update-OCIOcvpEsxiHost', 'Update-OCIOcvpSddc' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Ocvp' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_62_76.ps1
sample_62_76.ps1
# Localized 06/28/2023 08:07 AM (GMT) 303:7.0.30723 rs_iesecuritylevels.psd1 ConvertFrom-StringData @' ###PSLOC Reset_securitysettings=Rétablissez les paramètres de sécurité par défaut de toutes les zones. Report_name_resetIEsettings=Paramètres de sécurité Report_description_resetIEsettings=Zones de sécurité dont les paramètres de sécurité sont définis sur les valeurs par défaut. Report_name_resetIEprotectedmode=Mode protégé Report_description_resetIEprotectedmode=Zones de sécurité dont le mode protégé est défini sur les valeurs par défaut. keys=Nom de la zone ###PSLOC '@
combined_dataset/train/non-malicious/3314.ps1
3314.ps1
function Slap { [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [string] $User, [parameter(Position = 1)] [string] $Object ) $objects = @{ trout = @{ item = 'large trout' thumbnail = 'https://upload.wikimedia.org/wikipedia/commons/1/16/Rainbow_trout_transparent.png' } finger = @{ item = 'giant foam finger' thumbnail = 'https://images.vexels.com/media/users/3/153013/isolated/preview/517c07f5ff433028345e10b138870119-american-foam-finger-design-element-by-vexels.png' } keyboard = @{ item = 'mechanical keyboard' thumbnail = 'https://cdn.pixabay.com/photo/2013/07/13/11/50/computer-158770_960_720.png' } sword = @{ item = 'foam sword' thumbnail = 'https://upload.wikimedia.org/wikipedia/commons/2/2b/Foamswordofrecall.png' } noodles = @{ item = 'pile of wet noodles' thumbnail = 'http://pngimg.com/uploads/noodle/noodle_PNG33.png' } } $choice = if ($PSBoundParameters.ContainsKey('Object') -and $objects.ContainsKey($Object)) { $objects[$Object] } else { $random = $objects.Keys | Get-Random $objects[$random] } New-PoshBotCardResponse -Type Normal -Text "slaps $User around a bit with a $($choice['item'])" -ThumbnailUrl $choice['thumbnail'] }
combined_dataset/train/non-malicious/sample_58_67.ps1
sample_58_67.ps1
# # Module manifest for module 'OCI.PSModules.Functions' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Functions.dll' # Version number of this module. ModuleVersion = '85.2.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '21b96577-939f-4757-b9c9-34f5b0c1c54b' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Functions Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '85.2.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Functions.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIFunctionsApplication', 'Get-OCIFunctionsApplicationsList', 'Get-OCIFunctionsFunction', 'Get-OCIFunctionsList', 'Get-OCIFunctionsPbfListing', 'Get-OCIFunctionsPbfListingsList', 'Get-OCIFunctionsPbfListingVersion', 'Get-OCIFunctionsPbfListingVersionsList', 'Get-OCIFunctionsTriggersList', 'Invoke-OCIFunctionsFunction', 'Move-OCIFunctionsApplicationCompartment', 'New-OCIFunctionsApplication', 'New-OCIFunctionsFunction', 'Remove-OCIFunctionsApplication', 'Remove-OCIFunctionsFunction', 'Update-OCIFunctionsApplication', 'Update-OCIFunctionsFunction' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Functions' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/3104.ps1
3104.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", [string]$parameters ) $errorActionPreference = 'Stop' echo "download build core script to local with source url: $buildCorePowershellUrl" $repositoryRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition $buildCorePowershellDestination = "$repositoryRoot\.openpublishing.buildcore.ps1" Invoke-WebRequest $buildCorePowershellUrl -OutFile $buildCorePowershellDestination echo "run build core script with parameters: $parameters" $arguments = "-parameters:'$parameters'" Invoke-Expression "$buildCorePowershellDestination $arguments" exit $LASTEXITCODE
combined_dataset/train/non-malicious/sample_11_25.ps1
sample_11_25.ps1
# # Module manifest for module 'OCI.PSModules.Computecloudatcustomer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computecloudatcustomer.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '5ad07485-5877-44d1-87e8-7e7611e4c92b' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Computecloudatcustomer Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '74.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Computecloudatcustomer.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIComputecloudatcustomerCccInfrastructure', 'Get-OCIComputecloudatcustomerCccInfrastructuresList', 'Get-OCIComputecloudatcustomerCccUpgradeSchedule', 'Get-OCIComputecloudatcustomerCccUpgradeSchedulesList', 'Move-OCIComputecloudatcustomerCccInfrastructureCompartment', 'Move-OCIComputecloudatcustomerCccUpgradeScheduleCompartment', 'New-OCIComputecloudatcustomerCccInfrastructure', 'New-OCIComputecloudatcustomerCccUpgradeSchedule', 'Remove-OCIComputecloudatcustomerCccInfrastructure', 'Remove-OCIComputecloudatcustomerCccUpgradeSchedule', 'Update-OCIComputecloudatcustomerCccInfrastructure', 'Update-OCIComputecloudatcustomerCccUpgradeSchedule' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Computecloudatcustomer' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_25_62.ps1
sample_25_62.ps1
@{ GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Start-Transcript", "Stop-Transcript" AliasesToExport = @() NestedModules="Microsoft.PowerShell.ConsoleHost.dll" HelpInfoURI = 'https://aka.ms/powershell73-help' } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAafI9Gy/Jba/h5 # P4E+2b0zPlBjhQyHNjAYnPqkeCyjq6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYD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mBkl94QXi53u7L7MCw0MfQsBMTmBVcwc9CWggc9g6a+4b4JHLZDELblP # WRZ/dtTLgP5gpbRvouWey8NeNU/dJTUq12+yEOO5sDeZD+hT2yEL/zR1L2k5J2ti # 0jIIdt2JUlCbPhif3RTOcOs60YexMIWZ+coxYgtTh/Fr6OjGsURS0sv+kYqkmOrb # zWXqT7Z7F8H+3OwEs0umXxcqPN3fNja4qWcT91XIa23wjOP/Nsq4iTQs8xn9if6y # ax/zjHvFchI1DDd9weg0LbdKMqa4Rx4uhrly/yKBZykSiGWfRlFWGN9RaWHjGCeC # 1ruWAfCf2Q6GJful+F2BGH9Y9MGyw/jLq1EWjmFHAD8y9IFTLVXskj6fpne3o6OF # qEO0s7NkEvr0x+MGHIiZxRrUTwHL56wcMiQiU14BCpKfVXEcvZkeqbIzt0mv7ItR # rwvXSB8zZVUOtaPA6qXHfurx+FaP7hFaewCAdjfo5bODR4YrkfHPlHq6untZ7yBw # Dmex1srT5ytY0RxunjrzUliUtW3/OKjfc+4GcGxECvxQDdKgwIi5VXBxetf6VNYY # tGU4Sne9Rmgc5tJrW2cc5EaHjVGSrQ1e7+khB/SxrtmmmPXL2/hTDJHgbR+4uSt6 # X1bY # SIG # End signature block
combined_dataset/train/non-malicious/Prevent-Screensaver.ps1
Prevent-Screensaver.ps1
######################################################### # Prevent-Screensaver ######################################################### # This script "presses" a keyboard key every minute # for specified number of minutes which makes # Windows "think" you are at your desktop # so the screensaver does not start and the desktop # does not get locked. ######################################################### # Usage: # & c:\\filepath\\Prevent-Screensaver.ps1 -Minutes 120 # Makes the script press "." for 120 minutes. # Start notepad or another app and put focus there # to see the dots appear and prevent beeping ######################################################## # (c) Dmitry Sotnikov # http://dmitrysotnikov.wordpress.com ######################################################## param($minutes = 60) $myshell = New-Object -com "Wscript.Shell" for ($i = 0; $i -lt $minutes; $i++) { Start-Sleep -Seconds 60 $myshell.sendkeys(".") }
combined_dataset/train/non-malicious/1703.ps1
1703.ps1
Properties { $ProjectRoot = Resolve-Path $ENV:BHProjectPath if(-not $ProjectRoot) { $ProjectRoot = Resolve-Path "$PSScriptRoot\.." } $StepVersionBy = $null $Timestamp = Get-date -uformat "%Y%m%d-%H%M%S" $PSVersion = $PSVersionTable.PSVersion.Major $TestFile = "TestResults_PS$PSVersion`_$TimeStamp.xml" $lines = '----------------------------------------------------------------------' $Verbose = @{} if ($ENV:BHCommitMessage -match "!verbose") { $Verbose = @{Verbose = $True} } } Task Default -Depends Deploy Task Init { $lines Set-Location $ProjectRoot "Build System Details:" Get-Item ENV:BH* | Format-List "`n" } Task Analyze -Depends Init { $saResults = Invoke-ScriptAnalyzer -Path $ENV:BHModulePath -Severity @('Error', 'Warning') -Recurse -Verbose:$false if ($saResults) { $saResults | Format-Table } } Task UnitTests -Depends Init { $lines 'Running quick unit tests to fail early if there is an error' $TestResults = Invoke-Pester -Path $ProjectRoot\Tests\*unit* -PassThru -Tag Build if($TestResults.FailedCount -gt 0) { Write-Error "Failed '$($TestResults.FailedCount)' tests, build failed" } "`n" } Task Test -Depends UnitTests { $lines "`nSTATUS: Testing with PowerShell $PSVersion" $TestFilePath = Join-Path $ProjectRoot $TestFile $CodeFiles = Get-ChildItem $ENV:BHModulePath -Recurse -Include "*.psm1","*.ps1" $CodeCoverage = New-Object System.Collections.ArrayList $CodeCoverage.AddRange($CodeFiles.FullName) $Credential = Get-Credential $invokePesterScript = @{ Path = "$ProjectRoot\Tests" Parameters = @{ Credential = $Credential } } $invokePesterSplat = @{ Script = $invokePesterScript CodeCoverage = $CodeCoverage OutputFile = $TestFilePath OutputFormat = 'NUnitXml' PassThru = $true } $Script:TestResults = Invoke-Pester @invokePesterSplat [xml]$content = Get-Content $TestFilePath $content.'test-results'.'test-suite'.type = "Powershell" $content.Save($TestFilePath) If($ENV:BHBuildSystem -eq 'AppVeyor') { "Uploading $ProjectRoot\$TestFile to AppVeyor" "JobID: $env:APPVEYOR_JOB_ID" (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $TestFilePath)) } Remove-Item $TestFilePath -Force -ErrorAction SilentlyContinue if($TestResults.FailedCount -gt 0) { Write-Error "Failed '$($TestResults.FailedCount)' tests, build failed" } "`n" } Task Build -Depends Test { $lines $functions = Get-ChildItem "$ENV:BHModulePath\Public\*.ps1" | Where-Object {$_.name -notmatch 'Tests'} | Select-Object -ExpandProperty basename Set-ModuleFunctions -Name $env:BHPSModuleManifest -FunctionsToExport $functions $stepVersionSplat = @{ Version = (Get-Metadata -Path $env:BHPSModuleManifest) } If ($null -ne $StepVersionBy) { $stepVersionSplat.Add('By',$StepVersionBy) } $version = [version](Step-Version @stepVersionSplat) $galleryVersion = Get-NextPSGalleryVersion -Name $env:BHProjectName if($version -lt $galleryVersion) { $version = $galleryVersion } $Script:version = [version]::New($version.Major,$version.Minor,$version.Build) Write-Host "Using version: $version" Update-Metadata -Path $env:BHPSModuleManifest -PropertyName ModuleVersion -Value $version Function Update-CodeCoveragePercent { param( [int]$CodeCoverage=0, [string]$TextFilePath="$Env:BHProjectPath\Readme.md" ) $BadgeColor = Switch ($CodeCoverage) { 100 {"brightgreen"} {95..99 -contains $_} {"green"} {85..94 -contains $_} {"yellowgreengreen"} {75..84 -contains $_} {"yellow"} {65..74 -contains $_} {"orange"} default {"red"} } $ReadmeContent = Get-Content $TextFilePath $ReadmeContent = $ReadmeContent | ForEach-Object {$_-replace "!\[Test Coverage\].+\)", "![Test Coverage](https://img.shields.io/badge/coverage-$CodeCoverage%25-$BadgeColor.svg)"} Set-Content -Path $TextFilePath -Value $ReadmeContent } $CoveragePercent = 100-(($Script:TestResults.CodeCoverage.NumberOfCommandsMissed/$Script:TestResults.CodeCoverage.NumberOfCommandsAnalyzed)*100) "Running Update-CodeCoveragePercent with percentage $CoveragePercent" Update-CodeCoveragePercent -CodeCoverage $CoveragePercent "`n" } Task MakePackage -Depends Build,Test { $lines function ZipFiles { param( $zipfilename, $sourcedir ) Add-Type -Assembly System.IO.Compression.FileSystem $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal [System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir, $zipfilename, $compressionLevel, $true) } function New-MakePackage { param( [string]$PackageName, [string]$PackagePath, [string]$ModuleName ) $ZipFile = "$PackagePath\$PackageName" Remove-Item $ZipFile -Force -ErrorAction SilentlyContinue | Out-Null ZipFiles $ZipFile $ModuleName } $PackageName = "$($Env:BHProjectName)-v$($Script:version).zip" "Creating package $PackageName" New-MakePackage -PackageName $PackageName -PackagePath $ProjectRoot -ModuleName $ENV:BHModulePath "`n" } Task Deploy -Depends Build,MakePackage { $lines if ( $ENV:BHBuildSystem -ne 'Unknown' -and $ENV:BHBranchName -eq "master" -and $ENV:BHCommitMessage -match '!deploy' ) { $Params = @{ Path = $ProjectRoot Force = $true } Invoke-PSDeploy @Verbose @Params } else { "Skipping deployment: To deploy, ensure that...`n" + "`t* You are in a known build system (Current: $ENV:BHBuildSystem)`n" + "`t* You are committing to the master branch (Current: $ENV:BHBranchName) `n" + "`t* Your commit message includes !deploy (Current: $ENV:BHCommitMessage)" } }
combined_dataset/train/non-malicious/sample_33_8.ps1
sample_33_8.ps1
# # Module manifest for module 'OCI.PSModules.Events' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Events.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '5e1c10f7-8832-4248-b692-89297c84ea32' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Events Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '73.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Events.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIEventsRule', 'Get-OCIEventsRulesList', 'Move-OCIEventsRuleCompartment', 'New-OCIEventsRule', 'Remove-OCIEventsRule', 'Update-OCIEventsRule' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Events' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/TabExpansion_12.ps1
TabExpansion_12.ps1
## Tab-Completion ################# ## Please dot souce this script file. ## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list. ## ## What this can do is: ## ## [datetime]::n<tab> ## [datetime]::now.d<tab> ## $a = New-Object "Int32[,]" 2,3; $b = "PowerShell","PowerShell" ## $c = [ref]$a; $d = [ref]$b,$c ## $d[0].V<tab>[0][0].Get<tab> ## $d[1].V<tab>[0,0].tos<tab> ## $function:a<tab> ## $env:a<tab> ## [System.Type].a<tab> ## [datetime].Assembly.a<tab> ## ).a<tab> # shows System.Type properties and methods... ## #native command name expansion ## fsu<tab> ## #command option name expansion (for fsutil ipconfig net powershell only) ## fsutil <tab> ## ipconfig <tab> ## net <tab> ## powershell <tab> ## #TypeNames and Type accelerators expansion ## [Dec<tab> ## [system.Man<tab>.auto<tab>.p<tab> ## New-Object -TypeName IO.Dir<tab> ## New-Object System.win<tab>.for<tab>.bu<tab> ## #ProgIDs expansion ## New-Object -Com shel<tab> ## #Enum option expansion ## Set-ExecutionPolicy <tab> ## Set-ExecutionPolicy All<tab> ## Set-ExcusionPolisy -ex <tab> ## Get-TraceSource Inte<tab> ## iex -Errora <tab> -wa Sil<tab> ## #WmiClasses expansion ## Get-WmiObject -class Win32_<tab> ## gwmi __Instance<tab> ## #Encoding expansion ## [Out-File | Export-CSV | Select-String | Export-Clixml] -enc <tab> ## [Add-Content | Get-Content | Set-Content} -Encoding Big<tab> ## #PSProvider name expansion ## [Get-Location | Get-PSDrive | Get-PSProvider | New-PSDrive | Remove-PSDrive] -PSProvider <tab> ## Get-PSProvider <tab> ## pwd -psp al<tab> ## #PSDrive name expansion ## [Get-PSDrive | New-PSDrive | Remove-PSDrive] [-Name] <tab> ## Get-PSDrive <tab> ## pwd -psd <tab> ## #PSSnapin name expansion ## [Add-PSSnapin | Get-PSSnapin | Remove-PSSnapin ] [-Name] <tab> ## Get-Command -PSSnapin <tab> ## Remove-PSSnapin <tab> ## Get-PSSnapin M<tab> ## #Eventlog name and expansion ## Get-Eventlog -Log <tab> ## Get-Eventlog w<tab> ## #Eventlog's entrytype expansion ## Get-EventLog -EntryType <tab> ## Get-EventLog -EntryType Er<tab> ## Get-EventLog -Ent <tab> ## #Service name expansion ## [Get-Service | Restart-Service | Resume-Service | Start-Service | Stop-Service | Suspend-Service] [-Name] <tab> ## New-Service -DependsOn <tab> ## New-Service -Dep e<tab> ## Get-Service -n <tab> ## Get-Service <tab>,a<tab>,p<tab> ## gsv <tab> ## #Service display name expansion ## [Get-Service | Restart-Service | Resume-Service | Start-Service | Stop-Service | Suspend-Service] [-DisplayName] <tab> ## Get-Service -Dis <tab> ## gsv -Dis <tab>,w<tab>,b<tab> ## #Cmdlet and Topic name expansion (this also support default help function and man alias) ## Get-Help [-Name] about_<tab> ## Get-Help <tab> ## #Category name expansion (this also support default help function and man alias) ## Get-Help -Category c<tab>,<tab> ## #Command name expansion ## Get-Command [-Name] <tab> ## Get-Command -Name <tab> ## gcm a<tab>,<tab> ## #Scope expansion ## [Clear-Variable | Export-Alias | Get-Alias | Get-PSDrive | Get-Variable | Import-Alias ## New-Alias | New-PSDrive | New-Variable | Remove-Variable | Set-Alias | Set-Variable] -Scope <tab> ## Clear-Variable -Scope G<tab> ## Set-Alias -s <tab> ## #Process name expansion ## [Get-Process | Stop-Process] [-Name] <tab> ## Stop-Process -Name <tab> ## Stop-Process -N pow<tab> ## Get-Process <tab> ## ps power<tab> ## #Trace sources expansion ## [Trace-Command | Get-TraceSource | Set-TraceSource] [-Name] <tab>,a<tab>,p<tab> ## #Trace -ListenerOption expansion ## [Set-TraceSource | Trace-Command] -ListenerOption <tab> ## Set-TraceSource -Lis <tab>,n<tab> ## #Trace -Option expansion ## [Set-TraceSource | Trace-Command] -Option <tab> ## Set-TraceSource -op <tab>,con<tab> ## #ItemType expansion ## New-Item -Item <tab> ## ni -ItemType d<tab> ## #ErrorAction and WarningAction option expansion ## CMDLET [-ErrorAction | -WarningAction] <tab> ## CMDLET -Errora s<tab> ## CMDLET -ea con<tab> ## CMDLET -wa <tab> ## #Continuous expansion with comma when parameter can treat multiple option ## # if there are spaces, occur display bug in the line ## # if strings contains '$' or '-', not work ## Get-Command -CommandType <tab>,<tab><tab>,cm<tab> ## pwd -psp <tab>,f<tab>,va<tab> ## Get-EventLog -EntryType <tab>,i<tab>,s<tab> ## #Enum expansion in method call expression ## # this needs one or more spaces after left parenthesis or comma ## $str = "day night" ## $str.Split( " ",<space>rem<tab> ## >>> $str.Split( " ", "RemoveEmptyEntries" ) <Enter> ERROR ## $str.Split( " ", "RemoveEmptyEntries" -as<space><tab> ## >>> $str.Split( " ", "RemoveEmptyEntries" -as [System.StringSplitOptions] ) <Enter> Success ## $type = [System.Type] ## $type.GetMembers(<space>Def<tab> ## [IO.Directory]::GetFiles( "C:\\", "*",<space>All<tab> ## # this can do continuous enum expansion with comma and no spaces ## $type.GetMembers( "IgnoreCase<comma>Dec<tab><comma>In<tab>" ## [IO.Directory]::GetAccessControl( "C:\\",<space>au<tab><comma>ac<tab><comma>G<tab> ## #Better '$_.' expansion when cmdlet output objects or method return objects ## ls |group { $_.Cr<tab>.Tost<tab>"y")} | tee -var foo| ? { $_.G<tab>.c<tab> -gt 5 } | % { md $_.N<tab> ; copy $_.G<tab> $_.N<tab> } ## [IO.DriveInfo]::GetDrives() | ? { $_.A<tab> -gt 1GB } ## $Host.UI.RawUI.GetBufferContents($rect) | % { $str += $_.c<tab> } ## gcm Add-Content |select -exp Par<tab>| select -ExpandProperty Par<tab> | ? { $_.Par<tab>.N<tab> -eq "string" } ## $data = Get-Process ## $data[2,4,5] | % { $_.<tab> ## #when Get-PipeLineObject failed, '$_.' shows methods and properties name of FileInfo and String and Type ## #Property name expansion by -Property parameter ## [ Format-List | Format-Custom | Format-Table | Format-Wide | Compare-Object | ## ConvertTo-Html | Measure-Object | Select-Object | Group-Object | Sort-Object ] [-Property] <tab> ## Select-Object -ExcludeProperty <tab> ## Select-Object -ExpandProperty <tab> ## gcm Get-Acl|select -exp Par<tab> ## ps |group na<tab> ## ls | ft A<tab>,M<tab>,L<tab> ## #Hashtable key expansion in the variable name and '.<tab>' ## Get-Process | Get-Unique | % { $hash += @{$_.ProcessName=$_} } ## $hash.pow<tab>.pro<tab> ## #Parameter expansion for function, filter and script ## man -f<tab> ## 'param([System.StringSplitOptions]$foo,[System.Management.Automation.ActionPreference]$bar,[System.Management.Automation.CommandTypes]$baz) {}' > foobar.ps1 ## .\\foobar.ps1 -<tab> -b<tab> ## #Enum expansion for function, filter and scripts ## # this can do continuous enum expansion with comma and no spaces ## .\\foobar.ps1 -foo rem<tab> -bar <tab><comma>c<tab><comma>sc<tab> -ea silent<tab> -wa con<tab> ## #Enum expansion for assignment expression ## #needs space(s) after '=' and comma ## #strongly-typed with -as operator and space(s) ## $ErrorActionPreference =<space><tab> ## $cmdtypes = New-Object System.Management.Automation.CommandTypes[] 3 ## $cmdtypes =<space><tab><comma><space>func<tab><comma><space>cmd<tab> -as<space><tab> ## #Path expansion with variable and '\\' or '/' ## $PWD\\../../<tab>\\<tab> ## "$env:SystemDrive/pro<tab>/<tab> ## #Operator expansion which starts with '-' ## "Power","Shell" -m<tab> "Power" -r<tab> '(Pow)(er)','$1d$2' ## 1..9 -co<tab> 5 ## #Keyword expansion ## fu<tab> test { p<tab> $foo, $bar ) b<tab> "foo" } pr<tab> $_ } en<tab> "$bar" } } ## #Variable name expansion (only global scope) ## [Clear-Variable | Get-Variable | New-Variable | Remove-Variable | Set-Variable] [-Name] <tab> ## [Cmdlet | Function | Filter | ExternalScript] -ErrorVariable <tab> ## [Cmdlet | Function | Filter | ExternalScript] -OutVariable <tab> ## Tee-Object -Variable <tab> ## gv pro<tab>,<tab> ## Remove-Variable -Name out<tab>,<tab>,ps<tab> ## ... | ... | tee -v <tab> ## #Alias name expansion ## [Get-Alias | New-Alias | Set-Alias] [-Name] <tab> ## Export-Alias -Name <tab> ## Get-Alias i<tab>,e<tab>,a<tab> ## epal -n for<tab> ## #Property name expansion with -groupBy parameter ## [Format-List | Format-Custom | Format-Table | Format-Wide] -groupBy <tab> ## ps | ft -g <tab> ## gcm | Format-Wide -GroupBy Par<tab> ## #Type accelerators expansion with no charactors ## [<tab> ## New-Object -typename <tab> ## New-Object <tab> ## # File glob expansion with '@' ## ls *.txt@<tab> ## ls file.txt, foo1.txt, 'bar``[1``].txt', 'foo bar .txt' # 1 <tab> expanding with comma ## ls * -Filter *.txt # 2 <tab> refactoring ## ls *.txt # 3 <tab> (or 1 <tab> & 1 <shift>+<tab>) return original glob pattern ## This can also use '^'(hat) or '~'(tilde) for Excluding ## ls <hat>*.txt@<tab> ## ls foo.ps1, 'bar``[1``].xml' # 1 <tab> expanding with comma ## ls * -Filter * -Excluding *.txt # 2 <tab> refactoring ## *.txt<tilde>foo*<tilde>bar*@<tab> ## ls file.txt # 1 <tab> expanding with comma ## ls * -Filter *.txt -Excluding foo*, bar* # 2 <tab> refactoring ## # Ported history expansion from V2CTP3 TabExpansion with '#' ( #<pattern> or #<id> ) ## ls * -Filter * -Excluding foo*, bar*<Enter> ## #ls<tab> ## #1<tab> ## # Command buffer stack with ';'(semicolon) ## ls * -Filter * -Excluding foo*, bar*<semicolon><tab> # push command1 ## echo "PowerShell"<semicolon><tab> # push command2 ## get-process<semicolon><tab> # push command3 ## {COMMAND}<Enter> # execute another command ## get-process # Auto pop command3 from stack by LIFO ## This can also hand-operated pop with ';,'(semicolon&comma) or ';:'(semicolon&colon) ## get-process; <semicolon><comma><tab> ## get-process; echo "PowerShell" # pop command2 from stack by LIFO ## # Function name expansion after 'function' or 'filter' keywords ## function cl<tab> ## #Switch syntax option expansion ## switch -w<tab> -f<tab> ## #Better powershell.exe option expansion with '-' ## powershell -no<tab> -<tab> -en<tab> ## #A part of PowerShell attributes expansion ( CmdletBinding, Parameter, Alias, Validate*, Allow* ) ## [par<tab> ## [cmd<tab> ## #Member expansion for CmdletBinding and Parameter attributes ## [Parameter(man<tab>,<tab>1,val<tab>$true)] ## [CmdletBinding( <tab>"foo", su<tab>$true)] ## #Several current date/time formats with Ctrl+D ## <Ctrl+D><tab><tab><tab><tab><tab>... ## #Hand-operated pop from command buffer with Ctrl+P (this is also available with ';:' or ';,') ## <command>;<tab> # push command ## <Ctrl+D><tab> # pop ## #Paste clipboard with Ctrl+V ## <Ctrl+V><tab> ## # Cut current line with Ctrl+X ## <command><Ctrl+X><tab> ## # Cut words with a charactor after Ctrl+X until the charactor ## 1: PS > dir -Filter *.txt<Ctrl+X>-<tab> # Cut words until '-' ## 2: PS > dir - ## 3: PS > dir -<Ctrl+V><tab> # Paste words that were copyed now ## # Cut last word in current line with Ctrl+Z ## 1: PS > Get-ChildItem *.txt<Ctrl+Z><tab> # Cut last word in current line ## 2: PS > Get-ChildItem ## 3: PS > Get-ChildItem -Exclude <Ctrl+V><tab> # Paste last word that was copyed now ### Generate ProgIDs list... if ( Test-Path $PSHOME\\ProgIDs.txt ) { $_ProgID = type $PSHOME\\ProgIDs.txt -ReadCount 0 } else { $_HKCR = [Microsoft.Win32.Registry]::ClassesRoot.OpenSubKey("CLSID\\") $_ProgID = New-Object ( [System.Collections.Generic.List``1].MakeGenericType([String]) ) foreach ( $_subkey in $_HKCR.GetSubKeyNames() ) { foreach ( $_i in [Microsoft.Win32.Registry]::ClassesRoot.OpenSubKey("CLSID\\$_subkey\\ProgID") ) { if ($_i -ne $null) { $_ProgID.Add($_i.GetValue("")) } } } '$_ProgID was updated...' | Out-Host $_ProgID = $_ProgID|sort -Unique Set-Content -Value $_ProgID -Path $PSHOME\\ProgIDs.txt -Verbose } ### Generate TypeNames list... if ( Test-Path $PSHOME\\TypeNames.txt ) { $_TypeNames = type $PSHOME\\TypeNames.txt -ReadCount 0 } else { $_TypeNames = New-Object ( [System.Collections.Generic.List``1].MakeGenericType([String]) ) foreach ( $_asm in [AppDomain]::CurrentDomain.GetAssemblies() ) { foreach ( $_type in $_asm.GetTypes() ) { $_TypeNames.Add($_type.FullName) } } '$_TypeNames was updated...' | Out-Host $_TypeNames = $_TypeNames | sort -Unique Set-Content -Value $_TypeNames -Path $PSHOME\\TypeNames.txt -Verbose } if ( Test-Path $PSHOME\\TypeNames_System.txt ) { $_TypeNames_System = type $PSHOME\\TypeNames_System.txt -ReadCount 0 } else { $_TypeNames_System = $_TypeNames -like "System.*" -replace '^System\\.' '$_TypeNames_System was updated...' | Out-Host Set-Content -Value $_TypeNames_System -Path $PSHOME\\TypeNames_System.txt -Verbose } ### Generate WMIClasses list... if ( Test-Path $PSHOME\\WMIClasses.txt ) { $_WMIClasses = type $PSHOME\\WMIClasses.txt -ReadCount 0 } else { $_WMIClasses = New-Object ( [System.Collections.Generic.List``1].MakeGenericType([String]) ) foreach ( $_class in gwmi -List ) { $_WMIClasses.Add($_class.Name) } $_WMIClasses = $_WMIClasses | sort -Unique '$_WMIClasses was updated...' | Out-Host Set-Content -Value $_WMIClasses -Path $PSHOME\\WMIClasses.txt -Verbose } [Reflection.Assembly]::LoadWithPartialName( "System.Windows.Forms" ) | Out-Null $global:_cmdstack = New-Object Collections.Stack $global:_snapin = $null $global:_TypeAccelerators = "ADSI", "Array", "Bool", "Byte", "Char", "Decimal", "Double", "float", "hashtable", "int", "Long", "PSObject", "ref", "Regex", "ScriptBlock", "Single", "String", "switch", "Type", "WMI", "WMIClass", "WMISearcher", "xml" iex (@' function prompt { if ($_cmdstack.Count -gt 0) { $line = $global:_cmdstack.Pop() -replace '([[\\]\\(\\)+{}?~%])','{$1}' [System.Windows.Forms.SendKeys]::SendWait($line) } '@ + @" ${function:prompt} } "@) function Write-ClassNames ( $data, $i, $prefix='', $sep='.' ) { $preItem = "" foreach ( $class in $data -like $_opt ) { $Item = $class.Split($sep) if ( $preItem -ne $Item[$i] ) { if ( $i+1 -eq $Item.Count ) { if ( $prefix -eq "[" ) { $suffix = "]" } elseif ( $sep -eq "_" ) { $suffix = "" } else { $suffix = " " } } else { $suffix = "" } $prefix + $_opt.Substring(0, $_opt.LastIndexOf($sep)+1) + $Item[$i] + $suffix $preItem = $Item[$i] } } } function Get-PipeLineObject { $i = -2 $property = $null do { $str = $line.Split("|") $_cmdlet = [regex]::Split($str[$i], '[|;=]')[-1] $_cmdlet = $_cmdlet.Trim().Split()[0] if ( $_cmdlet -eq "?" ) { $_cmdlet = "Where-Object" } $global:_exp = $_cmdlet # now get the info object for it... $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet)[0] # loop resolving aliases... while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet.Definition)[0] } if ( "Select-Object" -eq $_cmdlet ) { if ( $str[$i] -match '\\s+-Exp\\w*[\\s:]+(\\w+)' ) { $property = $Matches[1] + ";" + $property } } $i-- } while ( "Get-Unique", "Select-Object", "Sort-Object", "Tee-Object", "Where-Object" -contains $_cmdlet ) if ( $global:_forgci -eq $null ) { $a = @(ls "Alias:\\")[0] $e = @(ls "Env:\\")[0] $f = @(ls "Function:\\")[0] $h = @(ls "HKCU:\\")[0] $v = @(ls "Variable:\\")[0] $c = @(ls "cert:\\")[0] $global:_forgci = gi $PSHOME\\powershell.exe | Add-Member 'NoteProperty' CommandType $f.CommandType -P | Add-Member 'NoteProperty' Definition $a.Definition -P | Add-Member 'NoteProperty' Description $a.Description -P | Add-Member 'NoteProperty' Key $e.Key -P | Add-Member 'NoteProperty' Location $c.Location -P | Add-Member 'NoteProperty' LocationName $c.LocationName -P | Add-Member 'NoteProperty' Options $a.Options -P | Add-Member 'NoteProperty' ReferencedCommand $a.ReferencedCommand -P | Add-Member 'NoteProperty' ResolvedCommand $a.ResolvedCommand -P | Add-Member 'NoteProperty' ScriptBlock $f.ScriptBlock -P | Add-Member 'NoteProperty' StoreNames $c.StoreNames -P | Add-Member 'NoteProperty' SubKeyCount $h.SubKeyCount -P | Add-Member 'NoteProperty' Value $e.Value -P | Add-Member 'NoteProperty' ValueCount $h.ValueCount -P | Add-Member 'NoteProperty' Visibility $a.Visibility -P | Add-Member 'NoteProperty' Property $h.Property -P | Add-Member 'NoteProperty' ResolvedCommandName $a.ResolvedCommandName -P | Add-Member 'ScriptMethod' Close {} -P | Add-Member 'ScriptMethod' CreateSubKey {} -P | Add-Member 'ScriptMethod' DeleteSubKey {} -P | Add-Member 'ScriptMethod' DeleteSubKeyTree {} -P | Add-Member 'ScriptMethod' DeleteValue {} -P | Add-Member 'ScriptMethod' Flush {} -P | Add-Member 'ScriptMethod' GetSubKeyNames {} -P | Add-Member 'ScriptMethod' GetValue {} -P | Add-Member 'ScriptMethod' GetValueKind {} -P | Add-Member 'ScriptMethod' GetValueNames {} -P | Add-Member 'ScriptMethod' IsValidValue {} -P | Add-Member 'ScriptMethod' OpenSubKey {} -P | Add-Member 'ScriptMethod' SetValue {} -P } if ( $global:_mix -eq $null ) { $f = gi $PSHOME\\powershell.exe $t = [type] $s = "" $global:_mix = ` Add-Member -InputObject (New-Object PSObject) 'NoteProperty' Mode $f.Mode -P | Add-Member 'NoteProperty' Assembly $t.Assembly -P | Add-Member 'NoteProperty' AssemblyQualifiedName $t.AssemblyQualifiedName -P | Add-Member 'NoteProperty' Attributes $f.Attributes -P | Add-Member 'NoteProperty' BaseType $t.BaseType -P | Add-Member 'NoteProperty' ContainsGenericParameters $t.ContainsGenericParameters -P | Add-Member 'NoteProperty' CreationTime $f.CreationTime -P | Add-Member 'NoteProperty' CreationTimeUtc $f.CreationTimeUtc -P | Add-Member 'NoteProperty' DeclaringMethod $t.DeclaringMethod -P | Add-Member 'NoteProperty' DeclaringType $t.DeclaringType -P | Add-Member 'NoteProperty' Exists $f.Exists -P | Add-Member 'NoteProperty' Extension $f.Extension -P | Add-Member 'NoteProperty' FullName $f.FullName -P | Add-Member 'NoteProperty' GenericParameterAttributes $t.GenericParameterAttributes -P | Add-Member 'NoteProperty' GenericParameterPosition $t.GenericParameterPosition -P | Add-Member 'NoteProperty' GUID $t.GUID -P | Add-Member 'NoteProperty' HasElementType $t.HasElementType -P | Add-Member 'NoteProperty' IsAbstract $t.IsAbstract -P | Add-Member 'NoteProperty' IsAnsiClass $t.IsAnsiClass -P | Add-Member 'NoteProperty' IsArray $t.IsArray -P | Add-Member 'NoteProperty' IsAutoClass $t.IsAutoClass -P | Add-Member 'NoteProperty' IsAutoLayout $t.IsAutoLayout -P | Add-Member 'NoteProperty' IsByRef $t.IsByRef -P | Add-Member 'NoteProperty' IsClass $t.IsClass -P | Add-Member 'NoteProperty' IsCOMObject $t.IsCOMObject -P | Add-Member 'NoteProperty' IsContextful $t.IsContextful -P | Add-Member 'NoteProperty' IsEnum $t.IsEnum -P | Add-Member 'NoteProperty' IsExplicitLayout $t.IsExplicitLayout -P | Add-Member 'NoteProperty' IsGenericParameter $t.IsGenericParameter -P | Add-Member 'NoteProperty' IsGenericType $t.IsGenericType -P | Add-Member 'NoteProperty' IsGenericTypeDefinition $t.IsGenericTypeDefinition -P | Add-Member 'NoteProperty' IsImport $t.IsImport -P | Add-Member 'NoteProperty' IsInterface $t.IsInterface -P | Add-Member 'NoteProperty' IsLayoutSequential $t.IsLayoutSequential -P | Add-Member 'NoteProperty' IsMarshalByRef $t.IsMarshalByRef -P | Add-Member 'NoteProperty' IsNested $t.IsNested -P | Add-Member 'NoteProperty' IsNestedAssembly $t.IsNestedAssembly -P | Add-Member 'NoteProperty' IsNestedFamANDAssem $t.IsNestedFamANDAssem -P | Add-Member 'NoteProperty' IsNestedFamily $t.IsNestedFamily -P | Add-Member 'NoteProperty' IsNestedFamORAssem $t.IsNestedFamORAssem -P | Add-Member 'NoteProperty' IsNestedPrivate $t.IsNestedPrivate -P | Add-Member 'NoteProperty' IsNestedPublic $t.IsNestedPublic -P | Add-Member 'NoteProperty' IsNotPublic $t.IsNotPublic -P | Add-Member 'NoteProperty' IsPointer $t.IsPointer -P | Add-Member 'NoteProperty' IsPrimitive $t.IsPrimitive -P | Add-Member 'NoteProperty' IsPublic $t.IsPublic -P | Add-Member 'NoteProperty' IsSealed $t.IsSealed -P | Add-Member 'NoteProperty' IsSerializable $t.IsSerializable -P | Add-Member 'NoteProperty' IsSpecialName $t.IsSpecialName -P | Add-Member 'NoteProperty' IsUnicodeClass $t.IsUnicodeClass -P | Add-Member 'NoteProperty' IsValueType $t.IsValueType -P | Add-Member 'NoteProperty' IsVisible $t.IsVisible -P | Add-Member 'NoteProperty' LastAccessTime $f.LastAccessTime -P | Add-Member 'NoteProperty' LastAccessTimeUtc $f.LastAccessTimeUtc -P | Add-Member 'NoteProperty' LastWriteTime $f.LastWriteTime -P | Add-Member 'NoteProperty' LastWriteTimeUtc $f.LastWriteTimeUtc -P | Add-Member 'NoteProperty' MemberType $t.MemberType -P | Add-Member 'NoteProperty' MetadataToken $t.MetadataToken -P | Add-Member 'NoteProperty' Module $t.Module -P | Add-Member 'NoteProperty' Name $t.Name -P | Add-Member 'NoteProperty' Namespace $t.Namespace -P | Add-Member 'NoteProperty' Parent $f.Parent -P | Add-Member 'NoteProperty' ReflectedType $t.ReflectedType -P | Add-Member 'NoteProperty' Root $f.Root -P | Add-Member 'NoteProperty' StructLayoutAttribute $t.StructLayoutAttribute -P | Add-Member 'NoteProperty' TypeHandle $t.TypeHandle -P | Add-Member 'NoteProperty' TypeInitializer $t.TypeInitializer -P | Add-Member 'NoteProperty' UnderlyingSystemType $t.UnderlyingSystemType -P | Add-Member 'NoteProperty' PSChildName $f.PSChildName -P | Add-Member 'NoteProperty' PSDrive $f.PSDrive -P | Add-Member 'NoteProperty' PSIsContainer $f.PSIsContainer -P | Add-Member 'NoteProperty' PSParentPath $f.PSParentPath -P | Add-Member 'NoteProperty' PSPath $f.PSPath -P | Add-Member 'NoteProperty' PSProvider $f.PSProvider -P | Add-Member 'NoteProperty' BaseName $f.BaseName -P | Add-Member 'ScriptMethod' Clone {} -P | Add-Member 'ScriptMethod' CompareTo {} -P | Add-Member 'ScriptMethod' Contains {} -P | Add-Member 'ScriptMethod' CopyTo {} -P | Add-Member 'ScriptMethod' Create {} -P | Add-Member 'ScriptMethod' CreateObjRef {} -P | Add-Member 'ScriptMethod' CreateSubdirectory {} -P | Add-Member 'ScriptMethod' Delete {} -P | Add-Member 'ScriptMethod' EndsWith {} -P | Add-Member 'ScriptMethod' FindInterfaces {} -P | Add-Member 'ScriptMethod' FindMembers {} -P | Add-Member 'ScriptMethod' GetAccessControl {} -P | Add-Member 'ScriptMethod' GetArrayRank {} -P | Add-Member 'ScriptMethod' GetConstructor {} -P | Add-Member 'ScriptMethod' GetConstructors {} -P | Add-Member 'ScriptMethod' GetCustomAttributes {} -P | Add-Member 'ScriptMethod' GetDefaultMembers {} -P | Add-Member 'ScriptMethod' GetDirectories {} -P | Add-Member 'ScriptMethod' GetElementType {} -P | Add-Member 'ScriptMethod' GetEnumerator {} -P | Add-Member 'ScriptMethod' GetEvent {} -P | Add-Member 'ScriptMethod' GetEvents {} -P | Add-Member 'ScriptMethod' GetField {} -P | Add-Member 'ScriptMethod' GetFields {} -P | Add-Member 'ScriptMethod' GetFiles {} -P | Add-Member 'ScriptMethod' GetFileSystemInfos {} -P | Add-Member 'ScriptMethod' GetGenericArguments {} -P | Add-Member 'ScriptMethod' GetGenericParameterConstraints {} -P | Add-Member 'ScriptMethod' GetGenericTypeDefinition {} -P | Add-Member 'ScriptMethod' GetInterface {} -P | Add-Member 'ScriptMethod' GetInterfaceMap {} -P | Add-Member 'ScriptMethod' GetInterfaces {} -P | Add-Member 'ScriptMethod' GetLifetimeService {} -P | Add-Member 'ScriptMethod' GetMember {} -P | Add-Member 'ScriptMethod' GetMembers {} -P | Add-Member 'ScriptMethod' GetMethod {} -P | Add-Member 'ScriptMethod' GetMethods {} -P | Add-Member 'ScriptMethod' GetNestedType {} -P | Add-Member 'ScriptMethod' GetNestedTypes {} -P | Add-Member 'ScriptMethod' GetObjectData {} -P | Add-Member 'ScriptMethod' GetProperties {} -P | Add-Member 'ScriptMethod' GetProperty {} -P | Add-Member 'ScriptMethod' GetTypeCode {} -P | Add-Member 'ScriptMethod' IndexOf {} -P | Add-Member 'ScriptMethod' IndexOfAny {} -P | Add-Member 'ScriptMethod' InitializeLifetimeService {} -P | Add-Member 'ScriptMethod' Insert {} -P | Add-Member 'ScriptMethod' InvokeMember {} -P | Add-Member 'ScriptMethod' IsAssignableFrom {} -P | Add-Member 'ScriptMethod' IsDefined {} -P | Add-Member 'ScriptMethod' IsInstanceOfType {} -P | Add-Member 'ScriptMethod' IsNormalized {} -P | Add-Member 'ScriptMethod' IsSubclassOf {} -P | Add-Member 'ScriptMethod' LastIndexOf {} -P | Add-Member 'ScriptMethod' LastIndexOfAny {} -P | Add-Member 'ScriptMethod' MakeArrayType {} -P | Add-Member 'ScriptMethod' MakeByRefType {} -P | Add-Member 'ScriptMethod' MakeGenericType {} -P | Add-Member 'ScriptMethod' MakePointerType {} -P | Add-Member 'ScriptMethod' MoveTo {} -P | Add-Member 'ScriptMethod' Normalize {} -P | Add-Member 'ScriptMethod' PadLeft {} -P | Add-Member 'ScriptMethod' PadRight {} -P | Add-Member 'ScriptMethod' Refresh {} -P | Add-Member 'ScriptMethod' Remove {} -P | Add-Member 'ScriptMethod' Replace {} -P | Add-Member 'ScriptMethod' SetAccessControl {} -P | Add-Member 'ScriptMethod' Split {} -P | Add-Member 'ScriptMethod' StartsWith {} -P | Add-Member 'ScriptMethod' Substring {} -P | Add-Member 'ScriptMethod' ToCharArray {} -P | Add-Member 'ScriptMethod' ToLower {} -P | Add-Member 'ScriptMethod' ToLowerInvariant {} -P | Add-Member 'ScriptMethod' ToUpper {} -P | Add-Member 'ScriptMethod' ToUpperInvariant {} -P | Add-Member 'ScriptMethod' Trim {} -P | Add-Member 'ScriptMethod' TrimEnd {} -P | Add-Member 'ScriptMethod' TrimStart {} -P | Add-Member 'NoteProperty' Chars $s.Chars -P } if ( "Add-Member" -eq $_cmdlet ) { $global:_dummy = $null } if ( "Compare-Object" -eq $_cmdlet ) { $global:_dummy = (Compare-Object 1 2)[0] } if ( "ConvertFrom-SecureString" -eq $_cmdlet ) { $global:_dummy = $null } if ( "ConvertTo-SecureString" -eq $_cmdlet ) { $global:_dummy = convertto-securestring "P@ssW0rD!" -asplaintext -force } if ( "ForEach-Object" -eq $_cmdlet ) { $global:_dummy = $null } if ( "Get-Acl" -eq $_cmdlet ) { $global:_dummy = Get-Acl } if ( "Get-Alias" -eq $_cmdlet ) { $global:_dummy = (Get-Alias)[0] } if ( "Get-AuthenticodeSignature" -eq $_cmdlet ) { $global:_dummy = Get-AuthenticodeSignature $PSHOME\\powershell.exe } if ( "Get-ChildItem" -eq $_cmdlet ) { $global:_dummy = $global:_forgci } if ( "Get-Command" -eq $_cmdlet ) { $global:_dummy = @(iex $str[$i+1])[0] } if ( "Get-Content" -eq $_cmdlet ) { $global:_dummy = (type $PSHOME\\profile.ps1)[0] } if ( "Get-Credential" -eq $_cmdlet ) { $global:_dummy = $null } if ( "Get-Culture" -eq $_cmdlet ) { $global:_dummy = Get-Culture } if ( "Get-Date" -eq $_cmdlet ) { $global:_dummy = Get-Date } if ( "Get-Event" -eq $_cmdlet ) { $global:_dummy = (Get-Event)[0] } if ( "Get-EventLog" -eq $_cmdlet ) { $global:_dummy = Get-EventLog Windows` PowerShell -Newest 1 } if ( "Get-ExecutionPolicy" -eq $_cmdlet ) { $global:_dummy = Get-ExecutionPolicy } if ( "Get-Help" -eq $_cmdlet ) { $global:_dummy = Get-Help Add-Content } if ( "Get-History" -eq $_cmdlet ) { $global:_dummy = Get-History -Count 1 } if ( "Get-Host" -eq $_cmdlet ) { $global:_dummy = Get-Host } if ( "Get-Item" -eq $_cmdlet ) { $global:_dummy = $global:_forgci } if ( "Get-ItemProperty" -eq $_cmdlet ) { $global:_dummy = $null } if ( "Get-Location" -eq $_cmdlet ) { $global:_dummy = Get-Location } if ( "Get-Member" -eq $_cmdlet ) { $global:_dummy = (1|Get-Member)[0] } if ( "Get-Module" -eq $_cmdlet ) { $global:_dummy = (Get-Module)[0] } if ( "Get-PfxCertificate" -eq $_cmdlet ) { $global:_dummy = $null } if ( "Get-Process" -eq $_cmdlet ) { $global:_dummy = ps powershell } if ( "Get-PSBreakpoint" -eq $_cmdlet ) { $global:_dummy = Add-Member -InputObject (New-Object PSObject) 'NoteProperty' Action '' -P | Add-Member 'NoteProperty' Command '' -P | Add-Member 'NoteProperty' Enabled '' -P | Add-Member 'NoteProperty' HitCount '' -P | Add-Member 'NoteProperty' Id '' -P | Add-Member 'NoteProperty' Script '' -P } if ( "Get-PSCallStack" -eq $_cmdlet ) { $global:_dummy = Get-PSCallStack } if ( "Get-PSDrive" -eq $_cmdlet ) { $global:_dummy = Get-PSDrive Function } if ( "Get-PSProvider" -eq $_cmdlet ) { $global:_dummy = Get-PSProvider FileSystem } if ( "Get-PSSnapin" -eq $_cmdlet ) { $global:_dummy = Get-PSSnapin Microsoft.PowerShell.Core } if ( "Get-Service" -eq $_cmdlet ) { $global:_dummy = (Get-Service)[0] } if ( "Get-TraceSource" -eq $_cmdlet ) { $global:_dummy = Get-TraceSource AddMember } if ( "Get-UICulture" -eq $_cmdlet ) { $global:_dummy = Get-UICulture } if ( "Get-Variable" -eq $_cmdlet ) { $global:_dummy = Get-Variable _ } if ( "Get-WmiObject" -eq $_cmdlet ) { $global:_dummy = @(iex $str[$i+1])[0] } if ( "Group-Object" -eq $_cmdlet ) { $global:_dummy = 1 | group } if ( "Measure-Command" -eq $_cmdlet ) { $global:_dummy = Measure-Command {} } if ( "Measure-Object" -eq $_cmdlet ) { $global:_dummy = Measure-Object } if ( "New-PSDrive" -eq $_cmdlet ) { $global:_dummy = Get-PSDrive Alias } if ( "New-TimeSpan" -eq $_cmdlet ) { $global:_dummy = New-TimeSpan } if ( "Resolve-Path" -eq $_cmdlet ) { $global:_dummy = $PWD } if ( "Select-String" -eq $_cmdlet ) { $global:_dummy = " " | Select-String " " } if ( "Set-Date" -eq $_cmdlet ) { $global:_dummy = Get-Date } if ( $property -ne $null) { foreach ( $name in $property.Split(";", "RemoveEmptyEntries" -as [System.StringSplitOptions]) ) { $global:_dummy = @($global:_dummy.$name)[0] } } } function TabExpansion { param($line, $lastWord) & { # Helper function to write out the matching set of members. It depends # on dynamic scoping to get $_base, _$expression and $_pat function Write-Members ($sep='.') { # evaluate the expression to get the object to examine... Invoke-Expression ('$_val=' + $_expression) if ( $_expression -match '^\\$global:_dummy' ) { $temp = $_expression -replace '^\\$global:_dummy(.*)','$1' $_expression = '$_' + $temp } $_method = [Management.Automation.PSMemberTypes] ` 'Method,CodeMethod,ScriptMethod,ParameterizedProperty' if ($sep -eq '.') { $members = ( [Object[]](Get-Member -InputObject $_val.PSextended $_pat) + [Object[]](Get-Member -InputObject $_val.PSadapted $_pat) + [Object[]](Get-Member -InputObject $_val.PSbase $_pat) ) if ( $_val -is [Hashtable] ) { [Microsoft.PowerShell.Commands.MemberDefinition[]]$_keys = $null foreach ( $_name in $_val.Keys ) { $_keys += ` New-Object Microsoft.PowerShell.Commands.MemberDefinition ` [int],$_name,"Property",0 } $members += [Object[]]$_keys | ? { $_.Name -like $_pat } } foreach ($_m in $members | sort membertype,name -Unique) { if ($_m.MemberType -band $_method) { # Return a method... $_base + $_expression + $sep + $_m.name + '(' } else { # Return a property... $_base + $_expression + $sep + $_m.name } } } else { foreach ($_m in Get-Member -Static -InputObject $_val $_pat | Sort-Object membertype,name) { if ($_m.MemberType -band $_method) { # Return a method... $_base + $_expression + $sep + $_m.name + '(' } else { # Return a property... $_base + $_expression + $sep + $_m.name } } } } switch ([int]$line[-1]) { # Ctrl+D several date/time formats 4 { "[DateTime]::Now" [DateTime]::Now [DateTime]::Now.ToString("yyyyMMdd") [DateTime]::Now.ToString("MMddyyyy") [DateTime]::Now.ToString("yyyyMMddHHmmss") [DateTime]::Now.ToString("MMddyyyyHHmmss") 'd f g m o r t u y'.Split(" ") | % { [DateTime]::Now.ToString($_) } break; } # Ctrl+P hand-operated pop from command buffer stack 16 { $_base = $lastword.SubString(0, $lastword.Length-1) $_buf = $global:_cmdstack.Pop() if ( $_buf.Contains("'") ) { $line = ($line.SubString(0, $line.Length-1) + $_buf) -replace '([[\\]\\(\\)+{}?~%])','{$1}' [System.Windows.Forms.SendKeys]::SendWait("{Esc}$line") } else { $_base + $_buf } break; } # Ctrl+R $Host.UI.RawUI. 18 { '$Host.UI.RawUI.' '$Host.UI.RawUI' break; } # Ctrl+V paste clipboard 22 { $_base = $lastword.SubString(0, $lastword.Length-1) $global:_clip = New-Object System.Windows.Forms.TextBox $global:_clip.Multiline = $true $global:_clip.Paste() $line = ($line.SubString(0, $line.Length-1) + $global:_clip.Text) -replace '([[\\]\\(\\)+{}?~%])','{$1}' [System.Windows.Forms.SendKeys]::SendWait("{Esc}$line") break; } # Ctrl+X cut current line 24 { $_clip = new-object System.Windows.Forms.TextBox; $_clip.Multiline = $true; $_clip.Text = $line.SubString(0, $line.Length-1) $_clip.SelectAll() $_clip.Copy() [System.Windows.Forms.SendKeys]::SendWait("{ESC}") break; } # Ctrl+Z cut last word in current line 26 { $line.SubString(0, $line.Length-1) -match '(^(.*\\s)([^\\s]*)$)|(^[^\\s]*$)' | Out-Null $_clip = new-object System.Windows.Forms.TextBox; $_clip.Multiline = $true; $_clip.Text = $Matches[3] $_clip.SelectAll() $_clip.Copy() [System.Windows.Forms.SendKeys]::SendWait("{ESC}") $line = $Matches[2] -replace '([[\\]\\(\\)+{}?~%])','{$1}' [System.Windows.Forms.SendKeys]::SendWait($line) break; } } switch ( [int]$line[-2] ) { # Ctrl+X cut words with a charactor after Ctrl+X until the charactor 24 { $line.SubString(0, $line.Length-2) -match "(^(.*$($line[-1]))([^$($line[-1])]*)`$)|(^[^\\$($line[-1])]*`$)" | Out-Null $_clip = new-object System.Windows.Forms.TextBox; $_clip.Multiline = $true; $_clip.Text = $Matches[3] $_clip.SelectAll() $_clip.Copy() [System.Windows.Forms.SendKeys]::SendWait("{ESC}") $line = $Matches[2] -replace '([[\\]\\(\\)+{}?~%])','{$1}' [System.Windows.Forms.SendKeys]::SendWait($line) break; } } switch -regex ($lastWord) { # Handle property and method expansion at '$_' '(^.*)(\\$_\\.)(\\w*)$' { $_base = $matches[1] $_expression = '$global:_dummy' $_pat = $matches[3] + '*' $global:_dummy = $null Get-PipeLineObject if ( $global:_dummy -eq $null ) { if ( $global:_exp -match '^\\$.*\\(.*$' ) { $type = ( iex $_exp.Split("(")[0] ).OverloadDefinitions[0].Split(" ")[0] -replace '\\[[^\\[\\]]*\\]$' -as [type] if ( $_expression -match '^\\$global:_dummy' ) { $temp = $_expression -replace '^\\$global:_dummy(.*)','$1' $_expression = '$_' + $temp } foreach ( $_m in $type.GetMembers() | sort membertype,name | group name | ? { $_.Name -like $_pat } | % { $_.Group[0] } ) { if ($_m.MemberType -eq "Method") { $_base + $_expression + '.' + $_m.name + '(' } else { $_base + $_expression + '.' + $_m.name } } break; } elseif ( $global:_exp -match '^\\[.*\\:\\:.*\\(.*$' ) { $tname, $mname = $_exp.Split(":(", "RemoveEmptyEntries"-as [System.StringSplitOptions])[0,1] $type = @(iex ($tname + '.GetMember("' + $mname + '")'))[0].ReturnType.FullName -replace '\\[[^\\[\\]]*\\]$' -as [type] if ( $_expression -match '^\\$global:_dummy' ) { $temp = $_expression -replace '^\\$global:_dummy(.*)','$1' $_expression = '$_' + $temp } foreach ( $_m in $type.GetMembers() | sort membertype,name | group name | ? { $_.Name -like $_pat } | % { $_.Group[0] } ) { if ($_m.MemberType -eq "Method") { $_base + $_expression + '.' + $_m.name + '(' } else { $_base + $_expression + '.' + $_m.name } } break; } elseif ( $global:_exp -match '^(\\$\\w+(\\[[0-9,\\.]+\\])*(\\.\\w+(\\[[0-9,\\.]+\\])*)*)$' ) { $global:_dummy = @(iex $Matches[1])[0] } else { $global:_dummy = $global:_mix } } Write-Members break; } # Handle property and method expansion rooted at variables... # e.g. $a.b.<tab> '(^.*)(\\$(\\w|\\.)+)\\.(\\w*)$' { $_base = $matches[1] $_expression = $matches[2] [void] ( iex "$_expression.IsDataLanguageOnly" ) # for [ScriptBlock] $_pat = $matches[4] + '*' if ( $_expression -match '^\\$_\\.' ) { $_expression = $_expression -replace '^\\$_(.*)',('$global:_dummy' + '$1') } Write-Members break; } # Handle simple property and method expansion on static members... # e.g. [datetime]::n<tab> '(^.*)(\\[(\\w|\\.)+\\])\\:\\:(\\w*)$' { $_base = $matches[1] $_expression = $matches[2] $_pat = $matches[4] + '*' Write-Members '::' break; } # Handle complex property and method expansion on static members # where there are intermediate properties... # e.g. [datetime]::now.d<tab> '(^.*)(\\[(\\w|\\.)+\\]\\:\\:(\\w+\\.)+)(\\w*)$' { $_base = $matches[1] # everything before the expression $_expression = $matches[2].TrimEnd('.') # expression less trailing '.' $_pat = $matches[5] + '*' # the member to look for... Write-Members break; } # Handle variable name expansion... '(^.*\\$)(\\w+)$' { $_prefix = $matches[1] $_varName = $matches[2] foreach ($_v in Get-ChildItem ('variable:' + $_varName + '*')) { $_prefix + $_v.name } break; } # Handle env&function drives variable name expansion... '(^.*\\$)(.*\\:)(\\w+)$' { $_prefix = $matches[1] $_drive = $matches[2] $_varName = $matches[3] if ($_drive -eq "env:" -or $_drive -eq "function:") { foreach ($_v in Get-ChildItem ($_drive + $_varName + '*')) { $_prefix + $_drive + $_v.name } } break; } # Handle array's element property and method expansion # where there are intermediate properties... # e.g. foo[0].n.b<tab> '(^.*)(\\$((\\w+\\.)|(\\w+(\\[(\\w|,)+\\])+\\.))+)(\\w*)$' { $_base = $matches[1] $_expression = $matches[2].TrimEnd('.') $_pat = $Matches[8] + '*' [void] ( iex "$_expression.IsDataLanguageOnly" ) # for [ScriptBlock] if ( $_expression -match '^\\$_\\.' ) { $_expression = $_expression -replace '^\\$_(.*)',('$global:_dummy' + '$1') } Write-Members break; } # Handle property and method expansion rooted at type object... # e.g. [System.Type].a<tab> '(^\\[(\\w|\\.)+\\])\\.(\\w*)$' { if ( $(iex $Matches[1]) -isnot [System.Type] ) { break; } $_expression = $Matches[1] $_pat = $Matches[$matches.Count-1] + '*' Write-Members break; } # Handle complex property and method expansion on type object members # where there are intermediate properties... # e.g. [datetime].Assembly.a<tab> '^(\\[(\\w|\\.)+\\]\\.(\\w+\\.)+)(\\w*)$' { $_expression = $matches[1].TrimEnd('.') # expression less trailing '.' $_pat = $matches[4] + '*' # the member to look for... if ( $(iex $_expression) -eq $null ) { break; } Write-Members break; } # Handle property and method expansion rooted at close parenthes... # e.g. (123).a<tab> '^(.*)\\)((\\w|\\.)*)\\.(\\w*)$' { $_base = $Matches[1] + ")" if ( $matches[3] -eq $null) { $_expression = '[System.Type]' } else { $_expression = '[System.Type]' + $Matches[2] } $_pat = $matches[4] + '*' iex "$_expression | Get-Member $_pat | sort MemberType,Name" | % { if ( $_.MemberType -like "*Method*" -or $_.MemberType -like "*Parameterized*" ) { $parenthes = "(" } if ( $Matches[2] -eq "" ) { $_base + "." + $_.Name + $parenthes } else { $_base + $Matches[2] + "." + $_.Name + $parenthes } } break; } # Handle .NET type name expansion ... # e.g. [Microsoft.PowerShell.Com<tab> '^\\[(\\w+(\\.\\w*)*)$' { $_opt = $matches[1] + '*' if ( $_opt -eq "*" ) { $_TypeAccelerators -like $_opt -replace '^(.*)$', '[$1]' } else { $_TypeAccelerators -like $_opt -replace '^(.*)$', '[$1]' Write-ClassNames $_TypeNames_System ($_opt.Split(".").Count-1) '[' Write-ClassNames $_TypeNames ($_opt.Split(".").Count-1) '[' } break; } # Handle file/directory name which contains $env: variable # e.g. $env:windir\\<tab> '^\\$(env:)?\\w+([\\\\/][^\\\\/]*)*$' { $path = iex ('"' + $Matches[0] + '"') if ( $Matches[2].Length -gt 1 ) { $parent = Split-Path $path -Parent $leaf = (Split-Path $path -Leaf) + '*' } else { $parent = $path $leaf = '*' } if ( Test-Path $parent ) { $i = $Matches[0].LastIndexOfAny("/\\") $_base = $Matches[0].Substring(0,$i+1) [IO.Directory]::GetFileSystemEntries( $parent, $leaf ) | % { $_base + ($_.Split("\\/")[-1] -replace '([\\$\\s&])','`$1' -replace '([[\\]])', '````$1') } } } # Handle file glob expansion ... # e.g. *.txt~about*@<tab> '^(\\^?([^~]+))(~(.*))*@$' { if ( $Matches[1] -notlike "^*" ) { $include = $Matches[2] -replace '``','`' if ( $Matches[3] ) { $exclude = $Matches[3].Split("~", "RemoveEmptyEntries" -as [System.StringSplitOptions]) -replace '``','`' } } else { $include = "*" $exclude = $Matches[2] -replace '``','`' } $fse = [IO.Directory]::GetFileSystemEntries($PWD) $fse = $fse -replace '.*[\\\\/]([^/\\\\]*)$','$1' % -in ($fse -like $include) { $fse = $_; $exclude | % { $fse = $fse -notlike $_ } } $fse = $fse -replace '^.*\\s.*$', ('"$0"') $fse = $fse -replace '([\\[\\]])', '````$1' -replace '^.*([\\[\\]]).*$', ('"$0"') $fse = $fse -replace '""', '"' $OFS = ", "; "$fse" $OFS = ", "; "* -Filter $include " + $(if($exclude){"-Exclude $exclude"}) $Matches[0].Substring(0, $Matches[0].Length-1) break; } # Handle command buffer stack... '(.*);(.?)$' { $_base = $Matches[1] if ( $Matches[2] -eq ":" -or $Matches[2] -eq "," ) { if ( $_cmdstack.Count -gt 0 ) { $_buf = $global:_cmdstack.Pop() if ( $_buf.Contains("'") ) { $line = ($line.SubString(0, $line.Length-1) + $_buf) -replace '([[\\]\\(\\)+{}?~%])','{$1}' [System.Windows.Forms.SendKeys]::SendWait("{Esc}$line") } else { $_base + $_buf } } else { "" } } elseif ( $Matches[2] -eq "" ) { $global:_cmdstack.Push($line.SubString(0,$line.Length-1)) [System.Windows.Forms.SendKeys]::SendWait("{ESC}") } } # Do completion on parameters... '^-([\\w0-9]*)' { $_pat = $matches[1] + '*' # extract the command name from the string # first split the string into statements and pipeline elements # This doesn't handle strings however. $_cmdlet = [regex]::Split($line, '[|;=]')[-1] # Extract the trailing unclosed block e.g. ls | foreach { cp if ($_cmdlet -match '\\{([^\\{\\}]*)$') { $_cmdlet = $matches[1] } # Extract the longest unclosed parenthetical expression... if ($_cmdlet -match '\\(([^()]*)$') { $_cmdlet = $matches[1] } # take the first space separated token of the remaining string # as the command to look up. Trim any leading or trailing spaces # so you don't get leading empty elements. $_cmdlet = $_cmdlet.Trim().Split()[0] # now get the info object for it... $_cmdlet = @(Get-Command -type 'All' $_cmdlet)[0] # loop resolving aliases... while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'All' $_cmdlet.Definition)[0] } if ( $_cmdlet.name -eq "powershell.exe" ) { if ( $global:_PSexeOption ) { $global:_PSexeOption -like "-$_pat" -replace '^(-[^,]+).*$', '$1' | sort } else { ($global:_PSexeOption = powershell.exe -?) -like "-$_pat" -replace '^(-[^,]+).*$', '$1' | sort } break; } if ( $_cmdlet.CommandType -eq "Cmdlet" ) { # expand the parameter sets and emit the matching elements foreach ($_n in $_cmdlet.ParameterSets | Select-Object -expand parameters | Sort-Object -Unique name) { $_n = $_n.name if ($_n -like $_pat) { '-' + $_n } } break; } elseif ( "ExternalScript", "Function", "Filter" -contains $_cmdlet.CommandType ) { if ( $_cmdlet.CommandType -eq "ExternalScript" ) { $_fsr = New-Object IO.StreamReader $_cmdlet.Definition $_def = "Function _Dummy { $($_fsr.ReadToEnd()) }" $_fsr.Close() iex $_def $_cmdlet = "_Dummy" } if ( ((gi "Function:$_cmdlet").Definition -replace '\\n').Split("{")[0] -match 'param\\((.*\\))\\s*[;\\.&a-zA-Z]*\\s*$' ) { ( ( ( $Matches[1].Split('$', "RemoveEmptyEntries" -as [System.StringSplitOptions]) -replace ` '^(\\w+)(.*)','$1' ) -notmatch '^\\s+$' ) -notmatch '^\\s*\\[.*\\]\\s*$' ) -like $_pat | sort | % { '-' + $_ } } break; } elseif ( $line -match 'switch\\s+(-\\w+\\s+)*-(\\w*)$') { $_pat = $Matches[2] + '*' "regex", "wildcard", "exact", "casesensitive", "file" -like $_pat -replace '^(.*)$', '-$1' break; } elseif ( $_cmdlet -eq $null ) { "-and", "-as", "-band", "-bnot", "-bor", "-bxor", "-ccontains", "-ceq", "-cge", "-cgt", "-cle", "-clike", "-clt", "-cmatch", "-cne", "-cnotcontains", "-cnotlike", "-cnotmatch", "-contains", "-creplace", "-csplit", "-eq", "-f", "-ge", "-gt", "-icontains", "-ieq", "-ige", "-igt", "-ile", "-ilike", "-ilt", "-imatch", "-ine", "-inotcontains", "-inotlike", "-inotmatch", "-ireplace", "-is", "-isnot", "-isplit", "-join", "-le", "-like", "-lt", "-match", "-ne", "-not", "-notcontains", "-notlike", "-notmatch", "-or", "-replace", "-split", "-xor" -like "-$_pat" } break; } # Tab complete against history either #<pattern> or #<id> '^#(\\w*)' { $_pattern = $matches[1] if ($_pattern -match '^[0-9]+$') { Get-History -ea SilentlyContinue -Id $_pattern | Foreach { $_.CommandLine } } else { $_pattern = '*' + $_pattern + '*' Get-History | Sort-Object -Descending Id| Foreach { $_.CommandLine } | where { $_ -like $_pattern } } break; } # try to find a matching command... default { $lastex = [regex]::Split($line, '[|;]')[-1] if ( $lastex -match '^\\s*(\\$\\w+(\\[[0-9,]+\\])*(\\.\\w+(\\[[0-9,]+\\])*)*)\\s*=\\s+(("\\w+"\\s*,\\s+)*)"\\w+"\\s*-as\\s+$' ) { if ( $Matches[6] -ne $nul ) { $brackets = "[]" } '['+ $global:_enum + $brackets + ']' break; } if ( $lastex -match '^\\s*(\\$\\w+(\\[[0-9,]+\\])*(\\.\\w+(\\[[0-9,]+\\])*)*)\\s*=\\s+(("\\w+"\\s*,\\s+)*)\\s*(\\w*)$' ) { $_pat = $Matches[7] + '*' $_type = @(iex $Matches[1])[0].GetType() if ( $_type.IsEnum ) { $global:_enum = $_type.FullName [Enum]::GetValues($_type) -like $_pat -replace '^(.*)$','"$1"' break; } } $lastex = [regex]::Split($line, '[|;=]')[-1] if ($lastex -match '[[$].*\\w+\\(.*-as\\s*$') { '['+ $global:_enum + ']' } elseif ( $lastex -match '([[$].*(\\w+))\\((.*)$' ) { $_method = $Matches[1] if ( $Matches[3] -match "(.*)((`"|')(\\w+,)+(\\w*))$" ) { $continuous = $true $_opt = $Matches[5] + '*' $_base = $Matches[2].TrimStart('"') -replace '(.*,)\\w+$','$1' $position = $Matches[1].Split(",").Length } else { $continuous = $false $_opt = ($Matches[3].Split(',')[-1] -replace '^\\s*','') + "*" $position = $Matches[3].Split(",").Length } if ( ($_mdefs = iex ($_method + ".OverloadDefinitions")) -eq $null ) { $tname, $mname = $_method.Split(":", "RemoveEmptyEntries" -as [System.StringSplitOptions]) $_mdefs = iex ($tname + '.GetMember("' + $mname + '") | % { $_.ToString() }') } foreach ( $def in $_mdefs ) { [void] ($def -match '\\((.*)\\)') foreach ( $param in [regex]::Split($Matches[1], ', ')[$position-1] ) { if ($param -eq $null -or $param -eq "") { continue; } $type = $param.split()[0] if ( $type -like '*`[*' -or $type -eq "Params" -or $type -eq "" ) { continue; } $fullname = @($_typenames -like "*$type*") foreach ( $name in $fullname ) { if ( $continuous -eq $true -and ( $name -as [System.Type] ).IsEnum ) { $output = [Enum]::GetValues($name) -like $_opt -replace '^(.*)$',($_base + '$1') $output | sort } elseif ( ( $name -as [System.Type] ).IsEnum ) { $global:_enum = $name $output = [Enum]::GetValues($name) -like $_opt -replace '^(.*)$','"$1"' $output | sort } } } } if ( $output -ne $null ) { break; } } if ( $line -match '(function|filter)\\s+(\\w*)$') { $_pat = 'function:\\' + $Matches[2] + '*' Get-ChildItem $_pat| % { $_.Name } break; } if ( $line[-1] -eq " " ) { $_cmdlet = $line.TrimEnd(" ").Split(" |(;={")[-1] $_cmdlet = @(Get-Command -type 'cmdlet,alias,function' $_cmdlet)[0] while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias,function' $_cmdlet.Definition)[0] } if ( "Set-ExecutionPolicy" -eq $_cmdlet.Name ) { "Unrestricted", "RemoteSigned", "AllSigned", "Restricted", "Default" | sort break; } if ( "Trace-Command","Get-TraceSource","Set-TraceSource" -contains $_cmdlet.Name ) { Get-TraceSource | % { $_.Name } | sort -Unique break; } if ( "New-Object" -eq $_cmdlet.Name ) { $_TypeAccelerators break; } if ( $_cmdlet.Noun -like "*WMI*" ) { $_WMIClasses break; } if ( "Get-Process" -eq $_cmdlet.Name ) { Get-Process | % { $_.Name } | sort break; } if ( "Add-PSSnapin", "Get-PSSnapin", "Remove-PSSnapin" -contains $_cmdlet.Name ) { if ( $global:_snapin -ne $null ) { $global:_snapin break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin break; } } if ( "Get-PSDrive", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name -and "Name" ) { Get-PSDrive | sort break; } if ( "Get-Eventlog" -eq $_cmdlet.Name ) { Get-EventLog -List | % { $_base + ($_.Log -replace '\\s','` ') } break; } if ( "Get-Help" -eq $_cmdlet.Name -or "help" -eq $_cmdlet.Name -or "man" -eq $_cmdlet.Name ) { Get-Help -Category all | % { $_.Name } | sort -Unique break; } if ( "Get-Service", "Restart-Service", "Resume-Service", "Start-Service", "Stop-Service", "Suspend-Service" ` -contains $_cmdlet.Name ) { Get-Service | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Get-Command" -eq $_cmdlet.Name ) { Get-Command -CommandType All | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Format-List", "Format-Custom", "Format-Table", "Format-Wide", "Compare-Object", "ConvertTo-Html", "Measure-Object", "Select-Object", "Group-Object", "Sort-Object" ` -contains $_cmdlet.Name ) { Get-PipeLineObject $_dummy | Get-Member -MemberType Properties,ParameterizedProperty | sort membertype | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Clear-Variable", "Get-Variable", "New-Variable", "Remove-Variable", "Set-Variable" -contains $_cmdlet.Name ) { Get-Variable -Scope Global | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Alias", "New-Alias", "Set-Alias" -contains $_cmdlet.Name ) { Get-Alias | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } } if ( $line[-1] -eq " " ) { $_cmdlet = [regex]::Split($line, '[|;=]')[-1] # Extract the trailing unclosed block e.g. ls | foreach { cp if ($_cmdlet -match '\\{([^\\{\\}]*)$') { $_cmdlet = $matches[1] } if ($_cmdlet -match '\\(([^()]*)$') { $_cmdlet = $matches[1] } $_cmdlet = $_cmdlet.Trim().Split()[0] $_cmdlet = @(Get-Command -type 'Application' $_cmdlet)[0] if ( $_cmdlet.Name -eq "powershell.exe" ) { "-PSConsoleFile", "-Version", "-NoLogo", "-NoExit", "-Sta", "-NoProfile", "-NonInteractive", "-InputFormat", "-OutputFormat", "-EncodedCommand", "-File", "-Command" | sort break; } if ( $_cmdlet.Name -eq "fsutil.exe" ) { "behavior query", "behavior set", "dirty query", "dirty set", "file findbysid", "file queryallocranges", "file setshortname", "file setvaliddata", "file setzerodata", "file createnew", "fsinfo drives", "fsinfo drivetype", "fsinfo volumeinfo", "fsinfo ntfsinfo", "fsinfo statistics", "hardlink create", "objectid query", "objectid set", "objectid delete", "objectid create", "quota disable", "quota track", "quota enforce", "quota violations", "quota modify", "quota query", "reparsepoint query", "reparsepoint delete", "sparse setflag", "sparse queryflag", "sparse queryrange", "sparse setrange", "usn createjournal", "usn deletejournal", "usn enumdata", "usn queryjournal", "usn readdata", "volume dismount", "volume diskfree" | sort break; } if ( $_cmdlet.Name -eq "net.exe" ) { "ACCOUNTS ", " COMPUTER ", " CONFIG ", " CONTINUE ", " FILE ", " GROUP ", " HELP ", "HELPMSG ", " LOCALGROUP ", " NAME ", " PAUSE ", " PRINT ", " SEND ", " SESSION ", "SHARE ", " START ", " STATISTICS ", " STOP ", " TIME ", " USE ", " USER ", " VIEW" | sort break; } if ( $_cmdlet.Name -eq "ipconfig.exe" ) { "/?", "/all", "/renew", "/release", "/flushdns", "/displaydns", "/registerdns", "/showclassid", "/setclassid" break; } } if ( $line -match '\\w+\\s+(\\w+(\\.|[^\\s\\.])*)$' ) { $_cmdlet = $line.TrimEnd(" ").Split(" |(;={")[-2] $_opt = $Matches[1].Split(" ,")[-1] + '*' $_base = $Matches[1].Substring(0,$Matches[1].Length-$Matches[1].Split(" ,")[-1].length) $_cmdlet = @(Get-Command -type 'cmdlet,alias,function' $_cmdlet)[0] while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias,function' $_cmdlet.Definition)[0] } if ( "Set-ExecutionPolicy" -eq $_cmdlet.Name ) { "Unrestricted", "RemoteSigned", "AllSigned", "Restricted", "Default" -like $_opt | sort break; } if ( "Trace-Command","Get-TraceSource","Set-TraceSource" -contains $_cmdlet.Name ) { Get-TraceSource -Name $_opt | % { $_.Name } | sort -Unique | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "New-Object" -eq $_cmdlet.Name ) { $_TypeAccelerators -like $_opt Write-ClassNames $_TypeNames_System ($_opt.Split(".").Count-1) Write-ClassNames $_TypeNames ($_opt.Split(".").Count-1) break; } if ( $_cmdlet.Name -like "*WMI*" ) { Write-ClassNames $_WMIClasses ($_opt.Split("_").Count-1) -sep '_' break; } if ( "Get-Process" -eq $_cmdlet.Name ) { Get-Process $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Add-PSSnapin", "Get-PSSnapin", "Remove-PSSnapin" -contains $_cmdlet.Name ) { if ( $global:_snapin -ne $null ) { $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } } if ( "Get-PSDrive", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name -and "Name" ) { Get-PSDrive -Name $_opt | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-PSProvider" -eq $_cmdlet.Name ) { Get-PSProvider -PSProvider $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Eventlog" -eq $_cmdlet.Name ) { Get-EventLog -List | ? { $_.Log -like $_opt } | % { $_base + ($_.Log -replace '\\s','` ') } break; } if ( "Get-Help" -eq $_cmdlet.Name -or "help" -eq $_cmdlet.Name -or "man" -eq $_cmdlet.Name ) { Get-Help -Category all -Name $_opt | % { $_.Name } | sort -Unique break; } if ( "Get-Service", "Restart-Service", "Resume-Service", "Start-Service", "Stop-Service", "Suspend-Service" ` -contains $_cmdlet.Name ) { Get-Service -Name $_opt | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Get-Command" -eq $_cmdlet.Name ) { Get-Command -CommandType All -Name $_opt | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Format-List", "Format-Custom", "Format-Table", "Format-Wide", "Compare-Object", "ConvertTo-Html", "Measure-Object", "Select-Object", "Group-Object", "Sort-Object" ` -contains $_cmdlet.Name ) { Get-PipeLineObject $_dummy | Get-Member -Name $_opt -MemberType Properties,ParameterizedProperty | sort membertype | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Clear-Variable", "Get-Variable", "New-Variable", "Remove-Variable", "Set-Variable" -contains $_cmdlet.Name ) { Get-Variable -Scope Global -Name $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Alias", "New-Alias", "Set-Alias" -contains $_cmdlet.Name ) { Get-Alias -Name $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } } if ( $line -match '(-(\\w+))\\s+([^-]*$)' ) { $_param = $matches[2] + '*' $_opt = $Matches[3].Split(" ,")[-1] + '*' $_base = $Matches[3].Substring(0,$Matches[3].Length-$Matches[3].Split(" ,")[-1].length) $_cmdlet = [regex]::Split($line, '[|;=]')[-1] # Extract the trailing unclosed block e.g. ls | foreach { cp if ($_cmdlet -match '\\{([^\\{\\}]*)$') { $_cmdlet = $matches[1] } # Extract the longest unclosed parenthetical expression... if ($_cmdlet -match '\\(([^()]*)$') { $_cmdlet = $matches[1] } $_cmdlet = $_cmdlet.Trim().Split()[0] $_cmdlet = @(Get-Command -type 'cmdlet,alias,ExternalScript,Filter,Function' $_cmdlet)[0] while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias,ExternalScript,Filter,Function' $_cmdlet.Definition)[0] } if ( $_param.TrimEnd("*") -eq "ea" -or $_param.TrimEnd("*") -eq "wa" ) { "SilentlyContinue", "Stop", "Continue", "Inquire" | ? { $_ -like $_opt } | sort -Unique break; } if ( "Format-List", "Format-Custom", "Format-Table", "Format-Wide" -contains $_cmdlet.Name ` -and "groupBy" -like $_param ) { Get-PipeLineObject $_dummy | Get-Member -Name $_opt -MemberType Properties,ParameterizedProperty | sort membertype | % { $_.Name } break; } if ( $_param.TrimEnd("*") -eq "ev" -or $_param.TrimEnd("*") -eq "ov" -or "ErrorVariable" -like $_param -or "OutVariable" -like $_param) { Get-Variable -Scope Global -Name $_opt | % { $_.Name } | sort break; } if ( "Tee-Object" -eq $_cmdlet.Name -and "Variable" -like $_param ) { Get-Variable -Scope Global -Name $_opt | % { $_.Name } | sort break; } if ( "Clear-Variable", "Get-Variable", "New-Variable", "Remove-Variable", "Set-Variable" -contains $_cmdlet.Name ` -and "Name" -like $_param) { Get-Variable -Scope Global -Name $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Export-Alias", "Get-Alias", "New-Alias", "Set-Alias" -contains $_cmdlet.Name ` -and "Name" -like $_param) { Get-Alias -Name $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Out-File","Export-CSV","Select-String","Export-Clixml" -contains $_cmdlet.Name ` -and "Encoding" -like $_param) { "Unicode", "UTF7", "UTF8", "ASCII", "UTF32", "BigEndianUnicode", "Default", "OEM" | ? { $_ -like $_opt } | sort -Unique break; } if ( "Trace-Command","Get-TraceSource","Set-TraceSource" -contains $_cmdlet.Name ` -and "Name" -like $_param) { Get-TraceSource -Name $_opt | % { $_.Name } | sort -Unique | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "New-Object" -like $_cmdlet.Name ) { if ( "ComObject" -like $_param ) { $_ProgID -like $_opt | % { $_ -replace '\\s','` ' } break; } if ( "TypeName" -like $_param ) { if ( $_opt -eq "*" ) { $_TypeAccelerators -like $_opt } else { $_TypeAccelerators -like $_opt Write-ClassNames $_TypeNames_System ($_opt.Split(".").Count-1) Write-ClassNames $_TypeNames ($_opt.Split(".").Count-1) } break; } } if ( "New-Item" -eq $_cmdlet.Name ) { if ( "ItemType" -like $_param ) { "directory", "file" -like $_opt break; } } if ( "Get-Location", "Get-PSDrive", "Get-PSProvider", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name ` -and "PSProvider" -like $_param ) { Get-PSProvider -PSProvider $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Location" -eq $_cmdlet.Name -and "PSDrive" -like $_param ) { Get-PSDrive -Name $_opt | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-PSDrive", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name -and "Name" -like $_param ) { Get-PSDrive -Name $_opt | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Command" -eq $_cmdlet.Name -and "PSSnapin" -like $_param) { if ( $global:_snapin -ne $null ) { $global:_snapin -like $_opt | % { $_base + $_ } break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } } if ( "Add-PSSnapin", "Get-PSSnapin", "Remove-PSSnapin" ` -contains $_cmdlet.Name -and "Name" -like $_param ) { if ( $global:_snapin -ne $null ) { $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin -like $_opt | % { $_base + $_ } break; } } if ( "Clear-Variable", "Export-Alias", "Get-Alias", "Get-PSDrive", "Get-Variable", "Import-Alias", "New-Alias", "New-PSDrive", "New-Variable", "Remove-Variable", "Set-Alias", "Set-Variable" ` -contains $_cmdlet.Name -and "Scope" -like $_param ) { "Global", "Local", "Script" -like $_opt break; } if ( "Get-Process", "Stop-Process", "Wait-Process" -contains $_cmdlet.Name -and "Name" -like $_param ) { Get-Process $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Eventlog" -eq $_cmdlet.Name -and "LogName" -like $_param ) { Get-EventLog -List | ? { $_.Log -like $_opt } | % { $_base + ($_.Log -replace '\\s','` ') } break; } if ( "Get-Help" -eq $_cmdlet.Name -or "help" -eq $_cmdlet.Name -or "man" -eq $_cmdlet.Name ) { if ( "Name" -like $_param ) { Get-Help -Category all -Name $_opt | % { $_.Name } | sort -Unique break; } if ( "Category" -like $_param ) { "Alias", "Cmdlet", "Provider", "General", "FAQ", "Glossary", "HelpFile", "All" -like $_opt | sort | % { $_base + $_ } break; } } if ( "Get-Service", "Restart-Service", "Resume-Service", "Start-Service", "Stop-Service", "Suspend-Service" ` -contains $_cmdlet.Name ) { if ( "Name" -like $_param ) { Get-Service -Name $_opt | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "DisplayName" -like $_param ) { Get-Service -Name $_opt | sort DisplayName | % { $_base + ($_.DisplayName -replace '\\s','` ') } break; } } if ( "New-Service" -eq $_cmdlet.Name -and "dependsOn" -like $_param ) { Get-Service -Name $_opt | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Get-EventLog" -eq $_cmdlet.Name -and "EntryType" -like $_param ) { "Error", "Information", "FailureAudit", "SuccessAudit", "Warning" -like $_opt | sort | % { $_base + $_ } break; } if ( "Get-Command" -eq $_cmdlet.Name -and "Name" -like $_param ) { Get-Command -CommandType All -Name $_opt | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( $_cmdlet.Noun -like "*WMI*" ) { if ( "Class" -like $_param ) { Write-ClassNames $_WMIClasses ($_opt.Split("_").Count-1) -sep '_' break; } } if ( "Format-List", "Format-Custom", "Format-Table", "Format-Wide", "Compare-Object", "ConvertTo-Html", "Measure-Object", "Select-Object", "Group-Object", "Sort-Object" ` -contains $_cmdlet.Name -and "Property" -like $_param ) { Get-PipeLineObject $_dummy | Get-Member -Name $_opt -MemberType Properties,ParameterizedProperty | sort membertype | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Select-Object" -eq $_cmdlet.Name ) { if ( "ExcludeProperty" -like $_param ) { Get-PipeLineObject $_dummy | Get-Member -Name $_opt -MemberType Properties,ParameterizedProperty | sort membertype | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "ExpandProperty" -like $_param ) { Get-PipeLineObject $_dummy | Get-Member -Name $_opt -MemberType Properties,ParameterizedProperty | sort membertype | % { $_.Name } break; } } if ( "ExternalScript", "Function", "Filter" -contains $_cmdlet.CommandType ) { if ( $_cmdlet.CommandType -eq "ExternalScript" ) { $_fsr = New-Object IO.StreamReader $_cmdlet.Definition $_def = "Function _Dummy { $($_fsr.ReadToEnd()) }" $_fsr.Close() iex $_def $_cmdlet = "_Dummy" } if ( ((gi "Function:$_cmdlet").Definition -replace '\\n').Split("{")[0] -match 'param\\((.*\\))\\s*[;\\.&a-zA-Z]*\\s*$' ) { $Matches[1].Split(',', "RemoveEmptyEntries" -as [System.StringSplitOptions]) -like "*$_param" | % { $_.Split("$ )`r`n", "RemoveEmptyEntries" -as [System.StringSplitOptions])[0] -replace '^\\[(.*)\\]$','$1' -as "System.Type" } | ? { $_.IsEnum } | % { [Enum]::GetNames($_) -like $_opt | sort } | % { $_base + $_ } } break; } select -InputObject $_cmdlet -ExpandProperty ParameterSets | select -ExpandProperty Parameters | ? { $_.Name -like $_param } | ? { $_.ParameterType.IsEnum } | % { [Enum]::GetNames($_.ParameterType) } | ? { $_ -like $_opt } | sort -Unique | % { $_base + $_ } } if ( $line[-1] -match "\\s" ) { break; } if ( $lastWord -ne $null -and $lastWord.IndexOfAny('/\\') -eq -1 ) { $command = $lastWord.Substring( ($lastWord -replace '([^\\|\\(;={]*)$').Length ) $_base = $lastWord.Substring( 0, ($lastWord -replace '([^\\|\\(;={]*)$').Length ) $pattern = $command + "*" "begin {", "break", "catch {", "continue", "data {", "do {", "else {", "elseif (", "end {", "exit", "filter ", "for (", "foreach ", "from", "function ", "if (", "in", "param (", "process {", "return", "switch ", "throw ", "trap ", "until (", "while (" ` -like $pattern | % { $_base + $_ } gcm -Name $pattern -CommandType All | % { $_base + $_.Name } | sort -Unique } } } } }
combined_dataset/train/non-malicious/Migrate UserFolder_3.ps1
Migrate UserFolder_3.ps1
param( $RootFolder = "\\\\server1\\users", $NewRootFolder = "\\\\server2\\users", $LogFolder = "C:\\Projects\\HomeDirs", $NewSubFolders = @("Documents","Favorites","Desktop","Links","Contacts"), $domain = "domain", [switch]$SetACL ) $UserFolders = gci -Path $RootFolder | ?{$_.PSIsContainer} $UserFolders | foreach-object -Process { #create new homedrive $NewUserFolder = $NewRootFolder + "\\" + $_.name New-Item -Path $NewUserFolder -ItemType "Directory" if ($SetACL){ #set ACL rules for new homedrive $acl = Get-Acl $NewUserFolder $Owner = New-Object System.Security.Principal.NTAccount($domain, $_.name) #$acl.SetOwner($Owner) #not possible with set-acl $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($Owner,"Modify", "ContainerInherit, ObjectInherit", "None", "Allow") $acl.SetAccessRule($rule) Set-Acl $NewUserFolder $acl } #create required subfolders per homedrive $NewSubFolders | foreach{New-Item -Path $($NewUserFolder + "\\" + $_) -type directory} #build robocopy job per homedrive $LogFile = $LogFolder + "\\" + $_.name + ".log" $JobName = $_.name + "_RCsync" $CommandString = "robocopy $($_.FullName) $($NewUserFolder + "\\Documents") /COPYALL /MIR /FFT /Z /Log+:$LogFile" start-job -Scriptblock {invoke-Expression $input} -name $JobName -InputObject $CommandString } #Wait for all jobs Get-Job | Wait-Job #Get all job results Get-Job | Receive-Job
combined_dataset/train/non-malicious/sample_66_25.ps1
sample_66_25.ps1
# # Module manifest for module 'OCI.PSModules.Marketplacepublisher' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplacepublisher.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '16f2e498-6e6b-4e22-8c36-b6c2677410c6' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Marketplacepublisher Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '88.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Marketplacepublisher.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Confirm-OCIMarketplacepublisherAndPublishArtifact', 'Enable-OCIMarketplacepublisherTermVersion', 'Get-OCIMarketplacepublisherArtifact', 'Get-OCIMarketplacepublisherArtifactsList', 'Get-OCIMarketplacepublisherAttachment', 'Get-OCIMarketplacepublisherAttachmentContent', 'Get-OCIMarketplacepublisherAttachmentsList', 'Get-OCIMarketplacepublisherCategoriesList', 'Get-OCIMarketplacepublisherCategory', 'Get-OCIMarketplacepublisherListing', 'Get-OCIMarketplacepublisherListingRevision', 'Get-OCIMarketplacepublisherListingRevisionAttachment', 'Get-OCIMarketplacepublisherListingRevisionAttachmentsList', 'Get-OCIMarketplacepublisherListingRevisionNote', 'Get-OCIMarketplacepublisherListingRevisionNotesList', 'Get-OCIMarketplacepublisherListingRevisionPackage', 'Get-OCIMarketplacepublisherListingRevisionPackagesList', 'Get-OCIMarketplacepublisherListingRevisionsList', 'Get-OCIMarketplacepublisherListingsList', 'Get-OCIMarketplacepublisherMarket', 'Get-OCIMarketplacepublisherMarketsList', 'Get-OCIMarketplacepublisherOffer', 'Get-OCIMarketplacepublisherOfferInternalDetail', 'Get-OCIMarketplacepublisherOffersList', 'Get-OCIMarketplacepublisherProduct', 'Get-OCIMarketplacepublisherProductsList', 'Get-OCIMarketplacepublisherPublisher', 'Get-OCIMarketplacepublisherPublishersList', 'Get-OCIMarketplacepublisherTerm', 'Get-OCIMarketplacepublisherTermsList', 'Get-OCIMarketplacepublisherTermVersion', 'Get-OCIMarketplacepublisherTermVersionsList', 'Get-OCIMarketplacepublisherWorkRequest', 'Get-OCIMarketplacepublisherWorkRequestErrorsList', 'Get-OCIMarketplacepublisherWorkRequestLogsList', 'Get-OCIMarketplacepublisherWorkRequestsList', 'Invoke-OCIMarketplacepublisherCascadingDeleteListing', 'Invoke-OCIMarketplacepublisherCascadingDeleteListingRevision', 'Invoke-OCIMarketplacepublisherCloneListingRevision', 'Invoke-OCIMarketplacepublisherMarkListingRevisionPackageAsDefault', 'Invoke-OCIMarketplacepublisherPublishListingRevision', 'Invoke-OCIMarketplacepublisherPublishListingRevisionAsPrivate', 'Invoke-OCIMarketplacepublisherPublishListingRevisionPackage', 'Invoke-OCIMarketplacepublisherSubmitListingRevisionForReview', 'Invoke-OCIMarketplacepublisherUnPublishListingRevisionPackage', 'Invoke-OCIMarketplacepublisherWithdrawListingRevision', 'Move-OCIMarketplacepublisherArtifactCompartment', 'Move-OCIMarketplacepublisherListingCompartment', 'Move-OCIMarketplacepublisherListingRevisionToNewStatus', 'Move-OCIMarketplacepublisherTermCompartment', 'New-OCIMarketplacepublisherArtifact', 'New-OCIMarketplacepublisherAttachment', 'New-OCIMarketplacepublisherListing', 'New-OCIMarketplacepublisherListingRevision', 'New-OCIMarketplacepublisherListingRevisionAttachment', 'New-OCIMarketplacepublisherListingRevisionNote', 'New-OCIMarketplacepublisherListingRevisionPackage', 'New-OCIMarketplacepublisherOffer', 'New-OCIMarketplacepublisherTerm', 'New-OCIMarketplacepublisherTermVersion', 'Remove-OCIMarketplacepublisherArtifact', 'Remove-OCIMarketplacepublisherAttachment', 'Remove-OCIMarketplacepublisherListing', 'Remove-OCIMarketplacepublisherListingRevision', 'Remove-OCIMarketplacepublisherListingRevisionAttachment', 'Remove-OCIMarketplacepublisherListingRevisionNote', 'Remove-OCIMarketplacepublisherListingRevisionPackage', 'Remove-OCIMarketplacepublisherOffer', 'Remove-OCIMarketplacepublisherTerm', 'Remove-OCIMarketplacepublisherTermVersion', 'Stop-OCIMarketplacepublisherWorkRequest', 'Update-OCIMarketplacepublisherArtifact', 'Update-OCIMarketplacepublisherListing', 'Update-OCIMarketplacepublisherListingRevision', 'Update-OCIMarketplacepublisherListingRevisionAttachment', 'Update-OCIMarketplacepublisherListingRevisionAttachmentContent', 'Update-OCIMarketplacepublisherListingRevisionIconContent', 'Update-OCIMarketplacepublisherListingRevisionPackage', 'Update-OCIMarketplacepublisherOffer', 'Update-OCIMarketplacepublisherTerm', 'Update-OCIMarketplacepublisherTermVersion', 'Update-OCIMarketplacepublisherTermVersionContent' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Marketplacepublisher' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/Invoke-SqlCmd_5.ps1
Invoke-SqlCmd_5.ps1
####################### <# .SYNOPSIS Runs a T-SQL script. .DESCRIPTION Runs a T-SQL script. Invoke-Sqlcmd2 only returns message output, such as the output of PRINT statements when -verbose parameter is specified .INPUTS None You cannot pipe objects to Invoke-Sqlcmd2 .OUTPUTS System.Data.DataTable .EXAMPLE Invoke-Sqlcmd2 -ServerInstance "MyComputer\\MyInstance" -Query "SELECT login_time AS 'StartTime' FROM sysprocesses WHERE spid = 1" This example connects to a named instance of the Database Engine on a computer and runs a basic T-SQL query. StartTime ----------- 2010-08-12 21:21:03.593 .EXAMPLE Invoke-Sqlcmd2 -ServerInstance "MyComputer\\MyInstance" -InputFile "C:\\MyFolder\\tsqlscript.sql" | Out-File -filePath "C:\\MyFolder\\tsqlscript.rpt" This example reads a file containing T-SQL statements, runs the file, and writes the output to another file. .EXAMPLE Invoke-Sqlcmd2 -ServerInstance "MyComputer\\MyInstance" -Query "PRINT 'hello world'" -Verbose This example uses the PowerShell -Verbose parameter to return the message output of the PRINT command. VERBOSE: hello world .NOTES Version History v1.0 - Chad Miller - Initial release v1.1 - Chad Miller - Fixed Issue with connection closing v1.2 - Chad Miller - Added inputfile, SQL auth support, connectiontimeout and output message handling. Updated help documentation v1.3 - Chad Miller - Added As parameter to control DataSet, DataTable or array of DataRow Output type #> function Invoke-Sqlcmd2 { [CmdletBinding()] param( [Parameter(Position=0, Mandatory=$true)] [string]$ServerInstance, [Parameter(Position=1, Mandatory=$false)] [string]$Database, [Parameter(Position=2, Mandatory=$false)] [string]$Query, [Parameter(Position=3, Mandatory=$false)] [string]$Username, [Parameter(Position=4, Mandatory=$false)] [string]$Password, [Parameter(Position=5, Mandatory=$false)] [Int32]$QueryTimeout=600, [Parameter(Position=6, Mandatory=$false)] [Int32]$ConnectionTimeout=15, [Parameter(Position=7, Mandatory=$false)] [ValidateScript({test-path $_})] [string]$InputFile, [Parameter(Position=8, Mandatory=$false)] [ValidateSet("DataSet", "DataTable", "DataRow")] [string]$As="DataRow" ) if ($InputFile) { $filePath = $(resolve-path $InputFile).path $Query = [System.IO.File]::ReadAllText("$filePath") } $conn=new-object System.Data.SqlClient.SQLConnection if ($Username) { $ConnectionString = "Server={0};Database={1};User ID={2};Password={3};Trusted_Connection=False;Connect Timeout={4}" -f $ServerInstance,$Database,$Username,$Password,$ConnectionTimeout } else { $ConnectionString = "Server={0};Database={1};Integrated Security=True;Connect Timeout={2}" -f $ServerInstance,$Database,$ConnectionTimeout } $conn.ConnectionString=$ConnectionString #Following EventHandler is used for PRINT and RAISERROR T-SQL statements. Executed when -Verbose parameter specified by caller if ($PSBoundParameters.Verbose) { $conn.FireInfoMessageEventOnUserErrors=$true $handler = [System.Data.SqlClient.SqlInfoMessageEventHandler] {Write-Verbose "$($_)"} $conn.add_InfoMessage($handler) } $conn.Open() $cmd=new-object system.Data.SqlClient.SqlCommand($Query,$conn) $cmd.CommandTimeout=$QueryTimeout $ds=New-Object system.Data.DataSet $da=New-Object system.Data.SqlClient.SqlDataAdapter($cmd) [void]$da.fill($ds) $conn.Close() switch ($As) { 'DataSet' { Write-Output ($ds) } 'DataTable' { Write-Output ($ds.Tables) } 'DataRow' { Write-Output ($ds.Tables[0]) } } } #Invoke-Sqlcmd2
combined_dataset/train/non-malicious/1336.ps1
1336.ps1
function Uninstall-CGroup { [CmdletBinding(SupportsShouldProcess=$true)] param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( -not (Test-CGroup -Name $Name) ) { return } $group = Get-CGroup -Name $Name if( -not $group ) { return } if( $PSCmdlet.ShouldProcess(('local group {0}' -f $Name), 'remove') ) { Write-Verbose -Message ('[{0}] -' -f $Name) $group.Delete() } }
combined_dataset/train/non-malicious/sample_21_66.ps1
sample_21_66.ps1
# # Script module for module 'Az.PolicyInsights' that is executed when 'Az.PolicyInsights' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 03/27/2024 07:43:38 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { if ((Get-PSDrive 'HKLM' -ErrorAction Ignore) -and (-not (Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -ErrorAction Stop | Get-ItemPropertyValue -ErrorAction Stop -Name Release | Where-Object { $_ -ge 461808 }))) { throw ".NET Framework versions lower than 4.7.2 are not supported in Az. Please upgrade to .NET Framework 4.7.2 or higher." } } catch [System.Management.Automation.DriveNotFoundException] { Write-Verbose ".NET Framework version check failed." } } function Preload-Assembly { param ( [string] $AssemblyDirectory ) if($PSEdition -eq 'Desktop' -and (Test-Path $AssemblyDirectory -ErrorAction Ignore)) { try { Get-ChildItem -ErrorAction Stop -Path $AssemblyDirectory -Filter "*.dll" | ForEach-Object { try { Add-Type -Path $_.FullName -ErrorAction Ignore | Out-Null } catch { Write-Verbose $_ } } } catch {} } } if ($true -and ($PSEdition -eq 'Desktop')) { if ($PSVersionTable.PSVersion -lt [Version]'5.1') { throw "PowerShell versions lower than 5.1 are not supported in Az. Please upgrade to PowerShell 5.1 or higher." } Test-DotNet } if ($true -and ($PSEdition -eq 'Core')) { if ($PSVersionTable.PSVersion -lt [Version]'6.2.4') { throw "Current Az version doesn't support PowerShell Core versions lower than 6.2.4. Please upgrade to PowerShell Core 6.2.4 or higher." } } if (Test-Path -Path "$PSScriptRoot\StartupScripts" -ErrorAction Ignore) { Get-ChildItem "$PSScriptRoot\StartupScripts" -ErrorAction Stop | ForEach-Object { . $_.FullName } } # [windows powershell] preload assemblies # [windows powershell] preload module alc assemblies $preloadPath = (Join-Path $PSScriptRoot -ChildPath "ModuleAlcAssemblies") Preload-Assembly -AssemblyDirectory $preloadPath if (Get-Module AzureRM.profile -ErrorAction Ignore) { Write-Warning ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") throw ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") } $module = Get-Module Az.Accounts if ($module -ne $null -and $module.Version -lt [System.Version]"2.17.0") { Write-Error "This module requires Az.Accounts version 2.17.0. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for troubleshooting information." -ErrorAction Stop } elseif ($module -eq $null) { Import-Module Az.Accounts -MinimumVersion 2.17.0 -Scope Global } Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azure.PowerShell.Cmdlets.PolicyInsights.dll) if (Test-Path -Path "$PSScriptRoot\PostImportScripts" -ErrorAction Ignore) { Get-ChildItem "$PSScriptRoot\PostImportScripts" -ErrorAction Stop | ForEach-Object { . $_.FullName } } $FilteredCommands = @() if ($Env:ACC_CLOUD -eq $null) { $FilteredCommands | ForEach-Object { $existingDefault = $false foreach ($key in $global:PSDefaultParameterValues.Keys) { if ($_ -like "$key") { $existingDefault = $true } } if (!$existingDefault) { $global:PSDefaultParameterValues.Add($_, { if ((Get-Command Get-AzContext -ErrorAction Ignore) -eq $null) { $context = Get-AzureRmContext } else { $context = Get-AzContext } if (($context -ne $null) -and $context.ExtendedProperties.ContainsKey("Default Resource Group")) { $context.ExtendedProperties["Default Resource Group"] } }) } } } # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB3YmTXyRH8ldm3 # q/9Sv0EBOH03nugQVE/LTajwZPJdnaCCDX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gTCldh # c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD # b3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw # MTACEzMAAAHuBdMCMLKanacAAQAAAe4wIgQgY0lojsZtb/GD8Iq+RD3Pf3gfXs9Q # 7X0UAcMDj/MdqnIwDQYJKoZIhvcNAQELBQAEggIAUZFcw2setH3ThUb/L5ChvqR/ # CIZ4GeRpxOB+6KyrjAmuoMLQjx7nC/tUiTLUqi2GTP367HVBig4e+DobV+2rxjKb # GHkN3RaRCvFLho5zc9hGIRF13rV7vL2KvsFKIwUyrCP4DNOxqLliVp/tZq+rDuDf # bnsktH+L/54S/fQ9Q2Xvyy35vT8HuX42a/UF67NdGTMzmEw4VrlY6E7xCtA35/b7 # nTmuIMsqWk2XAFzSY2O7by2dcr83Gde7icBWpzCdorcp61UuiYBijnK0J7tS4nVI # NMGJZZUDeiuEzj0cnoI4eXnClknYrMmQRlnt4V3SwnZ1Fa5uHfxaHJODmYI7aYR0 # fcI83FMOLVDymdA6wsCAPGTD5NPRp75YWaOfwSX30oiIEOYZ18dr/TpYIZ/DKZGA # 0U4Im/pZcQKm87KKX01ZTyanXzY0OglgUrxGML17Tec+dK3UKCplGGv7m/FTDqHv # rmC9fqnk2WChuOLgKn7EbiusQ6R5pJH2Kt4DsqXTAoNWKCNtNUkppYLWoD1q/Npk # 2niDPR1kUNcs5tywe9soFTVFnccjsUWDaEKJM1zXoSEsGihvz2nocYX9RyInb3Ga # U2k2ivVZo9nD3aZi067KEbrIakulBz1Nq/tzICnsWp8xdOaES01ek4Dpf6pY1ogM # loZSDu1EUrqpES04ypA= # SIG # End signature block
combined_dataset/train/non-malicious/sample_27_70.ps1
sample_27_70.ps1
# # Module manifest for module 'OCI.PSModules.Dataflow' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dataflow.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '60441277-1663-4d77-af11-39ab99c7ac41' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Dataflow Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '73.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Dataflow.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIDataflowApplication', 'Get-OCIDataflowApplicationsList', 'Get-OCIDataflowPool', 'Get-OCIDataflowPoolsList', 'Get-OCIDataflowPrivateEndpoint', 'Get-OCIDataflowPrivateEndpointsList', 'Get-OCIDataflowRun', 'Get-OCIDataflowRunLog', 'Get-OCIDataflowRunLogsList', 'Get-OCIDataflowRunsList', 'Get-OCIDataflowSqlEndpoint', 'Get-OCIDataflowSqlEndpointsList', 'Get-OCIDataflowStatement', 'Get-OCIDataflowStatementsList', 'Get-OCIDataflowWorkRequest', 'Get-OCIDataflowWorkRequestErrorsList', 'Get-OCIDataflowWorkRequestLogsList', 'Get-OCIDataflowWorkRequestsList', 'Move-OCIDataflowApplicationCompartment', 'Move-OCIDataflowPoolCompartment', 'Move-OCIDataflowPrivateEndpointCompartment', 'Move-OCIDataflowRunCompartment', 'Move-OCIDataflowSqlEndpointCompartment', 'New-OCIDataflowApplication', 'New-OCIDataflowPool', 'New-OCIDataflowPrivateEndpoint', 'New-OCIDataflowRun', 'New-OCIDataflowSqlEndpoint', 'New-OCIDataflowStatement', 'Remove-OCIDataflowApplication', 'Remove-OCIDataflowPool', 'Remove-OCIDataflowPrivateEndpoint', 'Remove-OCIDataflowRun', 'Remove-OCIDataflowSqlEndpoint', 'Remove-OCIDataflowStatement', 'Start-OCIDataflowPool', 'Stop-OCIDataflowPool', 'Update-OCIDataflowApplication', 'Update-OCIDataflowPool', 'Update-OCIDataflowPrivateEndpoint', 'Update-OCIDataflowRun', 'Update-OCIDataflowSqlEndpoint' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Dataflow' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/Export top n SQLPlans.ps1
Export top n SQLPlans.ps1
<# ALZDBA SQLServer_Export_SQLPlans_SMO.ps1 Export top n consuming sqlplans (avg_worker_time=cpu) for a given SQLServer (SQL2005+) Instance #> #requires -version 2 #SQLServer instance $SQLInstance = 'yourserver\\yourinstance' #What number of plans to export per db ? [int]$nTop = 50 trap { # Handle all errors not handled by try\\catch $err = $_.Exception write-verbose "Trapped error: $err.Message" while( $err.InnerException ) { $err = $err.InnerException write-host $err.Message -ForegroundColor Black -BackgroundColor Red }; # End the script. break } Clear-Host # databases of which we do not want sqlplans [string[]]$ExcludedDb = 'tempdb' , 'model' #recipient $AllDbSQLPlan = $null $SampleTime = Get-Date -Format 'yyyyMMdd_HHmm' #Load SQLServer SMO libraries [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null $serverInstance = New-Object ("Microsoft.SqlServer.Management.Smo.Server") $SQLInstance #Oh please put some application info in your connection metadata ! $serverInstance.ConnectionContext.ApplicationName = "DBA_Export_SQLPlans" $serverInstance.ConnectionContext.WorkstationId = $env:COMPUTERNAME # connecting should take less than 5 seconds ! $serverInstance.ConnectionContext.ConnectTimeout = 5 #connect before processing $serverInstance.ConnectionContext.Connect() $Query = '' if ( $serverInstance.VersionMajor -lt 9 ) { write-host $('{0} is of a Non-supported SQLServer version [{1}].' -f $SQLInstance, $serverInstance.VersionString) -ForegroundColor Black -BackgroundColor Red # End the script. break } elseif ( $serverInstance.VersionMajor -lt 10 ) { # SQL2005 $Query = $('WITH XMLNAMESPACES ( ''http://schemas.microsoft.com/sqlserver/2004/07/showplan'' AS PLN ) SELECT TOP ( {0} ) db_name() as Db_Name , Object_schema_name(qp.objectid ) as Schema , Object_name(qp.objectid ) AS [Object_Name] , ISNULL(qs.total_elapsed_time / qs.execution_count, 0) AS [Avg_Elapsed_Time] , qs.execution_count AS [Execution_Count] , qs.total_worker_time AS [Total_Worker_Time] , qs.total_worker_time / qs.execution_count AS [Avg_Worker_Time] , ISNULL(qs.execution_count / DATEDIFF(SS, qs.creation_time, GETDATE()), 0) AS [Calls_per_Second] , qs.max_logical_reads , qs.max_logical_writes , qp.query_plan.exist(''/PLN:ShowPlanXML//PLN:MissingIndex'') as Missing_Indexes , DATEDIFF( SS, qs.cached_time, getdate()) as Time_In_Cache_SS , row_number() over ( order by qs.total_elapsed_time / qs.execution_count DESC ) [Row_Number] , qp.query_plan FROM sys.dm_exec_query_stats AS qs WITH ( NOLOCK ) CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp WHERE qp.dbid = DB_ID() and qs.execution_count > 5 and Object_name(qp.objectid ) not like ''spc_DBA%'' and qs.total_worker_time / qs.execution_count > 50000 /* in microseconds */ ORDER BY Avg_Elapsed_Time DESC OPTION ( RECOMPILE ) ; ' -f $nTop ) } elseif ( $serverInstance.VersionMajor -eq 10 -and $serverInstance.VersionMinor -lt 50 ) { # SQL2008 $Query = $('WITH XMLNAMESPACES ( ''http://schemas.microsoft.com/sqlserver/2004/07/showplan'' AS PLN ) SELECT TOP ( {0} ) db_name() as Db_Name , Object_schema_name(qp.objectid ) as Schema , Object_name(qp.objectid ) AS [Object_Name] , ISNULL(qs.total_elapsed_time / qs.execution_count, 0) AS [Avg_Elapsed_Time] , qs.execution_count AS [Execution_Count] , qs.total_worker_time AS [Total_Worker_Time] , qs.total_worker_time / qs.execution_count AS [Avg_Worker_Time] , ISNULL(qs.execution_count / DATEDIFF(SS, qs.creation_time, GETDATE()), 0) AS [Calls_per_Second] , qs.max_logical_reads , qs.max_logical_writes , qp.query_plan.exist(''/PLN:ShowPlanXML//PLN:MissingIndex'') as Missing_Indexes , DATEDIFF( SS, qs.cached_time, getdate()) as Time_In_Cache_SS , row_number() over ( order by qs.total_elapsed_time / qs.execution_count DESC ) [Row_Number] , qp.query_plan FROM sys.dm_exec_query_stats AS qs WITH ( NOLOCK ) CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp WHERE qp.dbid = DB_ID() and qs.execution_count > 5 and Object_name(qp.objectid ) not like ''spc_DBA%'' and qs.total_worker_time / qs.execution_count > 50000 /* in microseconds */ ORDER BY Avg_Elapsed_Time DESC OPTION ( RECOMPILE ) ; ' -f $nTop ) } else { # SQL2008R2 and up $Query = $('WITH XMLNAMESPACES ( ''http://schemas.microsoft.com/sqlserver/2004/07/showplan'' AS PLN ) SELECT TOP ( {0} ) db_name() as Db_Name , Object_schema_name(p.object_id ) as [Schema] , p.name AS [Object_Name] , qs.total_elapsed_time / qs.execution_count AS [avg_elapsed_time] , qs.total_elapsed_time , qs.execution_count , cast(ISNULL(qs.execution_count * 1.00 / DATEDIFF(SS, qs.cached_time, GETDATE()), 0) as decimal(9,3)) AS [CallsPerSecond] , qs.total_worker_time / qs.execution_count AS [Avg_Worker_Time] , qs.total_worker_time AS [Total_Worker_Time] , qp.query_plan.exist(''/PLN:ShowPlanXML//PLN:MissingIndex'') as Missing_Indexes , qs.cached_time , DATEDIFF( SS, qs.cached_time, getdate()) as Time_In_Cache_SS , row_number() over ( order by qs.total_elapsed_time / qs.execution_count DESC ) [Row_Number] , qp.query_plan FROM sys.procedures AS p WITH ( NOLOCK ) INNER JOIN sys.dm_exec_procedure_stats AS qs WITH ( NOLOCK ) ON p.[object_id] = qs.[object_id] CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp WHERE qs.database_id = DB_ID() and qs.execution_count > 5 /* only non-ms sprocs */ and p.is_ms_shipped = 0 and p.name not like ''spc_DBA%'' and qs.total_worker_time / qs.execution_count > 50000 /* in microseconds */ ORDER BY avg_elapsed_time DESC OPTION ( RECOMPILE ) ;' -f $nTop ) } $i = 0 foreach($db in $serverInstance.Databases){ if ( $ExcludedDb -notcontains $db.Name ) { $i += 1 $pct = 100 * $i / $serverInstance.Databases.Count Write-progress -Status "Processing DBs - $($db.Name)" -Activity "Collection SQLPlans $SQLInstance" -PercentComplete $pct try { $DbSQLPlans = $db.ExecuteWithResults("$Query").Tables[0] if ( !( $AllDbSQLPlan )) { $AllDbSQLPlan = $DbSQLPlans.clone() } if ( $DbSQLPlans.rows.count -gt 0 ) { $AllDbSQLPlan += $DbSQLPlans } } catch { #just neglect this error Write-Verbose $_.Exception.Message } } else { Write-Verbose "Excluded Db $db.name" } } #Take control: do it yourself ! $serverInstance.ConnectionContext.Disconnect() if ( $AllDbSQLPlan -and $AllDbSQLPlan.Count -gt 0 ) { $TargetPath = "c:\\tempo\\Powershell" if ( !(Test-Path $TargetPath) ) { md $TargetPath | Out-Null } Write-progress -Status "Exporting Consumption Data" -Activity "Exporting SQLPlans $SQLInstance" -PercentComplete 15 $TargetFile = $('{0}-{1}_AllDbSQLPlan.csv' -f $SampleTime, $($SQLInstance -replace '\\\\', '_') ) $AllDbSQLPlan | Select Db_Name, Row_Number, Schema, Object_Name, avg_elapsed_time, total_elapsed_time, execution_count, Calls_Per_Second, Avg_Worker_Time, Total_Worker_Time, Missing_Indexes, cached_time, Time_In_Cache_SS | sort Db_Name, Row_Number | Export-Csv -Path $( Join-Path -Path $TargetPath -ChildPath $TargetFile ) -Delimiter ';' -NoTypeInformation $i = 0 foreach ( $p in $AllDbSQLPlan ) { $i += 1 $pct = 100 * $i / $AllDbSQLPlan.Count Write-progress -Status "Exporting SQLPlan - $($p.Object_Name)" -Activity "Exporting SQLPlans $SQLInstance" -PercentComplete $pct $TargetFileName = $('{0}-{1}-{2}-{3}-{4}-{5}.SQLPlan' -f $SampleTime, $($SQLInstance.Replace('\\','_')) , $p.Db_Name, $p.Row_Number, $p.Schema , $p.Object_Name ) Write-verbose $TargetFileName Out-File -FilePath $( Join-Path -Path $TargetPath -ChildPath $TargetFileName ) -InputObject $p.query_plan } #open explorer at target path Invoke-Item "$TargetPath" } else { Write-Host "No SQLPlans to be exported ! " -ForegroundColor Black -BackgroundColor Yellow }
combined_dataset/train/non-malicious/4388.ps1
4388.ps1
function Get-PSScriptInfoString { [CmdletBinding(PositionalBinding=$false)] Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Version, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [Guid] $Guid, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Author, [Parameter()] [String] $CompanyName, [Parameter()] [string] $Copyright, [Parameter()] [String[]] $ExternalModuleDependencies, [Parameter()] [string[]] $RequiredScripts, [Parameter()] [String[]] $ExternalScriptDependencies, [Parameter()] [string[]] $Tags, [Parameter()] [Uri] $ProjectUri, [Parameter()] [Uri] $LicenseUri, [Parameter()] [Uri] $IconUri, [Parameter()] [string[]] $ReleaseNotes, [Parameter()] [string] $PrivateData ) Process { $PSScriptInfoString = @" "@ return $PSScriptInfoString } }
combined_dataset/train/non-malicious/Split-Job Version 1.2.ps1
Split-Job Version 1.2.ps1
#requires -version 1.0 ################################################################################ ## Run commands in multiple concurrent pipelines ## by Arnoud Jansveld - www.jansveld.net/powershell ## ## Basic "drop in" usage examples: ## - Functions that accept pipelined input: ## Without Split-Job: ## Get-Content hosts.txt | MyFunction | Export-Csv results.csv ## With Split-Job: ## Get-Content hosts.txt | Split-Job {MyFunction} | Export-Csv results.csv ## - Functions that do not accept pipelined input (use foreach): ## Without Split-Job: ## Get-Content hosts.txt |% { .\\MyScript.ps1 -ComputerName $_ } | Export-Csv results.csv ## With Split-Job: ## Get-Content hosts.txt | Split-Job {%{ .\\MyScript.ps1 -ComputerName $_ }} | Export-Csv results.csv ## ## Example with an imported function: ## function Test-WebServer ($ComputerName) { ## $WebRequest = [System.Net.WebRequest]::Create("http://$ComputerName") ## $WebRequest.GetResponse() ## } ## Get-Content hosts.txt | Split-Job {%{Test-WebServer $_ }} -Function Test-WebServer | Export-Csv results.csv ## ## Version History ## 1.0 First version posted on poshcode.org ## Additional runspace error checking and cleanup ## 0.93 Improve error handling: errors originating in the Scriptblock now ## have more meaningful output ## Show additional info in the progress bar (thanks Stephen Mills) ## Add SnapIn parameter: imports (registered) PowerShell snapins ## Add Function parameter: imports functions ## Add SplitJobRunSpace variable; allows scripts to test if they are ## running in a runspace ## 0.92 Add UseProfile switch: imports the PS profile ## Add Variable parameter: imports variables ## Add Alias parameter: imports aliases ## Restart pipeline if it stops due to an error ## Set the current path in each runspace to that of the calling process ## 0.91 Revert to v 0.8 input syntax for the script block ## Add error handling for empty input queue ## 0.9 Add logic to distinguish between scriptblocks and cmdlets or scripts: ## if a ScriptBlock is specified, a foreach {} wrapper is added ## 0.8 Adds a progress bar ## 0.7 Stop adding runspaces if the queue is already empty ## 0.6 First version. Inspired by Gaurhoth's New-TaskPool script ################################################################################ function Split-Job { param ( $Scriptblock = $(throw 'You must specify a command or script block!'), [int]$MaxPipelines=10, [switch]$UseProfile, [string[]]$Variable, [string[]]$Function = @(), [string[]]$Alias = @(), [string[]]$SnapIn ) function Init ($InputQueue){ # Create the shared thread-safe queue and fill it with the input objects $Queue = [Collections.Queue]::Synchronized([Collections.Queue]@($InputQueue)) $QueueLength = $Queue.Count # Do not create more runspaces than input objects if ($MaxPipelines -gt $QueueLength) {$MaxPipelines = $QueueLength} # Create the script to be run by each runspace $Script = "Set-Location '$PWD'; " $Script += { $SplitJobQueue = $($Input) & { trap {continue} while ($SplitJobQueue.Count) {$SplitJobQueue.Dequeue()} } | }.ToString() + $Scriptblock # Create an array to keep track of the set of pipelines $Pipelines = New-Object System.Collections.ArrayList # Collect the functions and aliases to import $ImportItems = ($Function -replace '^','Function:') + ($Alias -replace '^','Alias:') | Get-Item | select PSPath, Definition $stopwatch = New-Object System.Diagnostics.Stopwatch $stopwatch.Start() } function Add-Pipeline { # This creates a new runspace and starts an asynchronous pipeline with our script. # It will automatically start processing objects from the shared queue. $Runspace = [System.Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace($Host) $Runspace.Open() if (!$?) {throw "Could not open runspace!"} $Runspace.SessionStateProxy.SetVariable('SplitJobRunSpace', $True) function CreatePipeline { param ($Data, $Scriptblock) $Pipeline = $Runspace.CreatePipeline($Scriptblock) if ($Data) { $Null = $Pipeline.Input.Write($Data, $True) $Pipeline.Input.Close() } $Null = $Pipeline.Invoke() $Pipeline.Dispose() } # Optionally import profile, variables, functions and aliases from the main runspace if ($UseProfile) { CreatePipeline -Script "`$PROFILE = '$PROFILE'; . `$PROFILE" } if ($Variable) { foreach ($var in (Get-Variable $Variable -Scope 2)) { trap {continue} $Runspace.SessionStateProxy.SetVariable($var.Name, $var.Value) } } if ($ImportItems) { CreatePipeline $ImportItems { foreach ($item in $Input) {New-Item -Path $item.PSPath -Value $item.Definition} } } if ($SnapIn) { CreatePipeline (Get-PSSnapin $Snapin -Registered) {$Input | Add-PSSnapin} } $Pipeline = $Runspace.CreatePipeline($Script) $Null = $Pipeline.Input.Write($Queue) $Pipeline.Input.Close() $Pipeline.InvokeAsync() $Null = $Pipelines.Add($Pipeline) } function Remove-Pipeline ($Pipeline) { # Remove a pipeline and runspace when it is done $Runspace = $Pipeline.RunSpace $Pipeline.Dispose() $Runspace.Close() $Runspace.Dispose() $Pipelines.Remove($Pipeline) } # Main # Initialize the queue from the pipeline . Init $Input # Start the pipelines while ($Pipelines.Count -lt $MaxPipelines -and $Queue.Count) {Add-Pipeline} # Loop through the runspaces and pass their output to the main pipeline while ($Pipelines.Count) { # Show progress if (($stopwatch.ElapsedMilliseconds - $LastUpdate) -gt 1000) { $Completed = $QueueLength - $Queue.Count - $Pipelines.count $LastUpdate = $stopwatch.ElapsedMilliseconds $SecondsRemaining = $(if ($Completed) { (($Queue.Count + $Pipelines.Count)*$LastUpdate/1000/$Completed) } else {-1}) Write-Progress 'Split-Job' ("Queues: $($Pipelines.Count) Total: $($QueueLength) " + "Completed: $Completed Pending: $($Queue.Count)") ` -PercentComplete ([Math]::Max((100 - [Int]($Queue.Count + $Pipelines.Count)/$QueueLength*100),0)) ` -CurrentOperation "Next item: $(trap {continue}; if ($Queue.Count) {$Queue.Peek()})" ` -SecondsRemaining $SecondsRemaining } foreach ($Pipeline in @($Pipelines)) { if ( -not $Pipeline.Output.EndOfPipeline -or -not $Pipeline.Error.EndOfPipeline ) { $Pipeline.Output.NonBlockingRead() $Pipeline.Error.NonBlockingRead() | Out-Default } else { # Pipeline has stopped; if there was an error show info and restart it if ($Pipeline.PipelineStateInfo.State -eq 'Failed') { $Pipeline.PipelineStateInfo.Reason.ErrorRecord | Add-Member NoteProperty writeErrorStream $True -PassThru | Out-Default # Restart the runspace if ($Queue.Count -lt $QueueLength) {Add-Pipeline} } Remove-Pipeline $Pipeline } } Start-Sleep -Milliseconds 100 } }
combined_dataset/train/non-malicious/sample_22_2.ps1
sample_22_2.ps1
Signature-Version: 1.0 Created-By: 11.0.13 (International Business Machines Corporation) SHA-256-Digest-Manifest: 24nsPJJAtZmjXuV3YV+9C4fT0KtdjWlYd05rYBNuiy0= SHA-256-Digest-Manifest-Main-Attributes: ZPM8w+YRl9N+FEbLmKnGqhF/Bco3/z+ BZ2gk0FSXfr8= Name: plugin.xml SHA-256-Digest: HS4k5kzk7m0pjUQJvLR9k++EVmv2eb/wuKf5xA87gew= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IOperandByOperan dList.class SHA-256-Digest: KVUYnId1YarqsjPnu7kv5CHu92S4TniXmZfuycmKdmI= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$BaseAction.class SHA-256-Digest: FgD7ThziyyXNAe5SttXVNoo3g8g8rvzt7jOTEQxQ2ts= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs$TermAction.class SHA-256-Digest: l/yAoN7tnBRwouQIQQuyzX85HNhGysqaruAwndtuoJs= Name: com/ibm/systemz/cobol/editor/core/copy/Activator.class SHA-256-Digest: Z3IcuRT/U7ksEy/wlGeKL8IlmzSaQrtT9dyDPq3clmE= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs$TermCheck.class SHA-256-Digest: dE0m6BvGduBigkaJiHF71vslmMfdHqFef3F+Go4doMA= Name: com/ibm/systemz/cobol/editor/core/copy/parser/messages.properties SHA-256-Digest: LJh7aNsXzmbWYp5t1Y2+Ysg1q8tbt9qnofSFGsgaDcg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PartialWord2.cla ss SHA-256-Digest: sFb2SzvDuQsoC8Rjhvv9dgDI30S5N5phydW9G56bfnI= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Subscript2.class SHA-256-Digest: 3EiB6sCNGQ8kEFwlT90gXfksX31GC0Oq0AjWiGpVggY= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Replacing1.class SHA-256-Digest: yw9edyRk4WMIMYiYQNqMLnBVyZjwYuKArKzkFy+TDXI= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParsers ym.class SHA-256-Digest: Ah4yCdiV8CIxQfRTcFxv8Myx4NfqjMuBebdYOSXIKO4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Keyword0.class SHA-256-Digest: 881fnqjW7T/wZa+6xcIHYEOej7IX0bJBf8cyg+bz9Sg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s$TermCheck.class SHA-256-Digest: M/j93hM+sO5LWdK8CpM8RiumQ4aoR/VNplits4cAwb0= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PlusOrMinus1.cla ss SHA-256-Digest: WH8LFb4aGz8R/lUDCTuUtLq52vbXBehH4lmZjPxKijs= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OfInLibraryName1 .class SHA-256-Digest: ifhbPlXdXG6DtC+ADnxBkosU6fu8SUjjXQgmszaWDrM= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Keyword3.class SHA-256-Digest: 0tIuejqx7GLAE0VY/K85IjHTY6X3JTklXcdMi6G/gA4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IOptionalLeading Trailing.class SHA-256-Digest: Jti5JHZ8Q842w2WdbgO0My4UrBapPT5q4RnL9WcxR70= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Dot.class SHA-256-Digest: puiGwLEkTR+8NNly8fYRXnRo8BNweM+UgPs6H6iTVtw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ASTNode.class SHA-256-Digest: z7BceqhBzG+o6nKkNCynkz7z+1ICIbvKPq6AJE4RzE4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$IsNullable.class SHA-256-Digest: uhbs2m5fJe6koaNvaOqIal4P5Mi4rsmJIxH1I3fgjVg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerIm pl.class SHA-256-Digest: 3nMdyzom9qg55T7fQOV97c7/yT4gfAF+MGdGhLlhPGk= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexPars er.class SHA-256-Digest: PbACZxwTAdqKNRbFeyk1Ic3ReIF8lMhMuf0UFpBcck8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyParserConstants. class SHA-256-Digest: q95YkDTpSzFFzb0FmNKB35GgNNublr4wy06vT/QIndc= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s$IsKeyword.class SHA-256-Digest: SjvKUPh2GcBIFvEdwRtWs5Aw5iH7cmIrqOPiKFjtOAI= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs.class SHA-256-Digest: BD83GhHailzfcdvPm4yHOH7b/d1ngDpxEiPtr242VRo= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementASTNode Locator$NodeVisitor.class SHA-256-Digest: N55UgCBQmxWsXkrdwc64CpylZRHWFF6CorMm3QeJ+Mo= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IEjectStatement. class SHA-256-Digest: BoXiffiMEdHPHt3bTM8NJdcEOe6LeVp3Ko0gyf3u1gE= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IPartialWordsLea dingTrailingClause.class SHA-256-Digest: dX3U83CP0KG3qUQA+Vz3Jt3NDiEYfSLHGGMyD06bzCg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IPlusOrMinus.cla ss SHA-256-Digest: Ms0WIp2H19VFcA8X2T1qnWdMypGOph08+A1ycGORYc8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IASTNodeToken.cl ass SHA-256-Digest: YYey1MF89tCLOn8rv41NOSzesnSs2tMIsU9gvoMuJH8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$BaseCheck.class SHA-256-Digest: tbMbp1VlYW8aPy9WaAJptLhAecmWEGltcGEklp03gJE= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ASTNodeToken.cla ss SHA-256-Digest: l9hmgWoVB1t9wu7ABhnJE8wmh0yGeJrcgVO3Grp44R8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s$ProsthesesIndex.class SHA-256-Digest: nDSpo9BIFwZhYvzrLEYzSsCnHsXGUAttXnuy8d6+5s0= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs$IsKeyword.class SHA-256-Digest: RxBUPaX3z0+W61toMBoE3xH8cwCBViWuEl8qikHSeTQ= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Literal1.class SHA-256-Digest: ImR3BoYw0ULDB1CbGnHjSDwKkD4zh4dryRzYkTN+v6Q= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/QualifiedDataNam e0.class SHA-256-Digest: uwY+Y5eR9ondAQC7RIuPNMNTK50PH+ltezgporcouG0= Name: com/ibm/systemz/cobol/editor/core/copy/parser/.jazzignore SHA-256-Digest: 72lW5EiWznB25wdUkMOOQGTMi+PItqkU5Hq80ygaZF4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexer.c lass SHA-256-Digest: gBUhzEgFS+VDtEKcjLrxhyMdAkdtj/MiJjXfL8P75EE= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IOfInLibraryName .class SHA-256-Digest: MSSp3OewAimVdD+fyITxPDYWfj6B1VJq2/Fx6WiamCQ= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Visitor.class SHA-256-Digest: MVQYusaOuTUMLW/J7qo9CJYuyf/bVYd4qdAMmUFyGd4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IReplaceStatemen t.class SHA-256-Digest: ODpUYV+17KIdD92mz9nUhG2yEr6wIf/NkpzHuxXaGCw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ILibraryName.cla ss SHA-256-Digest: 3RAYMZZcigRppO9v1ftf2640rZL/8FIbfJNcJFCftsI= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OfOrIn0.class SHA-256-Digest: fpJr3+VuOJePDfwEci+Z2JHmtdOa+jL2ll918CxO/14= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$TerminalIndex.class SHA-256-Digest: fpEWcNVaZSnTqDxsysyuY3NF/TX5WCuucmtzB+tjOJY= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IPartialWord2.cl ass SHA-256-Digest: vizwfZZX7oGMOk6Zk5zCLLoWVykjean/9Vdcipi9hNQ= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ReplaceStatement .class SHA-256-Digest: Ax9MS9+lZAXzI/+H8Red4KQk2btS1GzQPQS8oenj+JY= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$TermAction.class SHA-256-Digest: PDYJMb5JhOjmK/HuE/+G4ejhIGxMYvKnvun/AI6jhPA= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PartialWord1.cla ss SHA-256-Digest: M3gHBsPSmRHXDbFHYbR3FWG+WrnoNMQxhPgK3iMUg4E= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$Nasb.class SHA-256-Digest: p/PABhYOl42GrudpPd/aIRMmb2WWUwI/pvBLYvLH9SE= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$Name.class SHA-256-Digest: B2aDNWPUXLHoJqI/X09Oyj2XwwCmtJOItjQt5wLvipw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s$IsNullable.class SHA-256-Digest: Aa5lkMywhFTb2ksqWsE9G+5Lf2ZFLkPwTehR7WTg340= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PartialWordsLead ingTrailingClauseList.class SHA-256-Digest: XJ4lcgmR09pXVg55KeuQfVwlwDy89gtfJUCRdhT0jl0= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OperandByOperand List.class SHA-256-Digest: D0SnxwSQLWfESYPQNqUycTthRie/DOtUC+3160nPLSE= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Literal2.class SHA-256-Digest: 9xNhmSqq6LpK9P5TnzA33dYVyYQ2FYGhmPemZJZDMEw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OfOrIn1.class SHA-256-Digest: +Mu4TUu3rEQQTaVdOTPFmJ0pb+IJ0ldjkCLek8qHYeQ= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ILiteral.class SHA-256-Digest: i1zBxpQmhp5r5TUCSkJ3Dde+E12dVH5NhaPxjEKC720= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IOperand.class SHA-256-Digest: l6TGMKe63Aby1yauIN7r9QGaBmuDr3rXABsOpJMEKJc= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IKeyword.class SHA-256-Digest: CWDkITvm0HEi1d7eryuOnYYr3+R5i6oWN2ZZxJOlKr4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$Asb.class SHA-256-Digest: ZBqANad6S/kVwfM9UVvh44CQ8dEEDwILve0ieNxwFXc= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/AbstractASTNodeL ist.class SHA-256-Digest: SCFBnroN4Np8oboVzrIDXj1aUiM7PuEzNKtJXq+x4Aw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/QualifiedDataNam e1.class SHA-256-Digest: 0b9SBLhxWlqrZHavobGneaLgA01ozTMjUEBsfzVMRyM= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs$IsNullable.class SHA-256-Digest: uBP+6lkONvX3/oTuGczOP3N591Gzobo+M+p/pT9XX4w= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IIdentifier.clas s SHA-256-Digest: JAv6z06D8FGAt+eeiAFUZsePBBlEuQv7tTBRurwF+cc= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Keyword4.class SHA-256-Digest: 6nA1eT3HB2vICHkL6GOig5VcLy4EHSu/SPQm1P2zRF4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ICopyStatement.c lass SHA-256-Digest: 61OYcAOyzjBw0StV0CcAuZoF1oVhd8KcfGk92XuqnOE= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ISuppress.class SHA-256-Digest: o24SX9uTDg8R86R429xHJPKGV4wNrgZoZtL5pRt5sP0= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$NonterminalIndex.class SHA-256-Digest: ADYR4ntj7y+23Uc6pS5EflK3WgjkhepH5QiOZltMW2I= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerLp gLexStream.class SHA-256-Digest: 8z0UHIHBcWOs+ykt1UnXH6JrQMbHB9QAVgbdeWpGBGg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$ProsthesesIndex.class SHA-256-Digest: fXl5v6Ag9POrmK6G8cDOFTEONhCDYHvGvOynwycOkr4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s$BaseCheck.class SHA-256-Digest: kMF7yCHaGOQnkv4LqEPAcCA5caiF+Uu8RgopdmwH5wU= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IReplacing.class SHA-256-Digest: Lq5NOlNkKaobCZtU7r06UfueTQFVC01Rk/+JpfI+Z7E= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ISubscript.class SHA-256-Digest: KoJUmr7kSsDJhiHc5htnnxein71ItjkHFJu0Kf6XvXg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$TermCheck.class SHA-256-Digest: BbxA8GDEPsvYT89+uSkqYIpWLGAEEdag5/YVUN9Q7pk= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ITextNameLiteral .class SHA-256-Digest: 3MomQtHCQLFZfHsbGSJYRjdw6bZQp09tyB70dJ6MRvc= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Operand0.class SHA-256-Digest: gqvA7RmZl/bgOyPb7HjEEJ1/0e/WPPD+iXlWU+vThr0= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs$BaseCheck.class SHA-256-Digest: 3EA+18Sd52gjGViK+4ltmFHGXBjLQfJqZQHt4wOdmUs= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Keyword2.class SHA-256-Digest: 4K74u/cKCx4o2LGIvt2/DngODBzDLC+JNYHqBilBANg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/SkipStatement.cl ass SHA-256-Digest: yeOdfIdSCBok27OGjnX5N3pOVJz0bEKlxxs3TP3oXzQ= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s$TermAction.class SHA-256-Digest: kXB941sa9qayx1+ZJNgxc6vWapiCxOgCrE7HyTOOWbw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Replacing.class SHA-256-Digest: Je7jIXAjntAdI957xOOsIH5fdwJtI/nIBckYVkqkEHk= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexersy m.class SHA-256-Digest: 6TWtFq4RpaVSeJC0vKdeZluyM2ggnUu+HCkb1DMolNk= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Replacing0.class SHA-256-Digest: cDuIwl47bBrhSiMZE6xMc1K1vHQP9aJF8Ohfn9mSTIM= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParser. class SHA-256-Digest: 6yrw1jvbS1Sodh4Dv3ZlTx0isIP4jD5MYa5k/SPmHuY= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IOperandByOperan d.class SHA-256-Digest: 86Dzq/+nRFkVpdqdAsT/mxhJ6uArdfxbx4W9/eS1b+I= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PartialWordsLead ingTrailingClause0.class SHA-256-Digest: 8Ul6/A37otKBWwCYrCeSXGyOHLGW6gNoCdQ4BLEZcSc= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/SQLCopybook.clas s SHA-256-Digest: SXW3wT26g48iaRrF8am/k4/uSwh856zTTPrzmPzz0xw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Operand1.class SHA-256-Digest: 7qGM9ZAU8t89gDvjrlJLuWxgxwUwqAV+Dh5Gq9B7TEU= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementASTNode Locator.class SHA-256-Digest: ktpZPHwG7E8pRk/CItIoNH/nTNjiLEN5EjD0cXm/F9Y= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s$BaseAction.class SHA-256-Digest: cY0Nv47LFoix/h8FdWsjaTooZtNdZlY/aK5yxZinkTA= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/AbstractVisitor. class SHA-256-Digest: rSxZAgbpIhtBzjLixUQjpUhjp2BgCDqDshmO2w+Lx94= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Subscript0.class SHA-256-Digest: 2uzDiTKJMG0qvU0pV5dC/j1l5vad1yoAqbNNytdi3vs= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OptionalLeadingT railing1.class SHA-256-Digest: 1p9XqDme2OceUxd8euWS/KVdrsYmVnaRjPHDccTb4yI= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Keyword1.class SHA-256-Digest: yQrFiR1Nz/042Jq7HIn9Sx9YzVZiq7xsrm4UQ8oGeC4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ISkipStatement.c lass SHA-256-Digest: 10PwAnkBjh6qHIDBnKE5Gc0yMtDQD1LN/W7/l3q6P3g= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/EjectStatement.c lass SHA-256-Digest: zz0tZQl/DyDg3dIBkPbzcuV/WqExh0qb3PG8s1hGkyU= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Suppress.class SHA-256-Digest: GGzKZM++wx0KJ430l+O8olfMZWjfehWBMj1QZHgp3sc= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer sym.class SHA-256-Digest: gjU0XsqUgBpz5OQZU230wJFOQkI2VcnqWYim7iRnE4o= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs.class SHA-256-Digest: 7MfQKvuNAeOxbkUVWGs8iUrOyFCWMkIr5BKgntlIPkQ= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Copybook.class SHA-256-Digest: /NI1pEsupb0dCX4rHtJ7foXyyBb8Ifod1jxWdaGP6bo= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Literal0.class SHA-256-Digest: 7uhijXY71UC0oBZyKsBTEQW5JyXiPrbpbELvIN2cFb0= Name: META-INF/maven/zowe.commercial.zlanguage/com.ibm.systemz.cobol.edi tor.core.copy/pom.properties SHA-256-Digest: BvX1WQ4Nic8Gkup61pLkrr3zLKc8YrtMHyxk4y2W5ek= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IOfOrIn.class SHA-256-Digest: FPUQNX6lS6XsysVCDgb08QXtTzaeJCDD8jfhgAJ4ceU= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IPartialWord1.cl ass SHA-256-Digest: IvT25fqgR74w+5SC8Qk6KiDjdqK3Z82owE3pF77NqwA= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$IsKeyword.class SHA-256-Digest: 7XlqI64lNE+sp/eYUjBUTIAePG7uuwhE3wgLmsM3z5o= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyCobolParserMessa ges.class SHA-256-Digest: B2IZ2dYexNgZB7XzkhAhYuoKDoQBE0e2+Hsqixzb/+w= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$Nasr.class SHA-256-Digest: wN3iB9hM5lC9mcUxcGcboBE6oUiSKmuKbJLSG0zQvh8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs$BaseAction.class SHA-256-Digest: NShNfO3hfBsWMBym+zCQl00dKAkAnv2yqEYFCYlgRSM= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/CopyStatement.cl ass SHA-256-Digest: 5HMOdPR3okNpyP8v2fhqFcxQbceixCynNpfUhWln9ms= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IPartialWordsCla use.class SHA-256-Digest: 6zkCk12LwCO+TAkP2T/bpEjt/3rVmx2RXa1z15aWP58= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OfInLibraryName0 .class SHA-256-Digest: zdE0NmmKRbAeDM7oBx0avvfGZIT0RU87ZEgxYYXr3cY= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IQualifiedDataNa me.class SHA-256-Digest: elvUAWZ97E1EASOyIU3RO9IP8vtxvzgAbP8PMnnei3Y= Name: META-INF/maven/zowe.commercial.zlanguage/com.ibm.systemz.cobol.edi tor.core.copy/pom.xml SHA-256-Digest: dnSe9j8h4f2Kbo9KN4uHono8Z9aJlgq4THvTX8qhDBw= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Identifier.class SHA-256-Digest: uGeN3hjFGFLQdoVFAbAlyWFDuysltO+XBpUCGR1OZ9M= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementLexerpr s.class SHA-256-Digest: lL82h61amvO+M2yukRIJidRAc+NUKQWPTxjSMCHdAQ8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/IDot.class SHA-256-Digest: 0JfS+aSQVFRKWnMc4cPO+G8BxNK/xZDQcUJCk/in/Bs= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PlusOrMinus0.cla ss SHA-256-Digest: hdiXwUqb+t6iLA1iNNbCKCKirlA+9cHVw7mJ2qtsn2Y= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/ISQLTextNameLite ral.class SHA-256-Digest: 9/e961XaTTx+S9AP7XvkeC5Lf1WSAqBiRJBWvOK0bok= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer .class SHA-256-Digest: eirCW1L0UsR9BUVajh7IZwhiVXYZUPLuhVqVa8Dw76o= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Operand2.class SHA-256-Digest: 4eLYV+xUS10ib9xC3PCkAQ7U+xUZtCaqt9w+W+nYdWg= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OperandByOperand .class SHA-256-Digest: rGZIanKphsx5tqAHpRu01rFBGMbPuVhoYj7ST8SAM0M= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/OptionalLeadingT railing0.class SHA-256-Digest: wMt16j4z8p//gZYf5UK0XJCNmtViiXSNr2TEtY/tFc4= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PartialWordsLead ingTrailingClause1.class SHA-256-Digest: 7jpwUzdhNQGJ9GtiXEEqPNHZ6btbO+dzWXJnoPnveU0= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/Subscript1.class SHA-256-Digest: lteQ5gLmU23E9KqqCvzPvMM6JolahhMHPx6nR9RxQc8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementKWLexer prs$ProsthesesIndex.class SHA-256-Digest: NQgtqf8qLTj7iPhcyaiPpDqra2cYsrcU/bpmIG6n5ZQ= Name: com/ibm/systemz/cobol/editor/core/copy/parser/Ast/PartialWordsClau se.class SHA-256-Digest: H0ZRU4ID+5paOMUZv90nNxKaN8ZTGUcHj4G+x0swrA8= Name: com/ibm/systemz/cobol/editor/core/copy/parser/CopyStatementParserp rs$Asr.class SHA-256-Digest: vYfEhk8fR8G+81f6exXa92thvors05Bw1WBEKLzbUSI=
combined_dataset/train/non-malicious/1067.ps1
1067.ps1
function Start-TestFixture { & (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve) } function Test-ShouldGetCanonicalCaseForDirectory { $currentDir = (Resolve-Path '.').Path foreach( $badPath in ($currentDir.ToUpper(),$currentDir.ToLower()) ) { $canonicalCase = Resolve-PathCase -Path $badPath Assert-True ($currentDir -ceq $canonicalCase) ('{0} != {1}' -f $currentDir,$canonicalCase) } } function Test-ShouldGetCanonicalCaseForFile { $currentFile = Join-Path $TestDir 'Test-ResolvePathCase.ps1' -Resolve $canonicalCase = Resolve-PathCase -Path ($currentFile.ToUpper()) Assert-True ($currentFile -ceq $canonicalCase) ('{0} != {1}' -f $currentFile,$canonicalCase) } function Test-ShouldNotGetCaseForFileThatDoesNotExist { $error.Clear() $result = Resolve-PathCase 'C:\I\Do\Not\Exist' -ErrorAction SilentlyContinue Assert-False $result Assert-Equal 1 $error.Count } function Test-ShouldAcceptPipelineInput { $gotSomething = $false Get-ChildItem 'C:\WINDOWS' | ForEach-Object { Assert-True ($_.FullName.StartsWith( 'C:\WINDOWS' ) ) $_ } | Resolve-PathCase | ForEach-Object { $gotSomething = $true Assert-True ( $_.StartsWith( 'C:\Windows' ) ) ('{0} doesn''t start with C:\Windows' -f $_) } Assert-True $gotSomething } function Test-ShouldGetRelativePath { Push-Location -Path $PSScriptRoot try { $path = '..\..\Carbon\Import-Carbon.ps1' $canonicalCase = Resolve-PathCase ($path.ToUpper()) Assert-Equal (Resolve-Path -Path $path).Path $canonicalCase -CaseSensitive } finally { Pop-Location } } function Test-ShouldGetPathToShare { $tempDir = New-TempDirectory -Prefix $PSCommandPath $shareName = Split-Path -Leaf -Path $tempDir try { Install-FileShare -Name $shareName -Path $tempDir.FullName -ReadAccess 'Everyone' try { $path = '\\{0}\{1}' -f $env:COMPUTERNAME,$shareName $canonicalCase = Resolve-PathCase ($path.ToUpper()) -ErrorAction SilentlyContinue Assert-Error -Last -Regex 'UNC .* not supported' Assert-Null $canonicalCase } finally { Uninstall-FileShare -Name $shareName } } finally { Remove-Item -Path $tempDir -Recurse -Force } }
combined_dataset/train/non-malicious/2053.ps1
2053.ps1
Describe "Tests for paths of submodules in module manifest" -tags "CI" { $moduleName = 'ModuleA' $moduleFileName = "$moduleName.psd1" $submoduleName = 'ModuleB' $submoduleFileName = "$submoduleName.psm1" $moduleRootPath = Join-Path $TestDrive $moduleName $moduleFilePath = Join-Path $moduleRootPath $moduleFileName $nestedModulePath = Join-Path $moduleRootPath $submoduleName $nestedModuleFilePath = Join-Path $nestedModulePath $submoduleFileName BeforeEach { Remove-Module $moduleName -Force -ErrorAction SilentlyContinue Remove-Item $moduleRootPath -Recurse -Force -ErrorAction SilentlyContinue New-Item -ItemType Directory -Force -Path $nestedModulePath "function TestModuleFunction{'Hello from TestModuleFunction'}" | Out-File $nestedModuleFilePath } $testCases = @( @{ SubModulePath = "$submoduleName" } @{ SubModulePath = "$submoduleName\$submoduleName" } @{ SubModulePath = "$submoduleName/$submoduleName" } @{ SubModulePath = "$submoduleName\$submoduleFileName" } @{ SubModulePath = "$submoduleName/$submoduleFileName" } @{ SubModulePath = ".\$submoduleName" } @{ SubModulePath = ".\$submoduleName\$submoduleName" } @{ SubModulePath = ".\$submoduleName/$submoduleName" } @{ SubModulePath = ".\$submoduleName\$submoduleFileName" } @{ SubModulePath = ".\$submoduleName/$submoduleFileName" } @{ SubModulePath = "./$submoduleName" } @{ SubModulePath = "./$submoduleName/$submoduleName" } @{ SubModulePath = "./$submoduleName\$submoduleName" } @{ SubModulePath = "./$submoduleName/$submoduleFileName" } @{ SubModulePath = "./$submoduleName\$submoduleFileName" } ) It "Test if NestedModule path is <SubModulePath>" -TestCases $testCases { param($SubModulePath) New-ModuleManifest $moduleFilePath -NestedModules @($SubModulePath) Import-Module $moduleFilePath (Get-Module $moduleName).ExportedCommands.Keys.Contains('TestModuleFunction') | Should -BeTrue } It "Test if RootModule path is <SubModulePath>" -TestCases $testCases { param($SubModulePath) New-ModuleManifest $moduleFilePath -RootModule $SubModulePath Import-Module $moduleFilePath (Get-Module $moduleName).ExportedCommands.Keys.Contains('TestModuleFunction') | Should -BeTrue } }
combined_dataset/train/non-malicious/737.ps1
737.ps1
function Get-RsItemReference { param ( [Alias('ItemPath')] [Parameter(Mandatory = $True, ValueFromPipeline = $true)] [string[]] $Path, [string] $ReportServerUri, [Alias('ReportServerCredentials')] [System.Management.Automation.PSCredential] $Credential, $Proxy ) Begin { $Proxy = New-RsWebServiceProxyHelper -BoundParameters $PSBoundParameters } Process { foreach ($Item in $Path) { $itemType = $Proxy.GetItemType($Item) switch ($itemType) { "Report" { return ($Proxy.GetItemReferences($Item, "DataSet") + $Proxy.GetItemReferences($Item, "DataSource")) | Add-Member -Name "ItemType" -Value $itemType -MemberType NoteProperty -PassThru } "DataSet" { return $Proxy.GetItemReferences($Item, "DataSource") | Add-Member -Name "ItemType" -Value $itemType -MemberType NoteProperty -PassThru } "Unknown" { throw "Cannot find item with path $Item" } default { throw "ItemType '$itemType' is not supported by this method." } } } } } New-Alias -Name "Get-RsItemReferences" -Value Get-RsItemReference -Scope Global
combined_dataset/train/non-malicious/sample_26_62.ps1
sample_26_62.ps1
param([int]$Count=50, [int]$DelayMilliseconds=200) function Write-Item($itemCount) { $i = 1 while ($i -le $itemCount) { $str = "Output $i" Write-Output $str # In the gutter on the left, right click and select "Add Conditional Breakpoint" # on the next line. Use the condition: $i -eq 25 $i = $i + 1 # Slow down execution a bit so user can test the "Pause debugger" feature. Start-Sleep -Milliseconds $DelayMilliseconds } } # Do-Work will be underlined in green if you haven't disable script analysis. # Hover over the function name below to see the PSScriptAnalyzer warning that "Do-Work" # doesn't use an approved verb. function Do-Work($workCount) { Write-Output "Doing work..." Write-Item $workcount Write-Host "Done!" } Do-Work $Count # SIG # Begin signature block # MIIr5wYJKoZIhvcNAQcCoIIr2DCCK9QCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCmPxPw4GEjt7RE # 9WjigrPYFWNHkCPAcENwArTB4+eceaCCEW4wggh+MIIHZqADAgECAhM2AAAB33OB # lxa+Mv0NAAIAAAHfMA0GCSqGSIb3DQEBCwUAMEExEzARBgoJkiaJk/IsZAEZFgNH # QkwxEzARBgoJkiaJk/IsZAEZFgNBTUUxFTATBgNVBAMTDEFNRSBDUyBDQSAwMTAe # Fw0yNDAxMjAwMTMzNDRaFw0yNTAxMTkwMTMzNDRaMCQxIjAgBgNVBAMTGU1pY3Jv # c29mdCBBenVyZSBDb2RlIFNpZ24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK # AoIBAQDVucAmkbIWpspYysyydQyyRh2L8q5igYFcy2vDk8xGvVMRBhxwbOsJIEd0 # wY8N7WU/xgkYMnSsM4vmc2B49DGdrAjSJqbsx0zf+DLFjrBITUecdRhl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b2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAC # EzMAAAHt4V/L1felXXMAAQAAAe0wIgQgdGoqzWxBTvwHvsTIxYqr5oiVCTGJOeKF # nbWbhY8yNTgwDQYJKoZIhvcNAQELBQAEggIAm6WeFxFaDJug9949w9unnOOnEcTA # 427iwL7CCOZLKHQqTaHzCsXRr0+Ohi8s818DkLdW6IZERF5CLfO7XTVZqf/eVbbX # AU5Ly+ba9BOw4DwHhqD8L9I0iAgP5x8cl5bAe3gBlDiMcIu1XpK9eqPmNDh7Uaee # tVJJMykI6Xvv/mCRE42E8GV0VpT/A+sHXzC5YjtjuXIziHz17P/IiFr6yyU5ecgw # MJYOodgDyRhrrgPDHx3AOXlb3RYZjhhpRYE1XlFaN2NDKITVqXpG1zmI1lWbOLmw # wQCxWnRnhp6GwzSN20rWkC/SmliGee1VeNBp4BvzpEKMO9V/eo6b+fpsBfuaLYwF # 3BPsxtH4cgnjfGJGUaGGRDfYNJssZ/u8f+n0df4yxeGKdJnSiJkoKbepTxblCrUG # 08WGWkFEpIeBoPiPvw31JpHPWDUIfr++sCs7lghI8d6ZEdgL/279mD5tRnEvPtuA # B53yJImCv3ZNJO5KSZjpXZn4EA4Gf/bGLjsy9sMPMz+bD/Zm4fdHIakl6OIyDD4i # nRlpwQz0qRm6Q0bTcql7br1GBDI2kLj29mgSVTTzsFGzODkTr+r79ScUrI5UQqx+ # n/KRCFirFUxokoEHn8TL5ROiOF3TTPNtawPeHOCEud8rK7GLRjw42ko/FEToT6uc # zD/vadEsA2xuoU4= # SIG # End signature block
combined_dataset/train/non-malicious/3772.ps1
3772.ps1
function Test-GetReservationOrder { $type = "Microsoft.Capacity/reservationOrders" $reservationOrderId = "704aee8c-c906-47c7-bd22-781841fb48b5" $reservation = Get-AzReservationOrder -ReservationOrderId $reservationOrderId Assert-NotNull $reservation Assert-True { $reservation.Etag -gt 0 } $expectedId = "/providers/microsoft.capacity/reservationOrders/" + $reservationOrderId Assert-AreEqual $expectedId $reservation.Id Assert-AreEqual $reservationOrderId $reservation.Name Assert-AreEqual $type $reservation.Type } function Test-ListReservationOrders { $type = "Microsoft.Capacity/reservationOrders" $reservationList = Get-AzReservationOrder Assert-NotNull $reservationList Foreach ($reservation in $reservationList) { Assert-NotNull $reservation Assert-True { $reservation.Etag -gt 0 } Assert-NotNull $reservation.Name $expectedId = "/providers/microsoft.capacity/reservationOrders/" + $reservation.Name Assert-AreEqual $expectedId $reservation.Id Assert-AreEqual $type $reservation.Type } }
combined_dataset/train/non-malicious/sample_55_16.ps1
sample_55_16.ps1
# # Module manifest for module 'OCI.PSModules.Apmcontrolplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmcontrolplane.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '2656b809-7098-428e-b605-696525730fec' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Apmcontrolplane Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '85.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Apmcontrolplane.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIApmcontrolplaneApmDomain', 'Get-OCIApmcontrolplaneApmDomainsList', 'Get-OCIApmcontrolplaneApmDomainWorkRequestsList', 'Get-OCIApmcontrolplaneDataKeysList', 'Get-OCIApmcontrolplaneWorkRequest', 'Get-OCIApmcontrolplaneWorkRequestErrorsList', 'Get-OCIApmcontrolplaneWorkRequestLogsList', 'Get-OCIApmcontrolplaneWorkRequestsList', 'Move-OCIApmcontrolplaneApmDomainCompartment', 'New-OCIApmcontrolplaneApmDomain', 'New-OCIApmcontrolplaneDataKeys', 'Remove-OCIApmcontrolplaneApmDomain', 'Remove-OCIApmcontrolplaneDataKeys', 'Update-OCIApmcontrolplaneApmDomain' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Apmcontrolplane' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/Get Twitter RSS Feed_8.ps1
Get Twitter RSS Feed_8.ps1
param ([String] $ScreenName) $client = New-Object System.Net.WebClient $idUrl = "https://api.twitter.com/1/users/show.json?screen_name=$ScreenName" $data = $client.DownloadString($idUrl) $start = 0 $findStr = '"id":' do { $start = $data.IndexOf($findStr, $start + 1) if ($start -gt 0) { $start += $findStr.Length $end = $data.IndexOf(',', $start) $userId = $data.SubString($start, $end-$start) } } while ($start -le $data.Length -and $start -gt 0) $feed = "http://twitter.com/statuses/user_timeline/$userId.rss" $feed
combined_dataset/train/non-malicious/3332.ps1
3332.ps1
function Remove-GroupUser { [PoshBot.BotCommand( Permissions = 'manage-groups' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [string]$Group, [parameter(Mandatory, Position = 1)] [string]$User ) if ($g = $Bot.RoleManager.GetGroup($Group)) { if ($userId = $Bot.RoleManager.ResolveUsernameToId($User)) { try { $bot.RoleManager.RemoveUserFromGroup($userId, $Group) New-PoshBotCardResponse -Type Normal -Text "User [$User] removed from group [$Group]." -ThumbnailUrl $thumb.success } catch { New-PoshBotCardResponse -Type Error -Text "Failed to remove [$User] from group [$Group]" -ThumbnailUrl $thumb.error } } else { New-PoshBotCardResponse -Type Warning -Text "User [$User] not found :(" -Title 'Rut row' -ThumbnailUrl $thumb.rutrow } } else { New-PoshBotCardResponse -Type Warning -Text "Group [$Group] not found :(" -Title 'Rut row' -ThumbnailUrl $thumb.rutrow } }
combined_dataset/train/non-malicious/sample_57_30.ps1
sample_57_30.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> # Import Observability EventSource $observabilityNugetPath = "$PSScriptRoot\..\.." Add-Type -Path "$observabilityNugetPath\lib\net472\Microsoft.AzureStack.Observability.ObservabilityDeployment.dll" $nodeName = $env:ComputerName # Census event scheduled task with retries. function Set-CensusTaskWithRetry { $retryAttempt = 0 $retrySleepTimeInSeconds = 10 $Retries = 5 $success = $false while(-not($success) -and ($retryAttempt -lt $Retries)) { $retryAttempt = $retryAttempt + 1 try { Write-InfoLog "Trying to setup census events scheduled task. Attempt $retryAttempt of $Retries" Set-CensusEventTask $success = $true } catch { if ($retryAttempt -lt $Retries) { $exceptionMessage = $_.Exception.Message Write-ErrorLog "Failure during census events scheduled task setup: '$exceptionMessage'. Retrying." } else { # All retries failed. return $_ } Start-Sleep -Seconds $retrySleepTimeInSeconds } } return $true } # Registration events one-time task with retries. function Set-RegistrationEventsTaskWithRetry { $retryAttempt = 0 $retrySleepTimeInSeconds = 10 $Retries = 5 $success = $false while(-not($success) -and ($retryAttempt -lt $Retries)) { $retryAttempt = $retryAttempt + 1 try { Write-InfoLog "Trying to setup registration events one-time task. Attempt $retryAttempt of $Retries" Set-RegistrationEventTask $success = $true } catch { if ($retryAttempt -lt $Retries) { $exceptionMessage = $_.Exception.Message Write-ErrorLog "Failure during registration events one-time task setup: '$exceptionMessage'. Retrying." } else { # All retries failed. return $_ } Start-Sleep -Seconds $retrySleepTimeInSeconds } } return $true } # Create the census events scheduled task. function Set-CensusEventTask { $observabilityNugetPath = "$PSScriptRoot\..\.." $censusObservabilityPath = "$observabilityNugetPath\content\Powershell\ObservabilityCensus.ps1" # Create the scheduled task to generate census events using HCI CensusDiagnosticProvider. $taskName = "ObservabilityCensus" if(Test-ScheduledTaskExists -TaskName $taskName) { Write-InfoLog "Existing task found. Cleaning up task $taskName." Unregister-ScheduledTask -TaskName $taskName -Confirm:$false | Out-Null } Write-InfoLog "Creating new scheduled task $taskName." $frequency = New-TimeSpan -Hours 24 $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount $trigger = New-ScheduledTaskTrigger -Once -RepetitionInterval $frequency -At (Get-Date).AddMinutes(60) -RepetitionDuration (([DateTime]::Now).AddYears(10) - [DateTime]::Now) $action = New-ScheduledTaskAction ` -Execute "powershell.exe" ` -Argument "-Command $censusObservabilityPath" $settings = New-ScheduledTaskSettingsSet $task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings -Principal $principal Register-ScheduledTask -TaskName $taskName -TaskPath "Microsoft\AzureStack\Observability" -InputObject $task Write-InfoLog "Creating new scheduled task $taskName succeeded." } # Create the registration events one-time task. function Set-RegistrationEventTask { $observabilityNugetPath = "$PSScriptRoot\..\.." $registrationObservabilityPath = "$observabilityNugetPath\content\Powershell\ObservabilityCensusRegistration.ps1" # Create the one-time task to gather registration events using HCI CensusDiagnosticProvider. $taskName = "ObservabilityRegistrationCensus" if(Test-ScheduledTaskExists -TaskName $taskName) { Unregister-ScheduledTask -TaskName $taskName -Confirm:$false | Out-Null } Write-InfoLog "Creating new scheduled task $taskName." $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(60) $action = New-ScheduledTaskAction ` -Execute "powershell.exe" ` -Argument "-Command $registrationObservabilityPath" $settings = New-ScheduledTaskSettingsSet $task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings -Principal $principal Register-ScheduledTask -TaskName $taskName -TaskPath "Microsoft\AzureStack\Observability" -InputObject $task Write-InfoLog "Creating new scheduled task $taskName succeeded." } # Returns true if a given task exists and false otherwise. function Test-ScheduledTaskExists { param( [string] [Parameter(Mandatory=$true)] $TaskName ) try { if(Get-ScheduledTask -TaskName $TaskName -ErrorAction Stop) { return $true } } catch {} return $false } # Write census event. function Write-CensusEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing census event for node: $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteCensusEvent($eventString) } # Write registration event. function Write-RegistrationEvent { param( [string] [Parameter(Mandatory=$true)] $EventName, [string] [Parameter(Mandatory=$true)] $Message ) Write-InfoLog "Writing $EventName event for node: $NodeName" switch($EventName) { "ClusterRegistrationStart" {[Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteClusterRegistrationStart($Message); break} "ArcRegistrationStart" {[Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteArcRegistrationStart($Message); break} "ArcRegistrationEnd" {[Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteArcRegistrationEnd($Message); break} "ClusterRegistrationEnd" {[Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteClusterRegistrationEnd($Message); break} "ClusterRegistrationParameters" {[Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteClusterRegistrationParameters($Message); break} "ClusterRegistrationFailure" {[Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteClusterRegistrationFailure($Message); break} } } function Write-ClusterPropertiesEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing census event for node: $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteClusterPropertiesEvent($eventString) } function Write-InstalledWin32ProgramListEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing InstalledWin32ProgramList event for node $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteInstalledWin32ProgramListEvent($eventString) } function Write-PhysicalDiskListEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing physical disk list for node: $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WritePhysicalDiskListEvent($eventString) } function Write-VirtualDiskListEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing VirtualDiskList event for node: $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteVirtualDiskListEvent($eventString) } function Write-StoragePoolListEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing StoragePoolList event for node: $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteStoragePoolListEvent($eventString) } function Write-StorageTierListEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing StorageTierList event for node: $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteStorageTierListEvent($eventString) } function Write-StorageSubSystemListEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing StorageSubSystemList event for node: $NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteStorageSubSystemListEvent($eventString) } function Write-DisasterRecoveryEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing DisasterRecovery event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteDisasterRecoveryEvent($eventString) } function Write-SddcVolumeSummaryEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing SddcVolumeSummary event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteSddcVolumeSummaryEvent($eventString) } function Write-VMCensusEvent { param( [string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing VMCensus event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteVMCensusEvent($eventString) } function Write-StorageAdapterListEvent { param([string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing StorageAdapterList event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteStorageAdapterListEvent($eventString); } function Write-DiskDriveListEvent { param([string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing DiskDriveList event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteDiskDriveListEvent($eventString); } function Write-GPUPnPDeviceListEvent { param([string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing GPUPnPDeviceList event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteGPUPnPDeviceListEvent($eventString); } function Write-GenericPnPDeviceListEvent { param([string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing GenericPnPDeviceList event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteGenericPnPDeviceListEvent($eventString); } function Write-ProductFeaturesEvent { Write-InfoLog "Writing ProductFeatures event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteProductFeaturesEvent($eventString); } function Write-TPMCensusEvent { param([string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing TPMCensus event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteTPMCensusEvent($eventString); } function Write-CPUMicrocodeVersionEvent { param([string] [Parameter(Mandatory=$true)] $eventString ) Write-InfoLog "Writing CPUMicrocodeVersion event for node :$NodeName" [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteCPUMicrocodeVersionEvent($eventString); } function Write-InfoLog { param( [string] [Parameter(Mandatory=$true)] $Message ) [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteInformational($Message) } function Write-ErrorLog { param( [string] [Parameter(Mandatory=$true)] $Message ) [Microsoft.AzureStack.Observability.CensusEventSource]::Instance.WriteError($Message) } function Get-PnPDeviceListPayload { param( [string] [Parameter(Mandatory=$true)] $Class ) $result = @() $devices = Get-PnpDevice -Class $Class ForEach ($device in $devices) { $driver = Get-CimInstance -ClassName Win32_SystemDriver -Filter "Name like '$($device.Service)'" $result += [pscustomobject] @{ Name = $device.Name ClassGuid = $device.ClassGuid DeviceID = $device.DeviceID PNPClass = $device.PNPClass Present = $device.Present Service = $device.Service Manufacturer = $device.Manufacturer Problem = $device.Problem ProblemDescription = $device.ProblemDescription DriverName = (Get-Item -LiteralPath $driver.PathName).Name DriverDate = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverDate).Data DriverVersion = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverVersion).Data DriverDesc = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverDesc).Data MatchingDeviceId = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_MatchingDeviceId).Data DriverRank = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverRank).Data DriverProvider = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverProvider).Data } } return $result | ConvertTo-Json } function Get-DiskDrivePnPDeviceListPayload { $diskDrives = @() $devices = Get-PnpDevice -Class "DiskDrive" ForEach ($device in $devices) { $diskDrives += [pscustomobject] @{ Name = $device.Name DeviceID = $device.DeviceID PNPClass = $device.PNPClass Present = $device.Present Service = $device.Service Manufacturer = $device.Manufacturer MatchingDeviceId = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_MatchingDeviceId).Data DeviceParent = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_Parent).Data } } return $diskDrives | ConvertTo-Json } function Get-GPUPnPDeviceListPayload { $result = @() $devices = Get-PnpDevice -Class "Display" $gpupPartitionCount = @{} $gpuWithDDA = New-Object System.Collections.Generic.HashSet[string] $vms = Get-VM ForEach ($vm in $vms) { # GPUP $vmGpuPartitionAdapters = $vm | Get-VMGpuPartitionAdapter ForEach ($vmGpuPartitionAdapter in $vmGpuPartitionAdapters) { # If the VM does not have an instance path, the VM is not GPUP enabled if ([string]::IsNullOrEmpty($vmGpuPartitionAdapter.InstancePath)) { continue } $gpuInstanceIdModified = [regex]::Replace($vmGpuPartitionAdapter.InstancePath, "[^a-zA-Z0-9]", "") if ($gpupPartitionCount.Contains($gpuInstanceIdModified)) { $gpupPartitionCount[$gpuInstanceIdModified] += 1 } else { $gpupPartitionCount[$gpuInstanceIdModified] = 0 } } # GPU-DDA $vmAssignableDevices = $vm | Get-VMAssignableDevice ForEach ($device in $vmAssignableDevices) { $gpuInstanceIdModified = $device.InstanceId -split "\\" | Select-Object -Last 1 $gpuWithDDA.Add($gpuInstanceIdModified) } } # Create the payload ForEach ($device in $devices) { $driver = Get-CimInstance -ClassName Win32_SystemDriver -Filter "Name like '$($device.Service)'" $videoController = Get-CimInstance -ClassName Win32_VideoController -Filter "PNPDeviceID like '$($device.DeviceID.Replace('\', '\\'))'" $deviceId = [regex]::Replace($device.DeviceID, "[^a-zA-Z0-9]", "") $partitionCount = 0 ForEach ($gpupEntry in $gpupPartitionCount.Keys) { if ($gpupEntry -like ($deviceId + '*')) { $partitionCount = $gpupPartitionCount[$gpupEntry] break } } $gpuDDAEnabled = $false ForEach ($entry in $gpuWithDDA) { $gpuDDAEnabled = $device.DeviceID.Contains($entry) } $result += [pscustomobject] @{ Name = $device.Name TotalMemory = $videoController.AdapterRAM GPUPEnabled = $partitionCount -gt 0 GPUPPartitions = $partitionCount GPUDDAEnabled = $gpuDDAEnabled ClassGuid = $device.ClassGuid DeviceID = $device.DeviceID PNPClass = $device.PNPClass Present = $device.Present Service = $device.Service Manufacturer = $device.Manufacturer Problem = $device.Problem ProblemDescription = $device.ProblemDescription DriverName = (Get-Item -LiteralPath $driver.PathName).Name DriverDate = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverDate).Data DriverVersion = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverVersion).Data DriverDesc = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverDesc).Data MatchingDeviceId = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_MatchingDeviceId).Data DriverRank = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverRank).Data DriverProvider = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_DriverProvider).Data } } return $result | ConvertTo-Json } function Get-GenericPnPDeviceListPayload { $result = @() $pnpDevices = Get-PnpDevice ForEach ($device in $pnpDevices) { $result += [pscustomobject] @{ Name = $device.Name DeviceID = $device.DeviceID Class = $device.Class Present = $device.Present Service = $device.Service Manufacturer = $device.Manufacturer DeviceParent = ($device | Get-PnpDeviceProperty -KeyName DEVPKEY_Device_Parent).Data } } return $result | ConvertTo-Json } function Get-ProductFeaturesPayload { $result = @{ InstalledFeatures = @() } $enabledEnum = 1 $productFeatures = Get-WmiObject -Class Win32_OptionalFeature | Where-Object { $_.InstallState -eq $enabledEnum} foreach ($feature in $productFeatures) { $result.InstalledFeatures += $feature.Name } return $result | ConvertTo-Json } function Get-TPMCensusPayload { $tpm = Get-Tpm $result = [pscustomobject] @{ TpmPresent = $tpm.TpmPresent TpmReady = $tpm.TpmReady TpmEnabled = $tpm.TpmEnabled TpmActivated = $tpm.Activated TpmOwned = $tpm.TpmOwned RestartPending = $tpm.RestartPending ManufacturerId = $tpm.ManufacturerId ManufacturerIdTxt = $tpm.ManufacturerIdTxt ManufacturerVersion = $tpm.ManufacturerVersion ManufacturerVersionFull20 = $tpm.ManufacturerVersionFull20 OwnerClearDisabled = $tpm.OwnerClearDisabled AutoProvisioning = $tpm.AutoProvisioning LockedOut = $tpm.LockedOut LockoutHealTime = $tpm.LockoutHealTime LockoutCount = $tpm.LockoutCount LockoutMax = $tpm.LockoutMax } return $result | ConvertTo-Json } function Get-CPUMicrocodeVersionPayload { $cpuMicrocodeVersion = Get-ItemProperty ("HKLM:\HARDWARE\DESCRIPTION\System\CentralProcessor\0") | Select-Object "Update Revision", "Previous Update Revision" $result = [pscustomobject] @{ UpdateRevision = $cpuMicrocodeVersion.'Update Revision' PreviousUpdateRevision = $cpuMicrocodeVersion.'PreviousUpdateRevision' } return $result | ConvertTo-Json } Export-ModuleMember -Function Set-CensusTaskWithRetry Export-ModuleMember -Function Set-RegistrationEventsTaskWithRetry Export-ModuleMember -Function Write-CensusEvent Export-ModuleMember -Function Write-RegistrationEvent Export-ModuleMember -Function Write-ClusterPropertiesEvent Export-ModuleMember -Function Write-InstalledWin32ProgramListEvent Export-ModuleMember -Function Write-PhysicalDiskListEvent Export-ModuleMember -Function Write-VirtualDiskListEvent Export-ModuleMember -Function Write-StoragePoolListEvent Export-ModuleMember -Function Write-StorageTierListEvent Export-ModuleMember -Function Write-StorageSubSystemListEvent Export-ModuleMember -Function Write-DisasterRecoveryEvent Export-ModuleMember -Function Write-SddcVolumeSummaryEvent Export-ModuleMember -Function Write-VMCensusEvent Export-ModuleMember -Function Get-PnPDeviceListPayload Export-ModuleMember -Function Write-StorageAdapterListEvent Export-ModuleMember -Function Get-DiskDrivePnPDeviceListPayload Export-ModuleMember -Function Write-DiskDriveListEvent Export-ModuleMember -Function Get-GPUPnPDeviceListPayload Export-ModuleMember -Function Write-GPUPnPDeviceListEvent Export-ModuleMember -Function Get-GenericPnPDeviceListPayload Export-ModuleMember -Function Write-GenericPnPDeviceListEvent Export-ModuleMember -Function Get-ProductFeaturesPayload Export-ModuleMember -Function Write-ProductFeaturesEvent Export-ModuleMember -Function Get-TPMCensusPayload Export-ModuleMember -Function Write-TPMCensusEvent Export-ModuleMember -Function Get-CPUMicrocodeVersionPayload Export-ModuleMember -Function Write-CPUMicrocodeVersionEvent Export-ModuleMember -Function Write-ErrorLog Export-ModuleMember -Function Write-InfoLog # SIG # Begin signature block # MIIoKQYJKoZIhvcNAQcCoIIoGjCCKBYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDEF5Hv34Ca/e4b # k+VmQUwJzKeFuPV3JdtKwfo7bz4X6qCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb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SYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAx # MAITMwAAAe3hX8vV96VdcwABAAAB7TAiBCBUOBDHA7PYgKlrCICmQQq8BVN5m64z # qFPgCuLfD8GIkTANBgkqhkiG9w0BAQsFAASCAgAEd1LV9eDbNzc/7kMUgXb32YfQ # Wn7RSInOTn93qkidiyxHInR5BekoUC0sL4VK+xj5Z6zUjHUn/Zw5NFJvRu83tn3M # smwnouq0AOP04RD7GyliFiOfbAyJXtbN2KWD5Z3gzFWqLcQx3QBJRsUCpAGls3mZ # KXS4jHt0Feisalj2Cd8Z4wiEmkkhInL8CwbW7YLCivYpv6ebEqsbxxAd6OOhuoXd # P2s0/EbZy0s2mvKbHK8f3WqdMugV9foDyLWHkXNX3qPhJ+jJwRh8RNyVvOQ5gOSX # b1znnhkfyBlb0C5TUVBvH/dP7m3yERlIrPeEejaAxnZNZ+9i1Y7A0BZFDtKVMxrE # uNHhm5yw5+0YHUEgJMMkY9EXq5TgqU0DFZXysV7Nt8vDYxJ8bd+k3dalwhDJVJv/ # o5BXkpQ2nxFNKLDZNGp/Kjqj75Hz6wFaJJQAzjHOuYz4pFPwlZeG+4iipyzRTRLJ # a1KEwTk59B+yIGf3yjWAjCi7P1fHZFBnQtSr3L7h/3EbZ0U4KBNR1qa6AXRU2VVl # gNVXsqlbCgcmCnHsd1bvn09iddPDoreJq90XIMTO3IgXPAhVxMq/24ZOSGgVp2b+ # zDYl3DfaOAithX4Xc5jdSxEhBEihPiPaYaq+4vFkutR/qkG+WlIuCHD9jNnHlnW4 # IeLskKSK5AV2tjOqog== # SIG # End signature block
combined_dataset/train/non-malicious/2460.ps1
2460.ps1
function ConvertTo-CleanScript { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$Path, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string[]]$ToRemove = '' ) begin { $ErrorActionPreference = 'Stop' } process { try { $Ast = [System.Management.Automation.Language.Parser]::ParseFile($Path, [ref]$null, [ref]$null) } catch { Write-Error $_.Exception.Message } } }
combined_dataset/train/non-malicious/296.ps1
296.ps1
function Get-PSFUserChoice { [OutputType([System.Int32])] [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [object[]] $Options, [string] $Caption, [string] $Message, [int] $DefaultChoice = 0 ) begin { Write-PSFMessage -Level InternalComment -Message "Bound parameters: $($PSBoundParameters.Keys -join ", ")" -Tag 'debug', 'start', 'param' $choices = @() foreach ($option in $Options) { if ($option -is [hashtable]) { $label = $option.Keys -match '^l' | Select-Object -First 1 [string]$labelValue = $option[$label] $help = $option.Keys -match '^h' | Select-Object -First 1 [string]$helpValue = $option[$help] } else { $labelValue = "$option" $helpValue = "$option" } if ($labelValue -match "&") { $choices += New-Object System.Management.Automation.Host.ChoiceDescription -ArgumentList $labelValue, $helpValue } else { $choices += New-Object System.Management.Automation.Host.ChoiceDescription -ArgumentList "&$($labelValue.Trim())", $helpValue } } } process { if ($Options.Count -eq 1) { return 0 } $Host.UI.PromptForChoice($Caption, $Message, $choices, $DefaultChoice) } }
combined_dataset/train/non-malicious/1938.ps1
1938.ps1
Describe "Measure-Command" -Tags "CI" { Context "Validate return types for Measure-Command" { It "Should return TimeSpan as the return type" { Measure-Command { Get-Date } | Should -BeOfType timespan } } Context "Validate that it is executing commands correctly" { It "Should return TimeSpan after executing a script" { Measure-Command { Write-Output hi } | Should -BeOfType timespan } It "Should return TimeSpan after executing a cmdlet" { $pesterscript = Join-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath assets) -ChildPath echoscript.ps1 $testfile = $pesterscript $testcommand = "Write-Output pestertestscript" $testcommand | Add-Content -Path $testfile Measure-Command { $pesterscript } | Should -BeOfType timespan Remove-Item $testfile } } }
combined_dataset/train/non-malicious/FTP upload_1.ps1
FTP upload_1.ps1
$File = "D:\\Dev\\somefilename.zip" $ftp = "ftp://username:password@example.com/pub/incoming/somefilename.zip" "ftp url: $ftp" $webclient = New-Object System.Net.WebClient $uri = New-Object System.Uri($ftp) "Uploading $File..." $webclient.UploadFile($uri, $File)
combined_dataset/train/non-malicious/4474.ps1
4474.ps1
$script:dscResourceFriendlyName = 'PSModule' $script:dcsResourceName = "MSFT_$($script:dscResourceFriendlyName)" $configurationFile = Join-Path -Path $PSScriptRoot -ChildPath "$($script:dcsResourceName).config.ps1" . $configurationFile Describe "$($script:dcsResourceName)_Integration" { $configurationName = "$($script:dcsResourceName)_SetPackageSourceAsNotTrusted_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } } $configurationName = "$($script:dcsResourceName)_InstallWithTrusted_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Present' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module1_Name $resourceCurrentState.InstallationPolicy | Should -Be 'Untrusted' } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_UninstallModule1_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Absent' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module1_Name } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_SetPackageSourceAsTrusted_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } } $configurationName = "$($script:dcsResourceName)_DefaultParameters_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Present' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module1_Name } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_UsingAllowClobber_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Present' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module2_Name } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_UninstallModule2_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Absent' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module2_Name } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_RequiredVersion_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Present' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module2_Name $resourceCurrentState.InstalledVersion | Should -Be $ConfigurationData.AllNodes.Module2_RequiredVersion } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_VersionRange_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Present' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module2_Name $resourceCurrentState.InstalledVersion | Should -Be $ConfigurationData.AllNodes.Module2_RequiredVersion } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_UninstallModule2_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Absent' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module2_Name } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } $configurationName = "$($script:dcsResourceName)_VersionRange_Config" Context ('When using configuration {0}' -f $configurationName) { It 'Should compile and apply the MOF without throwing' { { $configurationParameters = @{ OutputPath = $TestDrive ConfigurationData = $ConfigurationData } & $configurationName @configurationParameters $startDscConfigurationParameters = @{ Path = $TestDrive ComputerName = 'localhost' Wait = $true Verbose = $true Force = $true ErrorAction = 'Stop' } Start-DscConfiguration @startDscConfigurationParameters } | Should -Not -Throw } It 'Should be able to call Get-DscConfiguration without throwing' { { $script:currentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw } It 'Should have set the resource and all the parameters should match' { $resourceCurrentState = $script:currentConfiguration | Where-Object -FilterScript { $_.ConfigurationName -eq $configurationName ` -and $_.ResourceId -eq "[$($script:dscResourceFriendlyName)]Integration_Test" } $resourceCurrentState.Ensure | Should -Be 'Present' $resourceCurrentState.Name | Should -Be $ConfigurationData.AllNodes.Module2_Name $resourceCurrentState.InstalledVersion | Should -Be $ConfigurationData.AllNodes.Module2_MaximumVersion } It 'Should return $true when Test-DscConfiguration is run' { Test-DscConfiguration -Verbose | Should -Be $true } } }
combined_dataset/train/non-malicious/Get-DNSZoneRecords.ps1
Get-DNSZoneRecords.ps1
#========================================================================== # # NAME: Get-DNSZoneRecords.ps1 # AUTHOR: Saehrig, Steven (trac3r726) # DATE : 10/17/2008 # @@Requires PSHX-Sapien to be loaded for the Read-inputbox cmdlet. # @@Requires Powershell CTP 2 # # COMMENT: # Just comment out the variable and enter the info you need for # computername, dnszonename, and remove the credential portion if not needed. # Otherwise on Execution you will be prompted for credentials and IP. #========================================================================== $cred = Get-Credential $computer = read-inputbox "Enter Server ip" $zonename = Get-WmiObject Win32_computersystem -computerName $computer -credential $cred $dnszonename = $zonename.domain get-wmiobject -namespace "root\\microsoftdns" -class microsoftdns_atype -computername $computer -credential $cred -filter "containername='$dnszonename'" | ft dnsservername, ownername, recorddata, ttl
combined_dataset/train/non-malicious/sample_13_55.ps1
sample_13_55.ps1
# # Module manifest for module 'OCI.PSModules.Identity' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identity.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '79636fb4-f5fc-4bf8-b817-bcca97c97ff4' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Identity Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '74.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Identity.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Add-OCIIdentityTagDefaultLock', 'Add-OCIIdentityTagNamespaceLock', 'Add-OCIIdentityUserToGroup', 'Enable-OCIIdentityDomain', 'Enable-OCIIdentityMfaTotpDevice', 'Enable-OCIIdentityReplicationToRegion', 'Get-OCIIdentityAllowedDomainLicenseTypesList', 'Get-OCIIdentityApiKeysList', 'Get-OCIIdentityAuthenticationPolicy', 'Get-OCIIdentityAuthTokensList', 'Get-OCIIdentityAvailabilityDomainsList', 'Get-OCIIdentityBulkActionResourceTypesList', 'Get-OCIIdentityBulkEditTagsResourceTypesList', 'Get-OCIIdentityCompartment', 'Get-OCIIdentityCompartmentsList', 'Get-OCIIdentityCostTrackingTagsList', 'Get-OCIIdentityCustomerSecretKeysList', 'Get-OCIIdentityDbCredentialsList', 'Get-OCIIdentityDomain', 'Get-OCIIdentityDomainsList', 'Get-OCIIdentityDynamicGroup', 'Get-OCIIdentityDynamicGroupsList', 'Get-OCIIdentityFaultDomainsList', 'Get-OCIIdentityGroup', 'Get-OCIIdentityGroupsList', 'Get-OCIIdentityIamWorkRequest', 'Get-OCIIdentityIamWorkRequestErrorsList', 'Get-OCIIdentityIamWorkRequestLogsList', 'Get-OCIIdentityIamWorkRequestsList', 'Get-OCIIdentityIdpGroupMapping', 'Get-OCIIdentityIdpGroupMappingsList', 'Get-OCIIdentityMfaTotpDevice', 'Get-OCIIdentityMfaTotpDevicesList', 'Get-OCIIdentityNetworkSource', 'Get-OCIIdentityNetworkSourcesList', 'Get-OCIIdentityOAuthClientCredentialsList', 'Get-OCIIdentityPoliciesList', 'Get-OCIIdentityPolicy', 'Get-OCIIdentityProvider', 'Get-OCIIdentityProviderGroupsList', 'Get-OCIIdentityProvidersList', 'Get-OCIIdentityRegionsList', 'Get-OCIIdentityRegionSubscriptionsList', 'Get-OCIIdentitySmtpCredentialsList', 'Get-OCIIdentityStandardTagNamespacesList', 'Get-OCIIdentityStandardTagTemplate', 'Get-OCIIdentitySwiftPasswordsList', 'Get-OCIIdentityTag', 'Get-OCIIdentityTagDefault', 'Get-OCIIdentityTagDefaultsList', 'Get-OCIIdentityTaggingWorkRequest', 'Get-OCIIdentityTaggingWorkRequestErrorsList', 'Get-OCIIdentityTaggingWorkRequestLogsList', 'Get-OCIIdentityTaggingWorkRequestsList', 'Get-OCIIdentityTagNamespace', 'Get-OCIIdentityTagNamespacesList', 'Get-OCIIdentityTagsList', 'Get-OCIIdentityTenancy', 'Get-OCIIdentityUser', 'Get-OCIIdentityUserGroupMembership', 'Get-OCIIdentityUserGroupMembershipsList', 'Get-OCIIdentityUsersList', 'Get-OCIIdentityUserUIPasswordInformation', 'Get-OCIIdentityWorkRequest', 'Get-OCIIdentityWorkRequestsList', 'Import-OCIIdentityStandardTags', 'Invoke-OCIIdentityAssembleEffectiveTagSet', 'Invoke-OCIIdentityBulkDeleteResources', 'Invoke-OCIIdentityBulkDeleteTags', 'Invoke-OCIIdentityBulkEditTags', 'Invoke-OCIIdentityBulkMoveResources', 'Invoke-OCIIdentityCascadeDeleteTagNamespace', 'Invoke-OCIIdentityDeactivateDomain', 'Move-OCIIdentityCompartment', 'Move-OCIIdentityDomainCompartment', 'Move-OCIIdentityDomainLicenseType', 'Move-OCIIdentityTagNamespaceCompartment', 'New-OCIIdentityAuthToken', 'New-OCIIdentityCompartment', 'New-OCIIdentityCustomerSecretKey', 'New-OCIIdentityDbCredential', 'New-OCIIdentityDomain', 'New-OCIIdentityDynamicGroup', 'New-OCIIdentityGroup', 'New-OCIIdentityIdpGroupMapping', 'New-OCIIdentityMfaTotpDevice', 'New-OCIIdentityNetworkSource', 'New-OCIIdentityOAuthClientCredential', 'New-OCIIdentityOrResetUIPassword', 'New-OCIIdentityPolicy', 'New-OCIIdentityProvider', 'New-OCIIdentityRegionSubscription', 'New-OCIIdentitySmtpCredential', 'New-OCIIdentitySwiftPassword', 'New-OCIIdentityTag', 'New-OCIIdentityTagDefault', 'New-OCIIdentityTagNamespace', 'New-OCIIdentityTotpSeed', 'New-OCIIdentityUser', 'Remove-OCIIdentityApiKey', 'Remove-OCIIdentityAuthToken', 'Remove-OCIIdentityCompartment', 'Remove-OCIIdentityCustomerSecretKey', 'Remove-OCIIdentityDbCredential', 'Remove-OCIIdentityDomain', 'Remove-OCIIdentityDynamicGroup', 'Remove-OCIIdentityGroup', 'Remove-OCIIdentityIdpGroupMapping', 'Remove-OCIIdentityMfaTotpDevice', 'Remove-OCIIdentityNetworkSource', 'Remove-OCIIdentityOAuthClientCredential', 'Remove-OCIIdentityPolicy', 'Remove-OCIIdentityProvider', 'Remove-OCIIdentitySmtpCredential', 'Remove-OCIIdentitySwiftPassword', 'Remove-OCIIdentityTag', 'Remove-OCIIdentityTagDefault', 'Remove-OCIIdentityTagDefaultLock', 'Remove-OCIIdentityTagNamespace', 'Remove-OCIIdentityTagNamespaceLock', 'Remove-OCIIdentityUser', 'Remove-OCIIdentityUserFromGroup', 'Reset-OCIIdentityIdpScimClient', 'Restore-OCIIdentityCompartment', 'Update-OCIIdentityAuthenticationPolicy', 'Update-OCIIdentityAuthToken', 'Update-OCIIdentityCompartment', 'Update-OCIIdentityCustomerSecretKey', 'Update-OCIIdentityDomain', 'Update-OCIIdentityDynamicGroup', 'Update-OCIIdentityGroup', 'Update-OCIIdentityIdpGroupMapping', 'Update-OCIIdentityNetworkSource', 'Update-OCIIdentityOAuthClientCredential', 'Update-OCIIdentityPolicy', 'Update-OCIIdentityProvider', 'Update-OCIIdentitySmtpCredential', 'Update-OCIIdentitySwiftPassword', 'Update-OCIIdentityTag', 'Update-OCIIdentityTagDefault', 'Update-OCIIdentityTagNamespace', 'Update-OCIIdentityUser', 'Update-OCIIdentityUserCapabilities', 'Update-OCIIdentityUserState', 'Write-OCIIdentityApiKey' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Identity' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/sample_64_91.ps1
sample_64_91.ps1
# # Module manifest for module 'OCI.PSModules.Datasafe' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datasafe.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'acae3050-5046-4f4b-812f-d87bfcb51ba7' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Datasafe Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '86.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Datasafe.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Add-OCIDatasafeMaskingColumnsFromSdm', 'Edit-OCIDatasafeGlobalSettings', 'Enable-OCIDatasafeConfiguration', 'Enable-OCIDatasafeTargetDatabase', 'Get-OCIDatasafeAlert', 'Get-OCIDatasafeAlertAnalyticsList', 'Get-OCIDatasafeAlertPoliciesList', 'Get-OCIDatasafeAlertPolicy', 'Get-OCIDatasafeAlertPolicyRulesList', 'Get-OCIDatasafeAlertsList', 'Get-OCIDatasafeAuditArchiveRetrieval', 'Get-OCIDatasafeAuditArchiveRetrievalsList', 'Get-OCIDatasafeAuditEventAnalyticsList', 'Get-OCIDatasafeAuditEventsList', 'Get-OCIDatasafeAuditPoliciesList', 'Get-OCIDatasafeAuditPolicy', 'Get-OCIDatasafeAuditPolicyAnalyticsList', 'Get-OCIDatasafeAuditProfile', 'Get-OCIDatasafeAuditProfileAnalyticsList', 'Get-OCIDatasafeAuditProfilesList', 'Get-OCIDatasafeAuditTrail', 'Get-OCIDatasafeAuditTrailAnalyticsList', 'Get-OCIDatasafeAuditTrailsList', 'Get-OCIDatasafeAvailableAuditVolumesList', 'Get-OCIDatasafeCollectedAuditVolumesList', 'Get-OCIDatasafeColumnsList', 'Get-OCIDatasafeCompatibleFormatsForDataTypes', 'Get-OCIDatasafeCompatibleFormatsForSensitiveTypes', 'Get-OCIDatasafeConfiguration', 'Get-OCIDatasafeDatabaseSecurityConfig', 'Get-OCIDatasafeDatabaseSecurityConfigsList', 'Get-OCIDatasafeDatabaseTableAccessEntriesList', 'Get-OCIDatasafeDatabaseTableAccessEntry', 'Get-OCIDatasafeDatabaseViewAccessEntriesList', 'Get-OCIDatasafeDatabaseViewAccessEntry', 'Get-OCIDatasafeDifferenceColumn', 'Get-OCIDatasafeDifferenceColumnsList', 'Get-OCIDatasafeDiscoveryAnalyticsList', 'Get-OCIDatasafeDiscoveryJob', 'Get-OCIDatasafeDiscoveryJobResult', 'Get-OCIDatasafeDiscoveryJobResultsList', 'Get-OCIDatasafeDiscoveryJobsList', 'Get-OCIDatasafeFindingAnalyticsList', 'Get-OCIDatasafeFindingsChangeAuditLogsList', 'Get-OCIDatasafeFindingsList', 'Get-OCIDatasafeGrantsList', 'Get-OCIDatasafeLibraryMaskingFormat', 'Get-OCIDatasafeLibraryMaskingFormatsList', 'Get-OCIDatasafeMaskedColumnsList', 'Get-OCIDatasafeMaskingAnalyticsList', 'Get-OCIDatasafeMaskingColumn', 'Get-OCIDatasafeMaskingColumnsList', 'Get-OCIDatasafeMaskingObjectsList', 'Get-OCIDatasafeMaskingPoliciesList', 'Get-OCIDatasafeMaskingPolicy', 'Get-OCIDatasafeMaskingPolicyHealthReport', 'Get-OCIDatasafeMaskingPolicyHealthReportLogsList', 'Get-OCIDatasafeMaskingPolicyHealthReportsList', 'Get-OCIDatasafeMaskingReport', 'Get-OCIDatasafeMaskingReportsList', 'Get-OCIDatasafeMaskingSchemasList', 'Get-OCIDatasafeOnPremConnector', 'Get-OCIDatasafeOnPremConnectorsList', 'Get-OCIDatasafePeerTargetDatabase', 'Get-OCIDatasafePeerTargetDatabasesList', 'Get-OCIDatasafePrivateEndpoint', 'Get-OCIDatasafePrivateEndpointsList', 'Get-OCIDatasafeProfile', 'Get-OCIDatasafeProfileAnalyticsList', 'Get-OCIDatasafeProfileSummariesList', 'Get-OCIDatasafeReport', 'Get-OCIDatasafeReportContent', 'Get-OCIDatasafeReportDefinition', 'Get-OCIDatasafeReportDefinitionsList', 'Get-OCIDatasafeReportsList', 'Get-OCIDatasafeRoleGrantPathsList', 'Get-OCIDatasafeRolesList', 'Get-OCIDatasafeSchemasList', 'Get-OCIDatasafeSdmMaskingPolicyDifference', 'Get-OCIDatasafeSdmMaskingPolicyDifferencesList', 'Get-OCIDatasafeSecurityAssessment', 'Get-OCIDatasafeSecurityAssessmentComparison', 'Get-OCIDatasafeSecurityAssessmentsList', 'Get-OCIDatasafeSecurityFeatureAnalyticsList', 'Get-OCIDatasafeSecurityFeaturesList', 'Get-OCIDatasafeSecurityPoliciesList', 'Get-OCIDatasafeSecurityPolicy', 'Get-OCIDatasafeSecurityPolicyDeployment', 'Get-OCIDatasafeSecurityPolicyDeploymentsList', 'Get-OCIDatasafeSecurityPolicyEntryState', 'Get-OCIDatasafeSecurityPolicyEntryStatesList', 'Get-OCIDatasafeSecurityPolicyReport', 'Get-OCIDatasafeSecurityPolicyReportsList', 'Get-OCIDatasafeSensitiveColumn', 'Get-OCIDatasafeSensitiveColumnsList', 'Get-OCIDatasafeSensitiveDataModel', 'Get-OCIDatasafeSensitiveDataModelsList', 'Get-OCIDatasafeSensitiveObjectsList', 'Get-OCIDatasafeSensitiveSchemasList', 'Get-OCIDatasafeSensitiveType', 'Get-OCIDatasafeSensitiveTypesList', 'Get-OCIDatasafeSqlCollection', 'Get-OCIDatasafeSqlCollectionAnalyticsList', 'Get-OCIDatasafeSqlCollectionLogInsightsList', 'Get-OCIDatasafeSqlCollectionsList', 'Get-OCIDatasafeSqlFirewallAllowedSqlAnalyticsList', 'Get-OCIDatasafeSqlFirewallAllowedSqlsList', 'Get-OCIDatasafeSqlFirewallPoliciesList', 'Get-OCIDatasafeSqlFirewallPolicy', 'Get-OCIDatasafeSqlFirewallPolicyAnalyticsList', 'Get-OCIDatasafeSqlFirewallViolationAnalyticsList', 'Get-OCIDatasafeSqlFirewallViolationsList', 'Get-OCIDatasafeTablesList', 'Get-OCIDatasafeTargetAlertPolicyAssociation', 'Get-OCIDatasafeTargetAlertPolicyAssociationsList', 'Get-OCIDatasafeTargetDatabase', 'Get-OCIDatasafeTargetDatabasesList', 'Get-OCIDatasafeUserAccessAnalyticsList', 'Get-OCIDatasafeUserAnalyticsList', 'Get-OCIDatasafeUserAssessment', 'Get-OCIDatasafeUserAssessmentComparison', 'Get-OCIDatasafeUserAssessmentsList', 'Get-OCIDatasafeUsersList', 'Get-OCIDatasafeWorkRequest', 'Get-OCIDatasafeWorkRequestErrorsList', 'Get-OCIDatasafeWorkRequestLogsList', 'Get-OCIDatasafeWorkRequestsList', 'Invoke-OCIDatasafeAlertsUpdate', 'Invoke-OCIDatasafeApplyDiscoveryJobResults', 'Invoke-OCIDatasafeApplySdmMaskingPolicyDifference', 'Invoke-OCIDatasafeCalculateAuditVolumeAvailable', 'Invoke-OCIDatasafeCalculateAuditVolumeCollected', 'Invoke-OCIDatasafeCompareSecurityAssessment', 'Invoke-OCIDatasafeCompareUserAssessment', 'Invoke-OCIDatasafeDeactivateTargetDatabase', 'Invoke-OCIDatasafeDiscoverAuditTrails', 'Invoke-OCIDatasafeDownloadDiscoveryReport', 'Invoke-OCIDatasafeDownloadMaskingLog', 'Invoke-OCIDatasafeDownloadMaskingPolicy', 'Invoke-OCIDatasafeDownloadMaskingReport', 'Invoke-OCIDatasafeDownloadPrivilegeScript', 'Invoke-OCIDatasafeDownloadSecurityAssessmentReport', 'Invoke-OCIDatasafeDownloadSensitiveDataModel', 'Invoke-OCIDatasafeDownloadUserAssessmentReport', 'Invoke-OCIDatasafeMaskData', 'Invoke-OCIDatasafePatchAlerts', 'Invoke-OCIDatasafePatchDiscoveryJobResults', 'Invoke-OCIDatasafePatchMaskingColumns', 'Invoke-OCIDatasafePatchSdmMaskingPolicyDifferenceColumns', 'Invoke-OCIDatasafePatchSensitiveColumns', 'Invoke-OCIDatasafePatchTargetAlertPolicyAssociation', 'Invoke-OCIDatasafeProvisionAuditPolicy', 'Invoke-OCIDatasafePurgeSqlCollectionLogs', 'Invoke-OCIDatasafeRefreshDatabaseSecurityConfiguration', 'Invoke-OCIDatasafeRefreshSecurityAssessment', 'Invoke-OCIDatasafeRefreshSqlCollectionLogInsights', 'Invoke-OCIDatasafeRefreshTargetDatabase', 'Invoke-OCIDatasafeRefreshUserAssessment', 'Invoke-OCIDatasafeResumeAuditTrail', 'Invoke-OCIDatasafeResumeWorkRequest', 'Invoke-OCIDatasafeRetrieveAuditPolicies', 'Invoke-OCIDatasafeScheduleReport', 'Invoke-OCIDatasafeSetSecurityAssessmentBaseline', 'Invoke-OCIDatasafeSetUserAssessmentBaseline', 'Invoke-OCIDatasafeSuspendWorkRequest', 'Invoke-OCIDatasafeUnsetSecurityAssessmentBaseline', 'Invoke-OCIDatasafeUnsetUserAssessmentBaseline', 'Move-OCIDatasafeAlertCompartment', 'Move-OCIDatasafeAuditArchiveRetrievalCompartment', 'Move-OCIDatasafeAuditPolicyCompartment', 'Move-OCIDatasafeAuditProfileCompartment', 'Move-OCIDatasafeDatabaseSecurityConfigCompartment', 'Move-OCIDatasafeDiscoveryJobCompartment', 'Move-OCIDatasafeLibraryMaskingFormatCompartment', 'Move-OCIDatasafeMaskingPolicyCompartment', 'Move-OCIDatasafeMaskingPolicyHealthReportCompartment', 'Move-OCIDatasafeOnPremConnectorCompartment', 'Move-OCIDatasafePrivateEndpointCompartment', 'Move-OCIDatasafeReportCompartment', 'Move-OCIDatasafeReportDefinitionCompartment', 'Move-OCIDatasafeRetention', 'Move-OCIDatasafeSdmMaskingPolicyDifferenceCompartment', 'Move-OCIDatasafeSecurityAssessmentCompartment', 'Move-OCIDatasafeSecurityPolicyCompartment', 'Move-OCIDatasafeSecurityPolicyDeploymentCompartment', 'Move-OCIDatasafeSensitiveDataModelCompartment', 'Move-OCIDatasafeSensitiveTypeCompartment', 'Move-OCIDatasafeSqlCollectionCompartment', 'Move-OCIDatasafeSqlFirewallPolicyCompartment', 'Move-OCIDatasafeTargetAlertPolicyAssociationCompartment', 'Move-OCIDatasafeTargetDatabaseCompartment', 'Move-OCIDatasafeUserAssessmentCompartment', 'New-OCIDatasafeAuditArchiveRetrieval', 'New-OCIDatasafeDiscoveryJob', 'New-OCIDatasafeDiscoveryReportForDownload', 'New-OCIDatasafeHealthReport', 'New-OCIDatasafeLibraryMaskingFormat', 'New-OCIDatasafeMaskingColumn', 'New-OCIDatasafeMaskingPolicy', 'New-OCIDatasafeMaskingPolicyForDownload', 'New-OCIDatasafeMaskingReportForDownload', 'New-OCIDatasafeOnPremConnector', 'New-OCIDatasafeOnPremConnectorConfiguration', 'New-OCIDatasafePeerTargetDatabase', 'New-OCIDatasafePrivateEndpoint', 'New-OCIDatasafeReport', 'New-OCIDatasafeReportDefinition', 'New-OCIDatasafeSdmMaskingPolicyDifference', 'New-OCIDatasafeSecurityAssessment', 'New-OCIDatasafeSecurityAssessmentReport', 'New-OCIDatasafeSensitiveColumn', 'New-OCIDatasafeSensitiveDataModel', 'New-OCIDatasafeSensitiveDataModelForDownload', 'New-OCIDatasafeSensitiveType', 'New-OCIDatasafeSqlCollection', 'New-OCIDatasafeSqlFirewallPolicy', 'New-OCIDatasafeTargetAlertPolicyAssociation', 'New-OCIDatasafeTargetDatabase', 'New-OCIDatasafeUserAssessment', 'New-OCIDatasafeUserAssessmentReport', 'Remove-OCIDatasafeAuditArchiveRetrieval', 'Remove-OCIDatasafeAuditTrail', 'Remove-OCIDatasafeDiscoveryJob', 'Remove-OCIDatasafeDiscoveryJobResult', 'Remove-OCIDatasafeLibraryMaskingFormat', 'Remove-OCIDatasafeMaskingColumn', 'Remove-OCIDatasafeMaskingPolicy', 'Remove-OCIDatasafeMaskingPolicyHealthReport', 'Remove-OCIDatasafeOnPremConnector', 'Remove-OCIDatasafePeerTargetDatabase', 'Remove-OCIDatasafePrivateEndpoint', 'Remove-OCIDatasafeReportDefinition', 'Remove-OCIDatasafeScheduleReport', 'Remove-OCIDatasafeSdmMaskingPolicyDifference', 'Remove-OCIDatasafeSecurityAssessment', 'Remove-OCIDatasafeSensitiveColumn', 'Remove-OCIDatasafeSensitiveDataModel', 'Remove-OCIDatasafeSensitiveType', 'Remove-OCIDatasafeSqlCollection', 'Remove-OCIDatasafeSqlFirewallPolicy', 'Remove-OCIDatasafeTargetAlertPolicyAssociation', 'Remove-OCIDatasafeTargetDatabase', 'Remove-OCIDatasafeUserAssessment', 'Start-OCIDatasafeAuditTrail', 'Start-OCIDatasafeSqlCollection', 'Stop-OCIDatasafeAuditTrail', 'Stop-OCIDatasafeSqlCollection', 'Stop-OCIDatasafeWorkRequest', 'Update-OCIDatasafeAlert', 'Update-OCIDatasafeAuditArchiveRetrieval', 'Update-OCIDatasafeAuditPolicy', 'Update-OCIDatasafeAuditProfile', 'Update-OCIDatasafeAuditTrail', 'Update-OCIDatasafeDatabaseSecurityConfig', 'Update-OCIDatasafeFinding', 'Update-OCIDatasafeLibraryMaskingFormat', 'Update-OCIDatasafeMaskingColumn', 'Update-OCIDatasafeMaskingPolicy', 'Update-OCIDatasafeOnPremConnector', 'Update-OCIDatasafeOnPremConnectorWallet', 'Update-OCIDatasafePeerTargetDatabase', 'Update-OCIDatasafePrivateEndpoint', 'Update-OCIDatasafeReport', 'Update-OCIDatasafeReportDefinition', 'Update-OCIDatasafeSdmMaskingPolicyDifference', 'Update-OCIDatasafeSecurityAssessment', 'Update-OCIDatasafeSecurityPolicy', 'Update-OCIDatasafeSecurityPolicyDeployment', 'Update-OCIDatasafeSensitiveColumn', 'Update-OCIDatasafeSensitiveDataModel', 'Update-OCIDatasafeSensitiveType', 'Update-OCIDatasafeSqlCollection', 'Update-OCIDatasafeSqlFirewallPolicy', 'Update-OCIDatasafeTargetAlertPolicyAssociation', 'Update-OCIDatasafeTargetDatabase', 'Update-OCIDatasafeUserAssessment', 'Write-OCIDatasafeMaskingPolicy', 'Write-OCIDatasafeSensitiveDataModel' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Datasafe' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/Get-OwnerReport.ps1
Get-OwnerReport.ps1
##############################################################################\n##\n## Get-OwnerReport\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\nGets a list of files in the current directory, but with their owner added\nto the resulting objects.\n\n.EXAMPLE\n\nGet-OwnerReport | Format-Table Name,LastWriteTime,Owner\nRetrieves all files in the current directory, and displays the\nName, LastWriteTime, and Owner\n\n#>\n\nSet-StrictMode -Version Latest\n\n$files = Get-ChildItem\nforeach($file in $files)\n{\n $owner = (Get-Acl $file).Owner\n $file | Add-Member NoteProperty Owner $owner\n $file\n}
combined_dataset/train/non-malicious/sample_56_50.ps1
sample_56_50.ps1
# Import the helper functions Import-Module $PSScriptRoot\..\..\Misc\helper.psm1 -Verbose:$false function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory = $true)] [System.String] $Category ) #Write-Verbose "Use this cmdlet to deliver information about command processing." #Write-Debug "Use this cmdlet to write debug information while troubleshooting." <# $returnValue = @{ Category = [System.String] BootListOption = [System.String] BootSequence = [System.String] Password = [System.String] SecurePassword = [System.String] PathToKey = [System.String] } $returnValue #> } function Set-TargetResource { [CmdletBinding()] param ( [parameter(Mandatory = $true)] [System.String] $Category, [ValidateSet("Legacy","UEFI")] [System.String] $BootListOption, [System.String] $BootSequence, [System.String] $Password, [System.String] $SecurePassword, [System.String] $PathToKey ) #Write-Verbose "Use this cmdlet to deliver information about command processing." #Write-Debug "Use this cmdlet to write debug information while troubleshooting." #Include this line if the resource requires a system reboot. #$global:DSCMachineStatus = 1 } function Test-TargetResource { [CmdletBinding()] [OutputType([System.Boolean])] param ( [parameter(Mandatory = $true)] [System.String] $Category, [ValidateSet("Legacy","UEFI")] [System.String] $BootListOption, [System.String] $BootSequence, [System.String] $Password, [System.String] $SecurePassword, [System.String] $PathToKey ) #Write-Verbose "Use this cmdlet to deliver information about command processing." #Write-Debug "Use this cmdlet to write debug information while troubleshooting." <# $result = [System.Boolean] $result #> } Export-ModuleMember -Function *-TargetResource # SIG # Begin signature block # MIIqwQYJKoZIhvcNAQcCoIIqsjCCKq4CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDav/zuZi0vdJFO # XFwQSP6E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RydXN0IFRpbWVzdGFtcGluZyBDQSAtIFRTMQIQB9cTU9olYbRh6ZBH # ikzOBDALBgkqhkiG9w0BAQsEggIAMLhwizQdVeIPDJKZXObfyGUDZnEU7vYpiEVx # qcIz82J7U9SjERkRhEbZ8b4kpouUBMqhKjoxvClI4xXjWISrLI1X0TAfML7omdSx # 81FvZ5xmIzm1BQEdDNcRnQr74gZ/enMdT9LYVKrHBsB35z+LaHKKYg+3eoNOA7Xt # yn2XA9kTIqV9X+WRp31POu8gNIskxVcoiKztrtTySDQCuGQhk2K0UKt5qBPZ64vq # Jo+lNBaiL3ogo7pvsa+fLl0EnTsqMWqYPIeG41nxvydHmLUyJWZqi1h6A1GZo7P8 # VeAzjrHizVXBmSvfhCUvQaZ9yIgYCFut/nbypNZNJ2/lg1OjKdXaIUWj02OK7DX7 # NYfILVg2nnrnQ62J63XtavrsM0HD4SQ1L7mBqYGBWXCzCY01IOWg8csHkOyllBSy # vMrs6O9pqyIx+FjNBN1LgWt1N2jxSOCoTXxFwoXOzmqjZheby8BOmD6+/fTTjpbp # stQ6Xg2p98Jhp431P9uQJCTEsIpJJQvmrkRsbDWc9sTm5VskLr3lZqxuZq9Rikdf # 7CeJ9JjLHOm4gf6d/7BkINBtRrl8lW9bVwv1ptjdZ7q+ha/gstEVCNI4E/ZOihAj # 3Mj0iulo67yhe24mL3j4+65oB8wwjVraOko98k/ckqc0WOPdaPTA8AJrGbAp/d8n # OqPG76A= # SIG # End signature block
combined_dataset/train/non-malicious/Get-ProcessCount_2.ps1
Get-ProcessCount_2.ps1
# Get-ProcessCount uses 2 main variables, server and process name. # Process name is typically the end exe, such as "svchost.exe" # Will accept unnamed args (Get-ProcessCount servername processname) # or named args (Get-ProcessCount -Computer servername -Process processname) Function Get-ProcessCount([string]$process, [string]$computer = "localhost", [switch]$guess) { if($guess) { $clause = [string]::Format("like '%{0}%'",$process) } else { $clause = [string]::Format("='{0}'",$process) } #using string.Format can be very nice to do variable substitution $selectstring = [string]::Format("select * from Win32_Process where name {0}", $clause) $result = get-wmiobject -query $selectstring -ComputerName $computer # I really like the group-object cmdlet for reporting stuff if($result) { $result | Group-Object Name } else { Write "Process $process could not be found" } }
combined_dataset/train/non-malicious/Inventory.ps1
Inventory.ps1
############################################################################ # # Collect.ps1 # Version: 0.2 # Script to Collect Information from (1)Subnet of PCs, or (2)List of PCs # By: Brad Blaylock # For: St. Bernards RMC # Date: 3-25-2010 # ############################################################################ ############################################################################ # Collect.ps1 Script -- Output to OpenOffice Calc ############################################################################ # # #___________________________________________________________________________ ############################################################################ #__________________CREATE OPEN OFFICE CALC SHEET____________________________ [System.Reflection.Assembly]::LoadWithPartialName('cli_basetypes') [System.Reflection.Assembly]::LoadWithPartialName('cli_cppuhelper') [System.Reflection.Assembly]::LoadWithPartialName('cli_oootypes') [System.Reflection.Assembly]::LoadWithPartialName('cli_ure') [System.Reflection.Assembly]::LoadWithPartialName('cli_uretypes') $localContext = [uno.util.Bootstrap]::bootstrap() $multiComponentFactory = [unoidl.com.sun.star.uno.XComponentContext].getMethod('getServiceManager').invoke($localContext, @()) $desktop = [unoidl.com.sun.star.lang.XMultiComponentFactory].getMethod('createInstanceWithContext').invoke($multiComponentFactory, @('com.sun.star.frame.Desktop', $localContext)) $calc = [unoidl.com.sun.star.frame.XComponentLoader].getMethod('loadComponentFromURL').invoke($desktop, @('private:factory/scalc', '_blank', 0, $null)) $sheets = [unoidl.com.sun.star.sheet.XSpreadsheetDocument].getMethod('getSheets').invoke($calc, @()) $sheet = [unoidl.com.sun.star.container.XIndexAccess].getMethod('getByIndex').invoke($sheets, @(0)) #Cell definitions - Header Row $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(0,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('IP Address')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(1,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('Hostname')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(2,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('Serial')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(3,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('OS')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(4,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('SvcPk')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(5,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('CPU')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(6,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('RAM')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(7,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('C: Size')) $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(8,0)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @('C: Free')) $i=1 #Establish variable for Row Imcrementation. #___________________________END OPEN OFFICE DEFINE____________________________ #Establish Ping Object $ping = new-object System.Net.NetworkInformation.Ping; #Encorporate Error handling ri $env:temp\\*.txt -r -v –ea 0 #________________________________________________________________________________ # BEGIN GUI INTERFACE #________________________________________________________________________________ [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") $objForm = New-Object System.Windows.Forms.Form $objForm.Text = "Collect.ps1" $objForm.Size = New-Object System.Drawing.Size(200,300) $objForm.StartPosition = "CenterScreen" $objForm.KeyPreview = $True $objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter") {$subnet=$objTextBoxsub.Text;[int]$start=$objTextBoxstart.Text;$end=$objTextBoxend.Text;$objForm.Close()}}) $objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape") {$objForm.Close()}}) $OKButton = New-Object System.Windows.Forms.Button $OKButton.Location = New-Object System.Drawing.Size(15,220) $OKButton.Size = New-Object System.Drawing.Size(75,23) $OKButton.Text = "OK" $OKButton.Add_Click({$subnet=$objTextBoxsub.Text;[int]$start=$objTextBoxstart.Text;$end=$objTextBoxend.Text;$objForm.Close()}) $objForm.Controls.Add($OKButton) $CancelButton = New-Object System.Windows.Forms.Button $CancelButton.Location = New-Object System.Drawing.Size(105,220) $CancelButton.Size = New-Object System.Drawing.Size(75,23) $CancelButton.Text = "Cancel" $CancelButton.Add_Click({$objForm.Close()}) $objForm.Controls.Add($CancelButton) $objLabelsub = New-Object System.Windows.Forms.Label $objLabelsub.Location = New-Object System.Drawing.Size(10,20) $objLabelsub.Size = New-Object System.Drawing.Size(150,20) $objLabelsub.Text = "Enter Subnet (1st 3 octets):" $objForm.Controls.Add($objLabelsub) $objTextBoxsub = New-Object System.Windows.Forms.TextBox $objTextBoxsub.Location = New-Object System.Drawing.Size(10,40) $objTextBoxsub.Size = New-Object System.Drawing.Size(160,20) $objForm.Controls.Add($objTextBoxsub) $objLabelstart = New-Object System.Windows.Forms.Label $objLabelstart.Location = New-Object System.Drawing.Size(10,70) $objLabelstart.Size = New-Object System.Drawing.Size(150,20) $objLabelstart.Text = "Enter beginning node below:" $objForm.Controls.Add($objLabelstart) $objTextBoxstart = New-Object System.Windows.Forms.TextBox $objTextBoxstart.Location = New-Object System.Drawing.Size(10,90) $objTextBoxstart.Size = New-Object System.Drawing.Size(160,20) $objForm.Controls.Add($objTextBoxstart) $objLabelend = New-Object System.Windows.Forms.Label $objLabelend.Location = New-Object System.Drawing.Size(10,120) $objLabelend.Size = New-Object System.Drawing.Size(150,20) $objLabelend.Text = "Enter ending node below:" $objForm.Controls.Add($objLabelend) $objTextBoxend = New-Object System.Windows.Forms.TextBox $objTextBoxend.Location = New-Object System.Drawing.Size(10,140) $objTextBoxend.Size = New-Object System.Drawing.Size(160,20) $objForm.Controls.Add($objTextBoxend) $objForm.Topmost = $True $objForm.Add_Shown({$objForm.Activate();$objTextBoxsub.Focus()}) [Void] $objForm.ShowDialog() $objForm.Dispose() #________________________________________________________________________ # END GUI INTERFACE #________________________________________________________________________ #Main Script Section while ($start -le $end) { #----------------==Subnet Arguments==---------------------- $strAddress = "$subnet.$start" #*** #*** #_____________________________________________________________ $start++ $stat=$ping.Send($strAddress).status; if($stat -ne "Success") { #If Host is NOT online Exit here with message of unavailability. write-warning "$strAddress is not available <$stat>"; Write-Host Write-Host } else #Collect Desired Data from Live IP Addresses. { #Write IP Address to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(0,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($strAddress)) #Set $strComputer variable to Hostname. $ErrorActionPreference = "SilentlyContinue" $strComputer = [System.Net.Dns]::GetHostByAddress($strAddress).HostName | Foreach-Object {$_ -replace ".ma.dl.cox.net", ""} $ErrorActionPreference = "Continue" #Get Computer Name $ErrorActionPreference = "SilentlyContinue" $colPCName = get-wmiobject -class "Win32_BIOS" -namespace "root\\CIMV2" ` -computername $strComputer $ErrorActionPreference = "Continue" foreach ($objItem in $colPCName) { #Write Computer Name to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(1,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($strComputer)) } #Get System Serial Number from BIOS. $ErrorActionPreference = "SilentlyContinue" $colItems = get-wmiobject -class “Win32_BIOS” -computername $strComputer $ErrorActionPreference = "Continue" foreach ($objItem in $colItems) { $serial = $objItem.SerialNumber $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(2,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($serial)) } #Get Operating System and Service Pack. $ErrorActionPreference = "SilentlyContinue" $colItems = get-wmiobject -class “Win32_OperatingSystem” -computername $strComputer $ErrorActionPreference = "Continue" foreach ($objItem in $colItems) { $Opersys = $objItem.Caption $ServicePk = $objItem.CSDVersion #Write Operating System to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(3,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($Opersys)) #Write Service Pack to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(4,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($ServicePk)) } #Get Processor and Speed. $ErrorActionPreference = "SilentlyContinue" $colProcessor = get-wmiobject -class “Win32_Processor” -computername $strComputer $ErrorActionPreference = "Continue" foreach ($objItem in $colProcessor) { $cpu = $objItem.Name #Write CPU to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(5,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($cpu)) } #Get Memory Info. $ErrorActionPreference = "SilentlyContinue" $colItems = get-wmiobject -class “Win32_MemoryArray” -computername $strComputer $ErrorActionPreference = "Continue" foreach ($objItem in $colItems) { if ($objItem.EndingAddress -gt 4096) { $memory = "{0:N0}MB" -f($objItem.EndingAddress / 1024) #Write Memory to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(6,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($memory)) } } #Get Disk Information. $ErrorActionPreference = "SilentlyContinue" $colProcessor = get-wmiobject -class “Win32_LogicalDisk” -computername $strComputer $ErrorActionPreference = "Continue" foreach ($objItem in $colProcessor) { $drivename = $objItem.DeviceID $drivetype = $objItem.DriveType if ($drivename -ne "C:", $drivetype -eq 3) { #If not equal C: - Do Nothing. } if ($objItem.Size -gt 1073741824 -and $drivename -eq "C:") { $drivespace = "{0:N1}GB" -f($objItem.Size / 1073741824) $freespace = "{0:N1}GB" -f($objItem.FreeSpace / 1073741824) #Write C: Size to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(7,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($drivespace)) #Write C: Freespace to OpenOffice Calc $cell = [unoidl.com.sun.star.table.XCellRange].getMethod('getCellByPosition').invoke($sheet.Value, @(8,$i)) [unoidl.com.sun.star.table.XCell].getMethod('setFormula').invoke($cell, @($freespace)) } else { } } #Increment row $i=$i+1 } }
combined_dataset/train/non-malicious/Set-WinSchedule.ps1
Set-WinSchedule.ps1
# Set-WinSchedule # Written by Tome Tanasovski # http://powertoe.wordpress.com # version 1.0 # Created March 2010 # # Please read through the synopsis->Description to see the list of features that I hope to get # in a final release. If you choose to work on any of the issues by all means, but please contact # me to let me know so that no effort is duplicated # Winform Assemblies [reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null [reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null function Set-WinSchedule { <# .Synopsis Creates a winform to select a schedule and creates a scheduled task .Description Set-Computer gives a GUI to select a schedule and schedules a task using schtasks This is a beta. There are still a lot of features to implement: Need to have more scheduling options. I expect to have all options available in a recurring outlook calendar item Need to have methods for scheduling with all 3 providers: schtasks, wmi, and at. Currently it only uses schtasks Need to design the return object properties: Should contain the text paths for each provider type Should contain a date/time for start time Need to provide a method to overwrite an existing task if it has the same name and the user confirms that it is ok to overwrite. Should also provide a -force parameter for this option. Need to ensure that files piped from get-item will be scheduled Need a parameter to override ok box at the end .Example Set-Schedule c:\\windows\\notepad.exe .Parameter TaskRun The name of the command to be scheduled .Parameter ScheduleName The name that the scheduled task will be given. .Notes NAME: Set-Schedule AUTHOR: Tome Tanasovski LASTEDIT: 3/11/2010 KEYWORDS: .Link http://powertoe.wordpress.com #> param( [Parameter(Position=1,Mandatory=$true)] [string] $taskrun, [Parameter(Position=2,Mandatory=$true)] [string] $taskname ) $command = "& schtasks.exe /query /tn $taskname" $job = start-job $ExecutionContext.InvokeCommand.NewScriptBlock($command) Wait-Job $job if ($job.ChildJobs[0].output -ne "") { [System.windows.forms.messagebox]::show("A task named $taskname already exists. You must delete this task before you can use the name.") return } $SchedulePickerForm = New-Object System.Windows.Forms.Form $comboTime = New-Object System.Windows.Forms.ComboBox $label4 = New-Object System.Windows.Forms.Label $buttonCancel = New-Object System.Windows.Forms.Button $buttonOK = New-Object System.Windows.Forms.Button $group = New-Object System.Windows.Forms.GroupBox $checkSaturday = New-Object System.Windows.Forms.CheckBox $checkFriday = New-Object System.Windows.Forms.CheckBox $checkThursday = New-Object System.Windows.Forms.CheckBox $checkWednesday = New-Object System.Windows.Forms.CheckBox $checkTuesday = New-Object System.Windows.Forms.CheckBox $checkMonday = New-Object System.Windows.Forms.CheckBox $checkSunday = New-Object System.Windows.Forms.CheckBox $labelDays = New-Object System.Windows.Forms.Label $labelHours = New-Object System.Windows.Forms.Label $boxHourlyDaily = New-Object System.Windows.Forms.TextBox $labelEvery = New-Object System.Windows.Forms.Label $radioHourly = New-Object System.Windows.Forms.RadioButton $radioWeekly = New-Object System.Windows.Forms.RadioButton $radioDaily = New-Object System.Windows.Forms.RadioButton $InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState $checkboxes = ($checkMonday,$checkTuesday,$checkWednesday,$checkThursday,$checkFriday,$checkSaturday,$checkSunday) function VisibleInvisibleCheckBoxes { Write-Host $checkboxes $checkboxes |foreach {$_.visible = -not $_.visible} } # Events $handler_radioButtonChanged = { switch ($true) { ($radioHourly.Checked) { $labelHours.Visible = $true $labelDays.Visible = $false $boxHourlyDaily.Visible = $true $checkboxes |foreach {$_.visible = $false} } ($radioDaily.Checked) { $labelHours.Visible = $false $labelDays.Visible = $true $boxHourlyDaily.Visible = $true $checkboxes |foreach {$_.visible = $false} } ($radioWeekly.Checked) { $labelHours.Visible = $false $labelDays.Visible = $false $boxHourlyDaily.Visible = $false $checkboxes |foreach {$_.visible = $true} } } } $buttonCancel_OnClick = { $SchedulePickerForm.Close() return $null } $buttonOK_OnClick = { $doit = $false switch ($true) { ($radioHourly.Checked -or $radioDaily.Checked) { try { $recurrence = [Convert]::ToInt32($boxHourlyDaily.Text) if ($recurrence -gt 0) { try { switch ($true) { ($radiohourly.checked) { if ($recurence -gt 23) { [System.windows.forms.messagebox]::show("Hourly recurrence must be 1-23 hours") $boxHourlyDaily.Focus() } else { & schtasks /create /tn $taskname /tr "$taskrun" /sc hourly /mo $boxHourlyDaily.Text /st $comboTime.Text /f [System.Windows.Forms.Messagebox]::show("Task has been scheduled") $SchedulePickerForm.Close() } } ($radioDaily.checked) { if ($recurence -gt 365) { [System.windows.forms.messagebox]::show("Hourly recurrence must be 1-365 hours") $boxhourlydaily.focus() } else { & schtasks /create /tn $taskname /tr $taskrun /sc daily /mo $boxHourlyDaily.Text /st $comboTime.Text /f $SchedulePickerForm.Close() } } } } catch { [System.windows.forms.messagebox]::show($error[0]) } } else { [System.windows.forms.messagebox]::show("Recurrence must be greater than 0") $boxHourlyDaily.Focus() } } catch { [System.windows.forms.messagebox]::show("You must enter a valid integer recurrence") $boxHourlyDaily.Focus() } } ($radioWeekly.Checked) { $dflag = "" $checkboxes|foreach { if ($_.checked) { $dflag += $_.text.substring(0,3) + "," } } if ($dflag -ne "") { $dflag = $dflag.substring(0,$dflag.length-1) & schtasks /create /tn $taskname /tr $taskrun /sc weekly /st $comboTime.Text /d "$dflag" /f $SchedulePickerForm.Close() } else { [System.windows.forms.messagebox]::show("You must select at least one day for weekly recurrence") } } } } $OnLoadForm_StateCorrection={ #Correct the initial state of the form to prevent the .Net maximized form issue $SchedulePickerForm.WindowState = $InitialFormWindowState } $SchedulePickerForm.Text = "Schedule Picker" $SchedulePickerForm.MaximizeBox = $False $SchedulePickerForm.Name = "SchedulePickerForm" $SchedulePickerForm.DataBindings.DefaultDataSourceUpdateMode = 0 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 476 $System_Drawing_Size.Height = 157 $SchedulePickerForm.ClientSize = $System_Drawing_Size $SchedulePickerForm.FormBorderStyle = 5 $comboTime.FormattingEnabled = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 121 $System_Drawing_Size.Height = 21 $comboTime.Size = $System_Drawing_Size $comboTime.DataBindings.DefaultDataSourceUpdateMode = 0 $comboTime.Name = "comboTime" $comboTime.Items.Add("00:00")|Out-Null $comboTime.Items.Add("00:30")|Out-Null $comboTime.Items.Add("01:00")|Out-Null $comboTime.Items.Add("01:30")|Out-Null $comboTime.Items.Add("02:00")|Out-Null $comboTime.Items.Add("02:30")|Out-Null $comboTime.Items.Add("03:00")|Out-Null $comboTime.Items.Add("03:30")|Out-Null $comboTime.Items.Add("04:00")|Out-Null $comboTime.Items.Add("04:30")|Out-Null $comboTime.Items.Add("05:00")|Out-Null $comboTime.Items.Add("05:30")|Out-Null $comboTime.Items.Add("06:00")|Out-Null $comboTime.Items.Add("06:30")|Out-Null $comboTime.Items.Add("07:00")|Out-Null $comboTime.Items.Add("07:30")|Out-Null $comboTime.Items.Add("08:00")|Out-Null $comboTime.Items.Add("08:30")|Out-Null $comboTime.Items.Add("09:00")|Out-Null $comboTime.Items.Add("09:30")|Out-Null $comboTime.Items.Add("10:00")|Out-Null $comboTime.Items.Add("10:30")|Out-Null $comboTime.Items.Add("11:00")|Out-Null $comboTime.Items.Add("11:30")|Out-Null $comboTime.Items.Add("12:00")|Out-Null $comboTime.Items.Add("12:30")|Out-Null $comboTime.Items.Add("13:00")|Out-Null $comboTime.Items.Add("13:30")|Out-Null $comboTime.Items.Add("14:00")|Out-Null $comboTime.Items.Add("14:30")|Out-Null $comboTime.Items.Add("15:00")|Out-Null $comboTime.Items.Add("15:30")|Out-Null $comboTime.Items.Add("16:00")|Out-Null $comboTime.Items.Add("16:30")|Out-Null $comboTime.Items.Add("17:00")|Out-Null $comboTime.Items.Add("17:30")|Out-Null $comboTime.Items.Add("18:00")|Out-Null $comboTime.Items.Add("18:30")|Out-Null $comboTime.Items.Add("19:00")|Out-Null $comboTime.Items.Add("19:30")|Out-Null $comboTime.Items.Add("20:00")|Out-Null $comboTime.Items.Add("20:30")|Out-Null $comboTime.Items.Add("21:00")|Out-Null $comboTime.Items.Add("21:30")|Out-Null $comboTime.Items.Add("22:00")|Out-Null $comboTime.Items.Add("22:30")|Out-Null $comboTime.Items.Add("23:00")|Out-Null $comboTime.Items.Add("23:30")|Out-Null $comboTime.Text = "08:00" $comboTime.DropDownStyle = "DropDownList" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 53 $System_Drawing_Point.Y = 119 $comboTime.Location = $System_Drawing_Point $comboTime.TabIndex = 1 $SchedulePickerForm.Controls.Add($comboTime) $label4.TabIndex = 3 $label4.TextAlign = 16 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 35 $System_Drawing_Size.Height = 23 $label4.Size = $System_Drawing_Size $label4.Text = "Start:" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 12 $System_Drawing_Point.Y = 116 $label4.Location = $System_Drawing_Point $label4.DataBindings.DefaultDataSourceUpdateMode = 0 $label4.Name = "label4" $SchedulePickerForm.Controls.Add($label4) $buttonCancel.TabIndex = 3 $buttonCancel.Name = "buttonCancel" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 75 $System_Drawing_Size.Height = 23 $buttonCancel.Size = $System_Drawing_Size $buttonCancel.UseVisualStyleBackColor = $True $buttonCancel.Text = "Cancel" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 368 $System_Drawing_Point.Y = 119 $buttonCancel.Location = $System_Drawing_Point $buttonCancel.DataBindings.DefaultDataSourceUpdateMode = 0 $buttonCancel.add_Click($buttonCancel_OnClick) $SchedulePickerForm.Controls.Add($buttonCancel) $buttonOK.TabIndex = 2 $buttonOK.Name = "buttonOK" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 75 $System_Drawing_Size.Height = 23 $buttonOK.Size = $System_Drawing_Size $buttonOK.UseVisualStyleBackColor = $True $buttonOK.Text = "OK" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 287 $System_Drawing_Point.Y = 119 $buttonOK.Location = $System_Drawing_Point $buttonOK.DataBindings.DefaultDataSourceUpdateMode = 0 $buttonOK.add_Click($buttonOK_OnClick) $SchedulePickerForm.Controls.Add($buttonOK) $group.Name = "group" $group.Text = "Recurrence pattern" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 431 $System_Drawing_Size.Height = 101 $group.Size = $System_Drawing_Size $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 12 $System_Drawing_Point.Y = 12 $group.Location = $System_Drawing_Point $group.TabStop = $False $group.TabIndex = 0 $group.DataBindings.DefaultDataSourceUpdateMode = 0 $SchedulePickerForm.Controls.Add($group) $checkSaturday.UseVisualStyleBackColor = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 73 $System_Drawing_Size.Height = 24 $checkSaturday.Size = $System_Drawing_Size $checkSaturday.TabIndex = 13 $checkSaturday.Text = "Saturday" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 274 $System_Drawing_Point.Y = 64 $checkSaturday.Location = $System_Drawing_Point $checkSaturday.DataBindings.DefaultDataSourceUpdateMode = 0 $checkSaturday.Name = "checkSaturday" $checkSaturday.Visible = $False $group.Controls.Add($checkSaturday) $checkFriday.UseVisualStyleBackColor = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 64 $System_Drawing_Size.Height = 24 $checkFriday.Size = $System_Drawing_Size $checkFriday.TabIndex = 12 $checkFriday.Text = "Friday" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 204 $System_Drawing_Point.Y = 64 $checkFriday.Location = $System_Drawing_Point $checkFriday.DataBindings.DefaultDataSourceUpdateMode = 0 $checkFriday.Name = "checkFriday" $checkFriday.Visible = $False $group.Controls.Add($checkFriday) $checkThursday.UseVisualStyleBackColor = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 70 $System_Drawing_Size.Height = 24 $checkThursday.Size = $System_Drawing_Size $checkThursday.TabIndex = 11 $checkThursday.Text = "Thursday" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 129 $System_Drawing_Point.Y = 64 $checkThursday.Location = $System_Drawing_Point $checkThursday.DataBindings.DefaultDataSourceUpdateMode = 0 $checkThursday.Name = "checkThursday" $checkThursday.Visible = $False $group.Controls.Add($checkThursday) $checkWednesday.UseVisualStyleBackColor = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 83 $System_Drawing_Size.Height = 24 $checkWednesday.Size = $System_Drawing_Size $checkWednesday.TabIndex = 10 $checkWednesday.Text = "Wednesday" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 342 $System_Drawing_Point.Y = 44 $checkWednesday.Location = $System_Drawing_Point $checkWednesday.DataBindings.DefaultDataSourceUpdateMode = 0 $checkWednesday.Name = "checkWednesday" $checkWednesday.Visible = $False $group.Controls.Add($checkWednesday) $checkTuesday.UseVisualStyleBackColor = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 68 $System_Drawing_Size.Height = 24 $checkTuesday.Size = $System_Drawing_Size $checkTuesday.TabIndex = 9 $checkTuesday.Text = "Tuesday" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 274 $System_Drawing_Point.Y = 44 $checkTuesday.Location = $System_Drawing_Point $checkTuesday.DataBindings.DefaultDataSourceUpdateMode = 0 $checkTuesday.Name = "checkTuesday" $checkTuesday.Visible = $False $group.Controls.Add($checkTuesday) $checkMonday.UseVisualStyleBackColor = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 64 $System_Drawing_Size.Height = 24 $checkMonday.Size = $System_Drawing_Size $checkMonday.TabIndex = 8 $checkMonday.Text = "Monday" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 204 $System_Drawing_Point.Y = 44 $checkMonday.Location = $System_Drawing_Point $checkMonday.DataBindings.DefaultDataSourceUpdateMode = 0 $checkMonday.Name = "checkMonday" $checkMonday.Visible = $False $group.Controls.Add($checkMonday) $checkSunday.UseVisualStyleBackColor = $True $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 104 $System_Drawing_Size.Height = 24 $checkSunday.Size = $System_Drawing_Size $checkSunday.TabIndex = 7 $checkSunday.Text = "Sunday" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 129 $System_Drawing_Point.Y = 44 $checkSunday.Location = $System_Drawing_Point $checkSunday.DataBindings.DefaultDataSourceUpdateMode = 0 $checkSunday.Name = "checkSunday" $checkSunday.Visible = $False $group.Controls.Add($checkSunday) $labelDays.TabIndex = 6 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 64 $System_Drawing_Size.Height = 18 $labelDays.Size = $System_Drawing_Size $labelDays.Visible = $False $labelDays.Text = "day(s)" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 189 $System_Drawing_Point.Y = 23 $labelDays.Location = $System_Drawing_Point $labelDays.DataBindings.DefaultDataSourceUpdateMode = 0 $labelDays.Name = "labelDays" $group.Controls.Add($labelDays) $labelHours.TabIndex = 5 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 100 $System_Drawing_Size.Height = 23 $labelHours.Size = $System_Drawing_Size $labelHours.Text = "hour(s)" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 189 $System_Drawing_Point.Y = 23 $labelHours.Location = $System_Drawing_Point $labelHours.DataBindings.DefaultDataSourceUpdateMode = 0 $labelHours.Name = "labelHours" $group.Controls.Add($labelHours) $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 28 $System_Drawing_Size.Height = 20 $boxHourlyDaily.Size = $System_Drawing_Size $boxHourlyDaily.DataBindings.DefaultDataSourceUpdateMode = 0 $boxHourlyDaily.Text = "1" $boxHourlyDaily.Name = "boxHourlyDaily" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 155 $System_Drawing_Point.Y = 20 $boxHourlyDaily.Location = $System_Drawing_Point $boxHourlyDaily.TabIndex = 4 $group.Controls.Add($boxHourlyDaily) $labelEvery.TabIndex = 3 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 67 $System_Drawing_Size.Height = 23 $labelEvery.Size = $System_Drawing_Size $labelEvery.Text = "Every" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 116 $System_Drawing_Point.Y = 23 $labelEvery.Location = $System_Drawing_Point $labelEvery.DataBindings.DefaultDataSourceUpdateMode = 0 $labelEvery.Name = "labelEvery" $group.Controls.Add($labelEvery) $radioHourly.TabIndex = 0 $radioHourly.Name = "radioHourly" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 104 $System_Drawing_Size.Height = 24 $radioHourly.Size = $System_Drawing_Size $radioHourly.UseVisualStyleBackColor = $True $radioHourly.Text = "Hourly" $radioHourly.Checked = $True $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 6 $System_Drawing_Point.Y = 17 $radioHourly.Location = $System_Drawing_Point $radioHourly.DataBindings.DefaultDataSourceUpdateMode = 0 $radioHourly.TabStop = $True $radioHourly.add_Click($handler_radioButtonChanged) $group.Controls.Add($radioHourly) $radioWeekly.TabIndex = 2 $radioWeekly.Name = "radioWeekly" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 104 $System_Drawing_Size.Height = 24 $radioWeekly.Size = $System_Drawing_Size $radioWeekly.UseVisualStyleBackColor = $True $radioWeekly.Text = "Weekly" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 6 $System_Drawing_Point.Y = 56 $radioWeekly.Location = $System_Drawing_Point $radioWeekly.DataBindings.DefaultDataSourceUpdateMode = 0 $radioWeekly.add_Click($handler_radioButtonChanged) $group.Controls.Add($radioWeekly) $radioDaily.TabIndex = 1 $radioDaily.Name = "radioDaily" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 104 $System_Drawing_Size.Height = 24 $radioDaily.Size = $System_Drawing_Size $radioDaily.UseVisualStyleBackColor = $True $radioDaily.Text = "Daily" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 6 $System_Drawing_Point.Y = 37 $radioDaily.Location = $System_Drawing_Point $radioDaily.DataBindings.DefaultDataSourceUpdateMode = 0 $radioDaily.add_Click($handler_radioButtonChanged) $group.Controls.Add($radioDaily) $SchedulePickerForm.CancelButton = $buttonCancel $SchedulePickerForm.AcceptButton = $buttonOK #Save the initial state of the form $InitialFormWindowState = $SchedulePickerForm.WindowState #Init the OnLoad event to correct the initial state of the form $SchedulePickerForm.add_Load($OnLoadForm_StateCorrection) #Show the Form $SchedulePickerForm.ShowDialog() |out-null }
combined_dataset/train/non-malicious/PowerBot _3.0.ps1
PowerBot _3.0.ps1
## PowerBot 2.0 ## A simple framework to get you started writing your own IRC bots in PowerShell #################################################################################################### ## Requires Meebey.SmartIrc4net.dll to be in your ...\\WindowsPowerShell\\Libraries\\ ## You can get Meebey.SmartIrc4net.dll from ## http://voxel.dl.sourceforge.net/sourceforge/smartirc4net/SmartIrc4net-0.4.0.bin.tar.bz2 #################################################################################################### ## Add-Type -path $ProfileDir\\Libraries\\Meebey.SmartIrc4net.dll $null = [Reflection.Assembly]::LoadFrom("$ProfileDir\\Libraries\\Meebey.SmartIrc4net.dll") function Start-PowerBot { PARAM( $server = "irc.freenode.net", [string[]]$channels = @("#PowerShell"), [string[]]$nick = @(Read-Host 'You must provide a nickname'), [string]$password, $realname = "PowerShell Bot", $port = 6667) if(!$global:irc) { $global:irc = New-Object Meebey.SmartIrc4net.IrcClient $irc.ActiveChannelSyncing = $true # $irc will track channels for us # $irc.Encoding = [Text.Encoding]::UTF8 # $irc.Add_OnError( {Write-Error $_.ErrorMessage} ) $irc.Add_OnQueryMessage( {PrivateMessage} ) $irc.Add_OnChannelMessage( {ChannelMessage} ) } $irc.Connect($server, $port) $irc.Login($nick, $realname, 0, $nick, $password) ## $channels | % { $irc.RfcJoin( $_ ) } foreach($channel in $channels) { $irc.RfcJoin( $channel ) } Resume-PowerBot # Shortcut so starting this thing up only takes one command } ## Note that PowerBot stops listening if you press a key ... ## You'll have to re-run Resume-Powerbot to get him to listen again function Resume-PowerBot { while(!$Host.UI.RawUI.KeyAvailable) { $irc.ListenOnce($false) } } function Stop-PowerBot { $irc.RfcQuit("If people listened to themselves more often, they would talk less.") $irc.Disconnect() } #################################################################################################### ## Event Handlers #################################################################################################### ## Event handlers in powershell have TWO automatic variables: $This and $_ ## In the case of SmartIrc4Net: ## $This - usually the connection, and such ... ## $_ - the IrcEventArgs, which just has the Data member: ## function PrivateMessage { $Data = $_.Data # Write-Verbose $Data.From # Write-Verbose $Data.Message # Write-Verbose $($Data | Out-String) $command, $params = $Data.MessageArray if($PowerBotCommands.ContainsKey($command)) { &$PowerBotCommands[$command] $params $Data | Out-String -width (510 - $Data.From.Length - $nick.Length - 3) | % { $_.Trim().Split("`n") | %{ $irc.SendMessage("Message", $Data.Channel, $_.Trim() ) }} } } function ChannelMessage { $Data = $_.Data # Write-Verbose $Data.From # Write-Verbose $Data.Channel # Write-Verbose $Data.Message # Write-Verbose $($Data | Out-String) $command, $params = $Data.MessageArray if($PowerBotCommands.ContainsKey($command)) { &$PowerBotCommands[$command] $params $Data | Out-String -width (510 - $Data.Channel.Length - $nick.Length - 3) | % { $_.Trim().Split("`n") | %{ $irc.SendMessage("Message", $Data.Channel, $_.Trim() ) }} } } #################################################################################################### ## The PowerBotCommands hashtable is extremely simple ... ## ## You register a "command" which must be the FIRST WORD of a message (either private, or channel) ## and you provide a scriptblock to process said message. ## The handler scriptblock gets two parameters, for convenience: ## $Params is the rest of the message text after the command word (which is probably all you need) ## $Data is the Data propert of the IrcEventArgs, which has everything in it that you could want ## ## You may do whatever you want in the scriptblock (this runs on your PC, after all), but the ## simplest thing is to respond by returning "something" which will be sent to wherever the message ## came from. ## ## NOTE 1: Evrything you return is output to Out-String and then the channel or user. Be careful! ## NOTE 2: 510 is the Max IRC Message Length, including the channel name etc. ## http`://www.faqs.org/rfcs/rfc1459.html ## $PowerBotCommands=@{} ## A sample command to get you started $PowerBotCommands."Hello" = {Param($Query,$Data) "Hello, $($Data.Nick)!" } ##$PowerBotCommands."!Echo" = {Param($Query,$Data) ## "$Query" ##} ## ##$PowerBotCommands."!Get-Help" = {Param($Query) ## $help = get-help $Query | Select Name,Synopsis,Syntax ## if($?) { ## if($help -is [array]) { ## "You're going to need to be more specific, I know all about $((($help | % { $_.Name })[0..($help.Length-2)] -join ', ') + ' and even ' + $help[-1].Name)" ## } else { ## @($help.Synopsis,($help.Syntax | Out-String -width 1000).Trim().Split("`n",4,"RemoveEmptyEntries")[0..3]) ## } ## } else { ## "I couldn't find the help file for '$Query', sorry. I probably don't have that snapin loaded." ## } ##}
combined_dataset/train/non-malicious/Write-Output.ps1
Write-Output.ps1
######################################################################## ## Copyright (c) Joel Bennett, 2010 ## Free for use under MS-PL, MS-RL, GPL 2, or BSD license. Your choice. function Write-Output { [CmdletBinding()] param( [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)] [AllowEmptyCollection()] [AllowNull()] [System.Management.Automation.PSObject] ${InputObject} , [Parameter()] [Switch] $Passthru , [Parameter()] [Switch] $CollectInput ) begin { if($CollectInput) { $Collection = New-Object System.Collections.Generic.List[PSObject] } } process { if($InputObject) { if($CollectInput) { $Collection.AddRange( ([PSObject[]]@($InputObject)) ) } else { $PSCmdlet.WriteObject( $InputObject, !$Passthru ) } } } end { if($CollectInput) { $PSCmdlet.WriteObject( $Collection, !$Passthru ) } } <# .SYNOPSIS Sends the specified objects to the next command in the pipeline. If the command is the last command in the pipeline, the objects are displayed in the console. .DESCRIPTION The Write-Output function sends the specified object down the pipeline to the next command. If the command is the last command in the pipeline, the object is displayed in the console. Write-Output sends objects down the primary pipeline, also known as the "output stream" or the "success pipeline." To send error objects down the error pipeline, use Write-Error. This function provides a pair of enhancements to the built-in Write-Output. First, it offers the option of Passthru, which causes collections to be output without unrolling (that is, output as collections to the pipeline), and second, it includes an option to collect input from the pipeline and output it all at once at the end. .PARAMETER InputObject Specifies the objects to send down the pipeline. Enter a variable that contains the objects, or type a command or expression that gets the objects. .PARAMETER CollectInput Specifies that pipeline input should be collected and output all at once at the end. This effectively allows you to take streaming input and turn it into a collection. Note that this causes the output to be a List[PSObject]. .PARAMETER Passthru Specifies that the output should be "as-is" ... meaning that if you specify a collection as input, you'll get a collection as output, rather than having Write-Output output individual items one at a time. .EXAMPLE $p = get-process C:\\PS>write-output $p Description ----------- These commands get objects representing the processes running on the computer and display the objects on the console. .EXAMPLE $p = get-process | Select-Object -First 10 C:\\PS>write-output $p | ForEach-Object { $_.GetType() } IsPublic IsSerial Name BaseType -------- -------- ---- -------- True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component True False Process System.ComponentModel.Component C:\\PS>write-output $p -passthru | ForEach-Object { $_.GetType() } IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Object[] System.Array Description ----------- These commands demonstrate the difference between using and not using -passthru. Without it, each object passes through the ForEach and it's type is output. With -Passthru, only a single object is output, with a collection type of Object[]. .EXAMPLE Get-Process | Select-Object -First 10 | Write-Output -Passthru | ForEach-Object { $_.GetType() } Description ----------- This command pipes the first ten processes to the ForEach-Object, demonstrating that -Passthru will always force collection output. .EXAMPLE Get-Process | Write-Output -Passthru -CollectInput | ForEach-Object { $_.GetType() } Description ----------- This command collects all of the processes before outputting them to the ForEach-Object as a List[PSObject] #> }
combined_dataset/train/non-malicious/1576.ps1
1576.ps1
function ConvertTo-MrHashTable { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline)] [PSObject[]]$Object ) PROCESS { foreach ($o in $Object) { $hashtable = @{} foreach ($p in Get-Member -InputObject $o -MemberType Property) { $hashtable.($p.Name) = $o.($p.Name) } Write-Output $hashtable } } }
combined_dataset/train/non-malicious/sample_23_79.ps1
sample_23_79.ps1
<# .SYNOPSIS Launch Developer PowerShell .DESCRIPTION Locates and imports a Developer PowerShell module and calls the Enter-VsDevShell cmdlet. The Developer PowerShell module is located in one of several ways: 1) From a path in a Visual Studio installation 2) From the latest installation of Visual Studio (higher versions first) 3) From the instance ID of a Visual Studio installation 4) By selecting a Visual Studio installation from a list By default, with no parameters, the path to this script is used to locate the Developer PowerShell module. If that fails, then the latest Visual Studio installation is used. If both methods fail, then the user can select a Visual Studio installation from a list. .PARAMETER VsInstallationPath A path in a Visual Studio installation. The path is used to locate the Developer PowerShell module. By default, this is the path to this script. .PARAMETER Latest Use the latest Visual Studio installation to locate the Developer PowerShell module. .PARAMETER List Display a list of Visual Studio installations to choose from. The choosen installation is used to locate the Developer PowerShell module. .PARAMETER VsInstanceId A Visual Studio installation instance ID. The matching installation is used to locate the Developer PowerShell module. .PARAMETER ExcludePrerelease Excludes Prerelease versions of Visual Studio from consideration. Applies only to Latest and List. .PARAMETER VsWherePath Path to the vswhere utility used to located and identify Visual Studio installations. By default, the path is the well-known location shared by Visual Studio installations. #> [CmdletBinding(DefaultParameterSetName = "Default")] param ( [ValidateScript({Test-Path $_})] [Parameter(ParameterSetName = "VsInstallationPath")] [string] $VsInstallationPath = "$($MyInvocation.MyCommand.Definition)", [Parameter(ParameterSetName = "Latest")] [switch] $Latest, [Parameter(ParameterSetName = "List")] [switch] $List, [Parameter(ParameterSetName = "List")] [object[]] $DisplayProperties = @("displayName", "instanceId", "installationVersion", "isPrerelease", "installationName", "installDate"), [Parameter(ParameterSetName = "VsInstanceId", Mandatory = $true)] [string] $VsInstanceId, [Parameter(ParameterSetName = "Latest")] [Parameter(ParameterSetName = "List")] [switch] $ExcludePrerelease, [Parameter(ParameterSetName = "Default")] [Parameter(ParameterSetName = "VsInstallationPath")] [Parameter(ParameterSetName = "Latest")] [Parameter(ParameterSetName = "List")] [Parameter(ParameterSetName = "VsInstanceId")] [ValidateSet('x86','amd64','arm','arm64')] [string] $Arch, [Parameter(ParameterSetName = "Default")] [Parameter(ParameterSetName = "VsInstallationPath")] [Parameter(ParameterSetName = "Latest")] [Parameter(ParameterSetName = "List")] [Parameter(ParameterSetName = "VsInstanceId")] [ValidateSet('x86','amd64')] [string] $HostArch, [Parameter(ParameterSetName = "Default")] [Parameter(ParameterSetName = "VsInstallationPath")] [Parameter(ParameterSetName = "Latest")] [Parameter(ParameterSetName = "List")] [Parameter(ParameterSetName = "VsInstanceId")] [switch] $SkipAutomaticLocation, [ValidateScript({Test-Path $_ -PathType 'Leaf'})] [Parameter(ParameterSetName = "Default")] [Parameter(ParameterSetName = "VsInstallationPath")] [Parameter(ParameterSetName = "Latest")] [Parameter(ParameterSetName = "List")] [Parameter(ParameterSetName = "VsInstanceId")] [string] $VsWherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" ) function GetSetupConfigurations { param ( $whereArgs ) $expression = "& `"$VsWherePath`" $whereArgs -format json" Invoke-Expression $expression | ConvertFrom-Json } function LaunchDevShell { param ( $config ) $basePath = $config.installationPath $instanceId = $config.instanceId $currModulePath = "$basePath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" # Prior to 16.3 the DevShell module was in a different location $prevModulePath = "$basePath\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll" $modulePath = if (Test-Path $prevModulePath) { $prevModulePath } else { $currModulePath } if (Test-Path $modulePath) { Write-Verbose "Found at $modulePath." try { Import-Module $modulePath } catch [System.IO.FileLoadException] { Write-Verbose "The module has already been imported from a different installation of Visual Studio:" (Get-Module Microsoft.VisualStudio.DevShell).Path | Write-Verbose } $params = @{ VsInstanceId = $instanceId } $command = Get-Command Enter-VsDevShell if ($SkipAutomaticLocation) { $params.SkipAutomaticLocation = $true } # -Arch is only available from 17.1 if ($Arch -and $command.Parameters.ContainsKey("Arch")) { $params.Arch = $Arch } # -HostArch is only available from 17.1 if ($HostArch -and $command.Parameters.ContainsKey("HostArch")) { $params.HostArch = $HostArch } # -ReportNewInstanceType is only available from 16.5 if ($command.Parameters.ContainsKey("ReportNewInstanceType")) { $params.ReportNewInstanceType = "LaunchScript" } $boundParams = $PSCmdlet.MyInvocation.BoundParameters if ($boundParams.ContainsKey("Verbose") -and $boundParams["Verbose"].IsPresent) { Write-Verbose "Enter-VsDevShell Parameters:" $params.GetEnumerator() | ForEach-Object{ $message = '{0} = {1}' -f $_.key, $_.value Write-Verbose $message } } Enter-VsDevShell @params exit } throw [System.Management.Automation.ErrorRecord]::new( [System.Exception]::new("Required assembly could not be located. This most likely indicates an installation error. Try repairing your Visual Studio installation. Expected location: $modulePath"), "DevShellModuleLoad", [System.Management.Automation.ErrorCategory]::NotInstalled, $config) } function VsInstallationPath { $setupargs = "-path `"$VsInstallationPath`"" Write-Verbose "Using path: $VsInstallationPath" $config = GetSetupConfigurations($setupargs) LaunchDevShell($config) } function Latest { $setupargs = "-latest" if (-not $ExcludePrerelease) { $setupargs += " -prerelease" } $config = GetSetupConfigurations($setupargs) LaunchDevShell($config) } function VsInstanceId { $configs = GetSetupConfigurations("-prerelease -all") $config = $configs | Where-Object { $_.instanceId -eq $VsInstanceId } if ($config) { Write-Verbose "Found Visual Studio installation with InstanceId of '$($config.instanceId)' and InstallationPath '$($config.installationPath)'" LaunchDevShell($config) exit } throw [System.Management.Automation.ErrorRecord]::new( [System.Exception]::new("Could not find an installation of Visual Studio with InstanceId '$VsInstanceId'."), "VsSetupInstance", [System.Management.Automation.ErrorCategory]::InvalidArgument, $config) } function List { $setupargs = "-sort" if (-not $ExcludePrerelease) { $setupargs = " -prerelease" } $configs = GetSetupConfigurations($setupargs) $DisplayProperties = @("#") + $DisplayProperties # Add an incrementing select column $configs = $configs | Sort-Object displayName, installationDate | ForEach-Object {$i = 0}{ $i++; $_ | Add-Member -NotePropertyName "#" -NotePropertyValue $i -PassThru } Write-Host "The following Visual Studio installations were found:" $configs | Format-Table -Property $DisplayProperties $selected = Read-Host "Enter '#' of the Visual Studio installation to launch DevShell. <Enter> to quit: " if (-not $selected) { exit } $config = $configs | Where-Object { $_."#" -eq $selected } if ($config) { LaunchDevShell($config) } else { "Invalid selection: $selected" } } function Default{ Write-Verbose "No parameters passed to script. Trying VsInstallationPath." try { VsInstallationPath exit } catch { Write-Verbose "VsInstallationPath failed. Trying Latest." } Write-Host "Could not start Developer PowerShell using the script path." Write-Host "Attempting to launch from the latest Visual Studio installation." try { Latest exit } catch { Write-Verbose "Latest failed. Defaulting to List." } Write-Host "Could not start Developer PowerShell from the latest Visual Studio installation." Write-Host List } if ($PSCmdlet.ParameterSetName) { & (Get-ChildItem "Function:$($PSCmdlet.ParameterSetName)") exit } # SIG # Begin signature block # MIIoLAYJKoZIhvcNAQcCoIIoHTCCKBkCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB7cpavZzVzbDmR # tFRSbdabKCMPm0+YAH01FA8nFbex/KCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWR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DVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0Eg # MjAxMAITMwAAAecujy+TC08b6QABAAAB5zAiBCDlTymVgJ0Q4hctPwwjr3URthMm # ZLXDKwhIt4zuH3QPJzANBgkqhkiG9w0BAQsFAASCAgCybVNyg8Tv1iod3dvCStvU # GXgTTdgz7zAGphLWVD/pj2N+SnljMlJEkXyBp+QPdwboCYutnFZedjU2Dehk1g39 # MlqzI5n/I2y914RcDQ4tyLQBk6noY6TTZVtvVSm3GwwpHpfQ3rKjnthiHS5yDp4y # n6b3WJHy8ErDjRpYnhbCCLBsLUXK7QVT/Mec3AG8Lp5h8ByF1alsefD8W+DT2Vqo # tgW/1qievGaq0zFJ4CGvGRuqfBnTAhYK4EzoGiKPg+05/780W7QoAZdik5Lr4GqF # +nsJkyzFb0wQMqknIeNn3lSRG33pKt9x4BpxjTz7QRmsn+/lG0Eu3p5WqBZxhnIj # 8Wx/2GD2L0L44NRyOMZlzh8e2ren3wCR1Rj9+bHmCf9bi23Eo71LVo/0rMtNQf7v # bKNiA2Z3KcoK61781/5XbEuGrmEaWabIGzmMEDt9wEhnMrdnKgQQyX0FeaQMdaeJ # YQgJvqip0fu35SiV1Gi3rX+1L4oulC4WZSjnXOjOI9Bw3G3shDa/0eradXQo/5mC # T2RP7Ccy8bcq+RG8/723YZz6xybnhV6FrqRkXB+1oNaMNeUk05b20uJTPpPER09x # YYxIm5QztmiBbUJ4+boMD9mwWon60GYReGFmogF0oqYy5mSSvJk7kd5cYtlJgfCB # IlEvyugDvh2cWjTlTTFS4Q== # SIG # End signature block
combined_dataset/train/non-malicious/sample_30_91.ps1
sample_30_91.ps1
# # Module manifest for module 'Microsoft.SME.NetATC' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.NetATC.psm1' # Version number of this module. ModuleVersion = '3.6.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'c0b18f90-b97b-b1ba-2fa6-55fac376cce2' # Author of this module Author = 'SME' # Company or vendor of this module CompanyName = 'Microsoft' # Copyright statement for this module Copyright = '(c) 2018 Microsoft. All rights reserved.' # Description of the functionality provided by this module # Description = '' # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '5.0' # Name of the Windows PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the Windows PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # CLRVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module # RequiredModules = @() # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @( 'Get-ClusterNodes', 'Get-ClusterSites', 'Get-NetAdapterProperties', 'Get-NetIntentGlobalOverrides', 'Get-NetIntents', 'Get-NetIntentsStatuses', 'Get-NetworkDirectTechnology', 'Get-WindowsFeaturesInstalled', 'Install-Modules', 'Install-WindowsFeatures', 'Remove-NetIntents', 'Update-ClusterOverrides', 'Update-NetIntents', 'Update-ProxyOverrides', 'Get-CimWin32LogicalDisk', 'Get-CimWin32NetworkAdapter', 'Get-CimWin32PhysicalMemory', 'Get-CimWin32Processor', 'Get-ClusterInventory', 'Get-ClusterNodes', 'Get-DecryptedDataFromNode', 'Get-EncryptionJWKOnNode', 'Get-ServerInventory' ) # Function attributes: {"localScripts":["Get-ClusterNodes","Get-ClusterSites","Get-NetAdapterProperties","Get-NetIntentGlobalOverrides","Get-NetIntents","Get-NetIntentsStatuses","Get-NetworkDirectTechnology","Get-WindowsFeaturesInstalled","Install-Modules","Install-WindowsFeatures","Remove-NetIntents","Update-ClusterOverrides","Update-NetIntents","Update-ProxyOverrides"],"externalScripts":["Get-CimWin32LogicalDisk","Get-CimWin32NetworkAdapter","Get-CimWin32PhysicalMemory","Get-CimWin32Processor","Get-ClusterInventory","Get-ClusterNodes","Get-DecryptedDataFromNode","Get-EncryptionJWKOnNode","Get-ServerInventory"]} # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @() # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. # Tags = @() # A URL to the license for this module. # LicenseUri = '' # A URL to the main website for this project. # ProjectUri = '' # A URL to an icon representing this module. # IconUri = '' # ReleaseNotes of this module # ReleaseNotes = '' } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' } # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDav9YcvNvVD6qy # f0TBvOgLTmQf9lQ8Ad4MWW5R3w+5DaCCDXYwggX0MIID3KADAgECAhMzAAADTrU8 # esGEb+srAAAAAANOMA0GCSqGSIb3DQEB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3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw # MTACEzMAAAHXmw0eVy6MUY4AAQAAAdcwIgQgJjhI/Nys0MbNYyomgKyfjR3eHlix # /5elg6pKXneD538wDQYJKoZIhvcNAQELBQAEggIAhir8t1V4YUYN7CBr3+NPhW4L # XbnlqFsgYDzXqs4BT1yhufGVHFL0/wnYv9Vzcd6xXn6G+VibgpDz5HOPCPHxlfn0 # JIOEobhUfiXN6p2wpuKaOYY9BXqBx6P6N/qiVJwc//9tqEj+8+eWGKZVoukfQ3ma # 8vssqhN6RBr/HRZxGMXYVqeydeknrlgh80ZU3Forv3bD8qal+Q+UFeFbLQXKlk9E # DxcxZKbATsYyeiu6PSSMel0qM+yOQnA7ffCbSQi0i+KamYoge6AvEinhdmlkpFdI # 1RyqjPXqXmib2K2bQZdEZn20JJUmK/JqsjITKEoCWy5c6QT8cxEopdGUZDJUyeLr # FLmAHge1wa/7ocs3RivbGvFi2xIUjkix7nIDo+jwCKfNcnoRZ8SZUBVHzE2R3P/J # l96HwJSKG1oL/aSXznDeeW+PRzBC9VneCy+TSz2a7shRqJ9wnn5ax5+gja6ZsaoS # CIxnZ3bu4RoPWkq8eDjOI0EusEA1Kv1iCMgsfcDCDfGm0WDOAjsnUZOp2Dlk/8SP # Mes0fntZEKwG4Q7CeMmziszzQ3cL+ikE5HHIYIsNg3AnY8rmPPo3yihcLvE5oY7O # 6TUOUcB61nxEj/AI7zDEdXG0c68xOZq99kDQ+iKY9O6DGAgcysCXiISN5gK++jH4 # kt684zZ3BGMFLrDlXxw= # SIG # End signature block
combined_dataset/train/non-malicious/sample_67_15.ps1
sample_67_15.ps1
# Pipeline creates experimental msbuild insertions. trigger: none # Prevents this pipeline from triggering on check-ins pr: none # don't run this on PR as well parameters: # Dotnet installer channel from which to take the latest dotnet bits. - name: DotnetInstallerChannel displayName: Dotnet installer channel type: string default: 'none' # VS version for which to take the latest Retail MSBuild bits. - name: VSVersionName displayName: VS Version type: string default: 'none' # Branch from the MSBuild Build CI pipeline. Default: main # Top run for the branch would be used to create an experimental insertion. - name: MSBuildBranch displayName: MSBuild Branch type: string default: 'refs/heads/main' # BuildID from the MSBuild Build CI pipeline. Overrides the choice of MSBuildBranch parameter - name: MSBuildBuildID displayName: MSBuild CI Run Override type: string default: 'default' variables: - name: _MsBuildCiPipelineId value: 9434 - name: _MSBuildConfigFilePathRequestURL value: 'https://dev.azure.com/cloudbuild/CloudBuild/_apis/git/repositories/CloudBuildConfig/items?versionDescriptor.version=main&path=config/batmon/Q-Prod-Co3/Coordinator/ToolsReleaseConfig-GeneralPublic.json&api-version=5.0' - name: VSVersion value: ${{parameters.VSVersionName}} pool: vmImage: windows-latest jobs: - job: CreateExpDotnet displayName: Create Experimental Dotnet condition: ne('${{ parameters.DotnetInstallerChannel }}', 'none') steps: - powershell: | mkdir '$(System.ArtifactsDirectory)/installer' $dotnetChannel = '${{parameters.DotnetInstallerChannel}}' $sdks = "dotnet-sdk-win-x64.zip", "dotnet-sdk-linux-x64.tar.gz" foreach ($sdk in $sdks) { Write-Host "Downloading dotnet $sdk from channel $dotnetChannel" Invoke-WebRequest ` -Uri "https://aka.ms/dotnet/$dotnetChannel/daily/$sdk" ` -OutFile "$(System.ArtifactsDirectory)/installer/$sdk" } mkdir '$(Pipeline.Workspace)/artifacts' displayName: Download latest dotnet sdks - task: DownloadBuildArtifacts@1 inputs: buildType: specific project: DevDiv pipeline: $(_MsBuildCiPipelineId) ${{ if eq(parameters.MSBuildBuildID, 'default') }}: buildVersionToDownload: latestFromBranch branchName: '${{parameters.MSBuildBranch}}' ${{ else }}: buildVersionToDownload: specific buildId: ${{parameters.MSBuildBuildID}} artifactName: bin itemPattern: 'MSBuild.Bootstrap/**' downloadPath: '$(System.ArtifactsDirectory)/msbuild/artifacts/bin' displayName: Download msbuild artifacts - powershell: | $sdk = "dotnet-sdk-win-x64" Write-Host "Extracting $(System.ArtifactsDirectory)/installer/$sdk.zip" Expand-Archive "$(System.ArtifactsDirectory)/installer/$sdk.zip" -DestinationPath "$(Pipeline.Workspace)/exp-dotnet/$sdk" $dotnetDirectory = Get-ChildItem -Directory -Path "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk" $dotnetVersion = $dotnetDirectory.Name Write-Host "Detected dotnet version: $dotnetVersion" Write-Host "Updating MSBuild dlls." $(Build.SourcesDirectory)/scripts/Deploy-MSBuild.ps1 ` -destination "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk/$dotnetVersion" ` -binDirectory "$(System.ArtifactsDirectory)/msbuild/artifacts/bin" ` -configuration Release ` -makeBackup $false Write-Host "Compressing dotnet sdk files" Get-ChildItem -Path "$(Pipeline.Workspace)/exp-dotnet/$sdk" | Compress-Archive -DestinationPath "$(Pipeline.Workspace)/artifacts/$sdk.zip" displayName: Dogfood msbuild dlls to dotnet sdk win-x64 - powershell: | $sdk = "dotnet-sdk-linux-x64" mkdir "$(Pipeline.Workspace)/exp-dotnet/$sdk" Write-Host "Extracting $(System.ArtifactsDirectory)/installer/$sdk.tar.gz" tar -xzvf "$(System.ArtifactsDirectory)/installer/$sdk.tar.gz" -C "$(Pipeline.Workspace)/exp-dotnet/$sdk" $dotnetDirectory = Get-ChildItem -Directory -Path $(Pipeline.Workspace)/exp-dotnet/$sdk/sdk $dotnetVersion = $dotnetDirectory.Name Write-Host "Detected dotnet version: $dotnetVersion" Write-Host "Updating MSBuild dlls." $(Build.SourcesDirectory)/scripts/Deploy-MSBuild.ps1 ` -destination "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk/$dotnetVersion" ` -binDirectory "$(System.ArtifactsDirectory)/msbuild/artifacts/bin" ` -configuration Release ` -makeBackup $false Write-Host "Compressing dotnet sdk files" tar -czvf "$(Pipeline.Workspace)/artifacts/$sdk.tar.gz" -C "$(Pipeline.Workspace)/exp-dotnet/$sdk" . displayName: Dogfood msbuild dlls to dotnet sdk linux-x64 - task: PublishPipelineArtifact@1 inputs: targetPath: '$(Pipeline.Workspace)/artifacts' artifactName: ExperimentalDotnet parallel: true condition: always() displayName: Publish crank assests artifacts - job: CreateExpMSBuild displayName: "Create Experimental MSBuild" condition: ne('${{ parameters.VSVersionName }}', 'none') steps: - powershell: | $token = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("PAT:$env:ACCESSTOKEN")) $headers = @{ Authorization = "Basic $token" }; $response = Invoke-RestMethod -Uri "$(_MSBuildConfigFilePathRequestURL)" -Headers $headers -Method Get $MSBuildDropPath = $response.Tools.MSBuild.Locations Write-Host "##vso[task.setvariable variable=MSBuildDropPath]$MSBuildDropPath" Write-Host "MSBuild Drop Path directory: $MSBuildDropPath" displayName: Get Retail MSBuild Drop Path env: ACCESSTOKEN: $(cloudbuild-token) - task: NuGetToolInstaller@1 displayName: 'Install NuGet.exe' - task: NuGetCommand@2 displayName: Restore internal tools inputs: command: restore feedsToUse: config restoreSolution: '$(Build.SourcesDirectory)\eng\common\internal\Tools.csproj' nugetConfigPath: '$(Build.SourcesDirectory)\NuGet.config' restoreDirectory: '$(Build.SourcesDirectory)\.packages' - powershell: | mkdir "$(Pipeline.Workspace)/artifacts" $dropAppDirectory = Get-ChildItem -Directory -Path "$(Build.SourcesDirectory)/.packages/drop.app" $dropAppVersion = $dropAppDirectory.Name Write-Host "Detected drop.exe version: $dropAppVersion" $dropExePath = "$(Build.SourcesDirectory)/.packages/drop.app/$dropAppVersion/lib/net45/drop.exe" Write-Host "Detected drop.exe path: $dropExePath" Write-Host "Downloading VS msbuild" $patAuthEnvVar = "SYSTEM_ACCESSTOKEN" & "$dropExePath" get --patAuthEnvVar $patAuthEnvVar -u "$(MSBuildDropPath)\$(VSVersion)" -d "$(System.ArtifactsDirectory)/VSMSBuildDrop" Write-Host "Download of VS msbuild finished" Write-Host "Copying VS msbuild to $(Pipeline.Workspace)/VSMSBuild" Copy-Item -Path "$(System.ArtifactsDirectory)/VSMSBuildDrop/*" -Destination "$(Pipeline.Workspace)/VSMSBuild" -Recurse Write-Host "Copy of VS msbuild finished" displayName: Download msbuild vs drop env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - task: DownloadBuildArtifacts@1 inputs: buildType: specific project: DevDiv pipeline: $(_MsBuildCiPipelineId) ${{ if eq(parameters.MSBuildBuildID, 'default') }}: buildVersionToDownload: latestFromBranch branchName: '${{parameters.MSBuildBranch}}' ${{ else }}: buildVersionToDownload: specific buildId: ${{parameters.MSBuildBuildID}} artifactName: bin itemPattern: | MSBuild.Bootstrap/*/net472/** Microsoft.Build.Conversion/*/net472/Microsoft.Build.Conversion.Core.dll Microsoft.Build.Engine/*/net472/Microsoft.Build.Engine.dll MSBuildTaskHost/**/MSBuildTaskHost.exe MSBuildTaskHost/**/MSBuildTaskHost.pdb MSBuild/*/*/net472/MSBuild.exe* downloadPath: '$(System.ArtifactsDirectory)/msbuild/artifacts/bin' displayName: Download msbuild artifacts - powershell: | Write-Host "Updating MSBuild dlls." $(Build.SourcesDirectory)/scripts/Deploy-MSBuild.ps1 ` -destination "$(Pipeline.Workspace)/VSMSBuild/$(VSVersion)/MSBuild/Current/Bin" ` -binDirectory "$(System.ArtifactsDirectory)/msbuild/artifacts/bin" ` -configuration Release ` -makeBackup $false ls "$(Pipeline.Workspace)/VSMSBuild/$(VSVersion)" Write-Host "Compressing msbuild files" Get-ChildItem -Path "$(Pipeline.Workspace)/VSMSBuild/$(VSVersion)" | Compress-Archive -DestinationPath "$(Pipeline.Workspace)/artifacts/MSBuild.zip" displayName: Dogfood msbuild dlls - task: PublishPipelineArtifact@1 inputs: targetPath: '$(Pipeline.Workspace)/artifacts' artifactName: ExperimentalMSBuild parallel: true condition: always() displayName: Publish crank assests artifacts
combined_dataset/train/non-malicious/sample_7_39.ps1
sample_7_39.ps1
# Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 iesecurity_troubleshooter.psd1 ConvertFrom-StringData @' ###PSLOC Check_PhishingFilter=SmartScreen Filtre ayarları denetleniyor... Check_Blockpopups=Açılan Pencere Engelleyici denetleniyor... Check_IEsecuritysettings=Internet Explorer güvenlik ayarları denetleniyor... Report_name_IEsettings=Internet Explorer güvenlik ayarları Report_description_IEsettings=Internet Explorer bölge güvenliği ayarlarının listesi. keys=Bölge adı zone_name=Bölge adı protected_mode=Korumalı mod security_level=Güvenlik düzeyi non_default=Varsayılan dışı default=Varsayılan Message_IESecurityLevels=Güvenlik bölgeleri ayarları Grup İlkesi tarafından denetleniyor ve değiştirilemez. Report_name_IESecurityLevels=Güvenlik bölgeleri ayarları değiştirilemez Message_Phishingfilter=SmartScreen filtresi Grup İlkesi tarafından denetleniyor ve etkinleştirilemz ya da devredışı bırakılamaz. Report_name_Phishingfilter=SmartScreen filtresi ayarları değiştirilemez Message_Popupblocker=Açılır Pencere Engelleyeicisi Grup İlkesi tarafından denetleniyor ve etkinleştirilemez ya da devredışı bırakılamaz. Report_name_Popupblocker=Açılır Pencere Engelleyicisi ayarları değiştirilemez ###PSLOC '@
combined_dataset/train/non-malicious/sample_35_93.ps1
sample_35_93.ps1
# # Module manifest for module 'OCI.PSModules.Containerengine' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Containerengine.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'a2abf0e1-9176-4de5-88c9-38563bb69eee' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Containerengine Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Containerengine.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Complete-OCIContainerengineCredentialRotation', 'Disable-OCIContainerengineAddon', 'Get-OCIContainerengineAddon', 'Get-OCIContainerengineAddonOptionsList', 'Get-OCIContainerengineAddonsList', 'Get-OCIContainerengineCluster', 'Get-OCIContainerengineClusterMigrateToNativeVcnStatus', 'Get-OCIContainerengineClusterOptions', 'Get-OCIContainerengineClustersList', 'Get-OCIContainerengineCredentialRotationStatus', 'Get-OCIContainerengineNodePool', 'Get-OCIContainerengineNodePoolOptions', 'Get-OCIContainerengineNodePoolsList', 'Get-OCIContainerenginePodShapesList', 'Get-OCIContainerengineVirtualNode', 'Get-OCIContainerengineVirtualNodePool', 'Get-OCIContainerengineVirtualNodePoolsList', 'Get-OCIContainerengineVirtualNodesList', 'Get-OCIContainerengineWorkloadMapping', 'Get-OCIContainerengineWorkloadMappingsList', 'Get-OCIContainerengineWorkRequest', 'Get-OCIContainerengineWorkRequestErrorsList', 'Get-OCIContainerengineWorkRequestLogsList', 'Get-OCIContainerengineWorkRequestsList', 'Invoke-OCIContainerengineClusterMigrateToNativeVcn', 'Invoke-OCIContainerengineInstallAddon', 'New-OCIContainerengineCluster', 'New-OCIContainerengineKubeconfig', 'New-OCIContainerengineNodePool', 'New-OCIContainerengineVirtualNodePool', 'New-OCIContainerengineWorkloadMapping', 'Remove-OCIContainerengineCluster', 'Remove-OCIContainerengineNode', 'Remove-OCIContainerengineNodePool', 'Remove-OCIContainerengineVirtualNodePool', 'Remove-OCIContainerengineWorkloadMapping', 'Remove-OCIContainerengineWorkRequest', 'Start-OCIContainerengineCredentialRotation', 'Update-OCIContainerengineAddon', 'Update-OCIContainerengineCluster', 'Update-OCIContainerengineClusterEndpointConfig', 'Update-OCIContainerengineNodePool', 'Update-OCIContainerengineVirtualNodePool', 'Update-OCIContainerengineWorkloadMapping' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Containerengine' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/WhoAmI_1.ps1
WhoAmI_1.ps1
function whoami { [System.Security.Principal.WindowsIdentity]::GetCurrent().Name }
combined_dataset/train/non-malicious/sample_25_31.ps1
sample_25_31.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # 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 of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Remove a list of virtual network rules from a VolumeGroup .Description Remove a list of virtual network rules from a VolumeGroup .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.Api20221201Preview.VirtualNetworkRule[] .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. NETWORKACLSVIRTUALNETWORKRULE <IVirtualNetworkRule[]>: The list of virtual network rules. VirtualNetworkResourceId <String>: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. [Action <Action?>]: The action of virtual network rule. #> function Remove-AzElasticSanVolumeGroupNetworkRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.VirtualNetworkRule[]])] [CmdletBinding(DefaultParameterSetName='NetworkRuleObject', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='NetworkRuleObject', Mandatory)] [Parameter(ParameterSetName='NetworkRuleResourceId', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Path')] [System.String] # The name of the ElasticSan. ${ElasticSanName}, [Parameter(ParameterSetName='NetworkRuleObject', Mandatory)] [Parameter(ParameterSetName='NetworkRuleResourceId', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Path')] [System.String] # The name of the VolumeGroup. ${VolumeGroupName}, [Parameter(ParameterSetName='NetworkRuleObject', Mandatory)] [Parameter(ParameterSetName='NetworkRuleResourceId', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='NetworkRuleObject')] [Parameter(ParameterSetName='NetworkRuleResourceId')] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='NetworkRuleObject', Mandatory, ValueFromPipeline=$true)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IVirtualNetworkRule[]] # The list of virtual network rules. # To construct, see NOTES section for NETWORKACLSVIRTUALNETWORKRULE properties and create a hash table. ${NetworkAclsVirtualNetworkRule}, [Parameter(ParameterSetName='NetworkRuleResourceId', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')] [System.String[]] # The list of virtual network rule resource Ids. # To construct, see NOTES section for NETWORKACLSVIRTUALNETWORKRULE properties and create a hash table. ${NetworkAclsVirtualNetworkResourceId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) process { $NetworkRuleObjectParameterSet = "NetworkRuleObject" $updated = $false $rulesToRemove = $PSBoundParameters.NetworkAclsVirtualNetworkRule $resourceIds = $PSBoundParameters.NetworkAclsVirtualNetworkResourceId if ($PSBoundParameters.ContainsKey('NetworkAclsVirtualNetworkResourceId')) { $null = $PSBoundParameters.Remove('NetworkAclsVirtualNetworkResourceId') } if ($PSBoundParameters.ContainsKey('NetworkAclsVirtualNetworkRule')) { $null = $PSBoundParameters.Remove('NetworkAclsVirtualNetworkRule') } $PSBoundParameters.Add('ErrorAction', 'Stop') try { $volumeGroup = Az.ElasticSan\Get-AzElasticSanVolumeGroup @PSBoundParameters } catch { Write-Error $_.Exception return } $originalRules = [System.Collections.Generic.List[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IVirtualNetworkRule]]$volumeGroup.NetworkAclsVirtualNetworkRule if ($originalRules.count -eq 0) { $originalRules = New-Object System.Collections.Generic.List[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IVirtualNetworkRule] } switch ($PSCmdlet.ParameterSetName) { $NetworkRuleObjectParameterSet { foreach ($ruleToRemove in $rulesToRemove) { $removed = $false foreach ($rule in $originalRules) { if ($rule.VirtualNetworkResourceId -eq $ruleToRemove.VirtualNetworkResourceId) { $updated = $true $null = $originalRules.Remove($rule) $removed = $true break } } if (-not $removed) { Write-Error "Cannot remove the specific VirtualNetworkRule as it doesn't exist: $($ruleToRemove.VirtualNetworkResourceId)" } } break } Default { foreach ($resourceId in $resourceIds) { $removed = $false foreach ($rule in $originalRules) { if ($rule.VirtualNetworkResourceId -eq $resourceId) { $updated = $true $null = $originalRules.Remove($rule) $removed = $true break } } if (-not $removed) { Write-Error "Cannot remove the specific VirtualNetworkRule as it doesn't exist: $($resourceId)" } } } } if ($updated) { try { $PSBoundParameters.Add('NetworkAclsVirtualNetworkRule', $originalRules.ToArray()) $updatedVolumeGroup = Az.ElasticSan\Update-AzElasticSanVolumeGroup @PSBoundParameters } catch { Write-Error $_.Exception return } } Write-Output($originalRules) } } # SIG # Begin signature block # MIInwgYJKoZIhvcNAQcCoIInszCCJ68CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNL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oaW5ndG9u # MRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRp # b24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB # 49+9m5ocaIMiAAEAAAHjMCIEIAjbaHNr0MEVS4sdIKFzDEisoKgKMPqA12+DiwHa # 14RcMA0GCSqGSIb3DQEBCwUABIICAIMUGB/xZbegRJUJiSFYh4yx/gpZTn3XeAJI # 8otePe/gA+Bwv0VHgYFd1ubHSc6sV0F0QuebISGNPLQAb7kYWY1aBC/bGsJE9j4+ # jNnmNXQQKojZ3TMgDOXBtiH/XxZGyvZIjJ0GFMt35TjcJ3Y+wtLxfmqatnJZlkS8 # /BTBNAw8kAl/GTcirCC55SvJ8pho+CgftNE9nzDtYgN8wQORsojScSs1qjJr42GX # hwKB1UzummjDXoqJrN/8Mr+1E3/kHVTqGcXOHNv29f/qGZZiiCCARKh8diGLpTj3 # BhfXM7jTfFoVrW1TGBFBjaRsCeqxlfaBfbJPpIfBPi9vUgm5vTitKGYITQupQSsX # SKe1Hs+9HukXQIpOF+jP2SVz0QEbwHj1u5umwUWz6gDCzPB1oF4HGmk7dRYG/dyj # PGjiWt1tsXr1LbkR2lLjIJIJqzMFr42KC6CngDWUx7J+4UH/Ce6U0xYMW863sfVk # wKWPs+YaELBCDtDRyFwAwqYtCifRKiBy+IRTe0d9LOExyoyIi/4541HAPTcPmQ06 # fcoB/RcP2RPM5IIBQOsn7JByNDmwzM2qRJ5cMg8G8xmhmWpYpKwHqZCyw3q3Chdj # seTYM8K/s4iCzWR/Ug5QFFXnbcsoZcdcjkXSgcJUUMuuk4LtX63jdPLyZRd0R7TI # QMY/ubvI # SIG # End signature block
combined_dataset/train/non-malicious/sample_20_37.ps1
sample_20_37.ps1
# # Module manifest for module 'OCI.PSModules.Objectstorage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Objectstorage.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '2d17e379-676f-4800-9582-5814d9a8df00' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Objectstorage Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '74.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Objectstorage.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Copy-OCIObjectstorageObject', 'Get-OCIObjectstorageBucket', 'Get-OCIObjectstorageBucketsList', 'Get-OCIObjectstorageMultipartUploadPartsList', 'Get-OCIObjectstorageMultipartUploadsList', 'Get-OCIObjectstorageNamespace', 'Get-OCIObjectstorageNamespaceMetadata', 'Get-OCIObjectstorageObject', 'Get-OCIObjectstorageObjectLifecyclePolicy', 'Get-OCIObjectstorageObjectsList', 'Get-OCIObjectstorageObjectVersionsList', 'Get-OCIObjectstoragePreauthenticatedRequest', 'Get-OCIObjectstoragePreauthenticatedRequestsList', 'Get-OCIObjectstorageReplicationPoliciesList', 'Get-OCIObjectstorageReplicationPolicy', 'Get-OCIObjectstorageReplicationSourcesList', 'Get-OCIObjectstorageRetentionRule', 'Get-OCIObjectstorageRetentionRulesList', 'Get-OCIObjectstorageWorkRequest', 'Get-OCIObjectstorageWorkRequestErrorsList', 'Get-OCIObjectstorageWorkRequestLogsList', 'Get-OCIObjectstorageWorkRequestsList', 'Invoke-OCIObjectstorageCommitMultipartUpload', 'Invoke-OCIObjectstorageHeadBucket', 'Invoke-OCIObjectstorageHeadObject', 'Invoke-OCIObjectstorageMakeBucketWritable', 'Invoke-OCIObjectstorageReencryptBucket', 'Invoke-OCIObjectstorageReencryptObject', 'New-OCIObjectstorageBucket', 'New-OCIObjectstorageMultipartUpload', 'New-OCIObjectstoragePreauthenticatedRequest', 'New-OCIObjectstorageReplicationPolicy', 'New-OCIObjectstorageRetentionRule', 'Remove-OCIObjectstorageBucket', 'Remove-OCIObjectstorageObject', 'Remove-OCIObjectstorageObjectLifecyclePolicy', 'Remove-OCIObjectstoragePreauthenticatedRequest', 'Remove-OCIObjectstorageReplicationPolicy', 'Remove-OCIObjectstorageRetentionRule', 'Rename-OCIObjectstorageObject', 'Restore-OCIObjectstorageObjects', 'Stop-OCIObjectstorageMultipartUpload', 'Stop-OCIObjectstorageWorkRequest', 'Update-OCIObjectstorageBucket', 'Update-OCIObjectstorageNamespaceMetadata', 'Update-OCIObjectstorageRetentionRule', 'Update-OCIObjectstorageTier', 'Write-OCIObjectstorageObject', 'Write-OCIObjectstorageObjectLifecyclePolicy', 'Write-OCIObjectstoragePart', 'Write-OCIObjectstorageuploadmanagerObject' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Objectstorage' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
combined_dataset/train/non-malicious/Findup_22.ps1
Findup_22.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System.Text.RegularExpressions; namespace Findup { public class FileLengthComparer : IComparer<FileInfo> { public int Compare(FileInfo x, FileInfo y) { return (x.Length.CompareTo(y.Length)); } } class Findup { public static Dictionary<string, List<string>> optionspaths = new Dictionary<string, List<string>> { {"-x", new List<string>()},{"-i",new List<string>()},{"-xf",new List<string>()},{"-if",new List<string>()}, {"-xd",new List<string>()},{"-id",new List<string>()},{"-paths",new List<string>()} }; public static Dictionary<string, List<Regex>> optionsregex = new Dictionary<string, List<Regex>> { {"-xr", new List<Regex>()},{"-ir",new List<Regex>()},{"-xfr",new List<Regex>()},{"-ifr",new List<Regex>()}, {"-xdr",new List<Regex>()},{"-idr",new List<Regex>()} }; public static Dictionary<string, Boolean> optionsbools = new Dictionary<string, bool> { { "-recurse", false }, { "-noerr", false }, {"-delete",false} }; public static long numOfDupes, dupeBytes, bytesrecovered, deletedfiles = 0; // number of duplicate files foumd, bytes in duplicates, bytes recovered from deleting dupes, number of deleted dupes. public static string delconfirm; public static void Main(string[] args) { DateTime startTime = DateTime.Now; Console.WriteLine("Findup.exe v2.0 - By James Gentile - JamesRaymondGentile@gmail.com - 2012."); Console.WriteLine("Findup.exe matches sizes, then SHA512 hashes to identify duplicate files."); Console.WriteLine(" "); string optionskey = "-paths"; List<FileInfo> files = new List<FileInfo>(); int i = 0; for (i = 0; i < args.Length; i++) { string argitem=args[i].ToLower(); if ((System.String.Compare(argitem, "-help", true) == 0) || (System.String.Compare(argitem, "-h", true) == 0)) { Console.WriteLine("Usage: findup.exe <file/directory #1..#N> [-recurse] [-noerr] [-x/-i/-xd/-id/-xf/-if] <files/directories/regex> [-regex] [-delete]"); Console.WriteLine(" "); Console.WriteLine("Options: -help - displays this help message."); Console.WriteLine(" -recurse - recurses through subdirectories when directories or file specifications (e.g. *.txt) are specified."); Console.WriteLine(" -noerr - discards error messages."); Console.WriteLine(" -delete - delete each duplicate file with confirmation."); Console.WriteLine(" -x - eXcludes if full file path starts with (or RegEx matches if -xr) one of the items following this switch until another switch is used."); Console.WriteLine(" -i - include if full file path starts with (or Regex matches if -ir) one of the items following this switch until another switch is used."); Console.WriteLine(" -xd - eXcludes all directories (using RegEx if -xdr) including subdirs following this switch until another switch is used."); Console.WriteLine(" -id - Include only directories (using RegEx if -idr) including subdirs following this switch until another switch is used."); Console.WriteLine(" -xf - eXcludes all files (using RegEx if -xfr) following this switch until another switch is used."); Console.WriteLine(" -if - Include only files (using RegEx if -ifr) following this switch until another switch is used."); Console.WriteLine(" [r] - Use regex for include/exclude by appending an 'r' to the option, e.g. -ir, -ifr, -idr, -xr, -xfr, -xdr."); Console.WriteLine(" -paths - not needed unless you want to specify files/dirs after an include/exclude without using another non-exclude/non-include option."); Console.WriteLine(" "); Console.WriteLine("Examples: findup.exe c:\\\\finances -recurse -noerr"); Console.WriteLine(" - Find dupes in c:\\\\finance."); Console.WriteLine(" - recurse all subdirs of c:\\\\finance."); Console.WriteLine(" - suppress error messages."); Console.WriteLine(" findup.exe c:\\\\users\\\\alice\\\\plan.txt d:\\\\data -recurse -x d:\\\\data\\\\webpics"); Console.WriteLine(" - Find dupes in c:\\\\users\\\\alice\\\\plan.txt, d:\\\\data"); Console.WriteLine(" - recurse subdirs in d:\\\\data."); Console.WriteLine(" - exclude any files in d:\\\\data\\\\webpics and subdirs."); Console.WriteLine(" findup.exe c:\\\\data *.txt c:\\\\reports\\\\quarter.doc -xr \\"(jim)\\" -regex"); Console.WriteLine(" - Find dupes in c:\\\\data, *.txt in current directory and c:\\\\reports\\\\quarter.doc"); Console.WriteLine(" - exclude any file with 'jim' in the name as specified by the Regex item \\"(jim)\\""); Console.WriteLine(" findup.exe c:\\\\data *.txt c:\\\\reports\\\\*quarter.doc -xr \\"[bf]\\" -ir \\"(smith)\\" -regex"); Console.WriteLine(" - Find dupes in c:\\\\data, *.txt in current directory and c:\\\\reports\\\\*quarter.doc"); Console.WriteLine(" - Include only files with 'smith' and exclude any file with letters b or f in the name as specified by the Regex items \\"[bf]\\",\\"(smith)\\""); Console.WriteLine("Note: Exclude takes precedence over Include."); Console.WriteLine(" -xdr,-idr,-xfr,-ifr are useful if for instance you want to apply a RegEx to only file names but not directory names or vice versa."); Console.WriteLine(" if for instance you wanted all files that contained the letter \\"d\\" on your D: drive but didn't want the d:\\\\ to cause all files on the d:\\\\ "); Console.WriteLine(" drive to be included, you would specify:"); Console.WriteLine(" findup.exe d:\\\\ -recurse -noerr -regex -ifr \\"[d]\\" "); return; } if (optionsbools.ContainsKey(argitem)) { optionsbools[argitem] = true; optionskey = "-paths"; continue; } if (optionspaths.ContainsKey(argitem) || optionsregex.ContainsKey(argitem)) { optionskey = argitem; continue; } if (optionspaths.ContainsKey(optionskey)) optionspaths[optionskey].Add(argitem); else { try { Regex rgx = new Regex(argitem, RegexOptions.Compiled); optionsregex[optionskey].Add(rgx); } catch (Exception e) {WriteErr("Regex compilation failed: " + e.Message);} } } if (optionspaths["-paths"].Count == 0) { WriteErr("No files, file specifications, or directories specified. Try findup.exe -help. Assuming current directory."); optionspaths["-paths"].Add("."); } Console.Write("Getting file info and sorting file list..."); getFiles(optionspaths["-paths"], "*.*", optionsbools["-recurse"], files); if (files.Count < 2) { WriteErr("\\nFindup.exe needs at least 2 files to compare. Try findup.exe -help"); return; } files.Sort(new FileLengthComparer()); Console.WriteLine("Completed!"); Console.Write("Building dictionary of file sizes, SHA512 hashes and full paths..."); var SizeHashName = new Dictionary<long, Dictionary<string,List<FileInfo>>>(); for (i = 0; i < (files.Count - 1); i++) { if (files[i].Length != files[i + 1].Length) { continue; } var breakout = false; while (true) { try { var _SHA512 = SHA512.Create(); using (var fstream = File.OpenRead(files[i].FullName)) { _SHA512.ComputeHash(fstream); } string SHA512string = ""; foreach (var c in _SHA512.Hash) { SHA512string += String.Format("{0:x2}", c); } if (!SizeHashName.ContainsKey(files[i].Length)) SizeHashName.Add(files[i].Length, new Dictionary<string,List<FileInfo>>()); if (!SizeHashName[files[i].Length].ContainsKey(SHA512string)) SizeHashName[files[i].Length][SHA512string] = new List<FileInfo>() {}; SizeHashName[files[i].Length][SHA512string].Add(files[i]); } catch (Exception e) { WriteErr("Hash error: " + e.Message); } if (breakout == true) {break;} i++; if (i == (files.Count - 1)) { breakout = true; continue; } breakout = (files[i].Length != files[i + 1].Length); } } Console.WriteLine("Completed!"); foreach (var SizeGroup in SizeHashName) { foreach (var HashGroup in SizeGroup.Value) { var SGK = (long)SizeGroup.Key; var HGVC = (long)HashGroup.Value.Count; if (HGVC > 1) { Console.WriteLine("{0:N0} Duplicate files. {1:N0} Bytes each. {2:N0} Bytes total : ", HGVC, SGK, SGK*HGVC); foreach (var Filenfo in HashGroup.Value) { Console.WriteLine(Filenfo.FullName); numOfDupes++; dupeBytes += Filenfo.Length; if (optionsbools["-delete"]) if (DeleteDupe(Filenfo)) { bytesrecovered += Filenfo.Length; } } } } } Console.WriteLine("\\n "); Console.WriteLine("Files checked : {0:N0}", files.Count); // display statistics and return to OS. Console.WriteLine("Duplicate files : {0:N0}", numOfDupes); Console.WriteLine("Duplicate bytes : {0:N0}", dupeBytes); Console.WriteLine("Deleted duplicates : {0:N0}", deletedfiles); Console.WriteLine("Bytes recovered : {0:N0}", bytesrecovered); Console.WriteLine("Execution time : " + (DateTime.Now - startTime)); } private static void WriteErr(string Str) { if (!optionsbools["-noerr"]) Console.WriteLine(Str); } private static Boolean DeleteDupe(FileInfo Filenfo) { Console.Write("Delete this file <y/N> <ENTER>?"); delconfirm = Console.ReadLine(); if ((delconfirm[0] == 'Y') || (delconfirm[0] == 'y')) { try { Filenfo.Delete(); Console.WriteLine("File Successfully deleted."); deletedfiles++; return true; } catch (Exception e) { Console.WriteLine("File could not be deleted: " + e.Message); } } return false; } private static Boolean CheckNames(string fullname) { var filePart = Path.GetFileName(fullname); var dirPart = Path.GetDirectoryName(fullname); if (CheckNamesWorker(fullname,"-x")) return false; if (CheckNamesWorker(filePart,"-xf")) return false; if (CheckNamesWorker(dirPart,"-xd")) return false; if (!CheckNamesWorker(fullname,"-i")) return false; if (!CheckNamesWorker(filePart,"-if")) return false; if (!CheckNamesWorker(dirPart,"-id")) return false; return true; } private static Boolean CheckNamesWorker(string filestr, string key) { foreach (var filepath in optionspaths[key]) { if (filestr.ToLower().StartsWith(filepath)) return true; } foreach (var rgx in optionsregex[key+"r"]) { if (rgx.IsMatch(filestr)) return true; } return (key[1] == 'i' && optionspaths[key].Count == 0 && optionsregex[key + "r"].Count == 0); // If checking [i]ncludes, return true if 0 paths/regex to check, else false } private static void getFiles(List<string> pathRec, string searchPattern, Boolean recursiveFlag, List<FileInfo> returnList) { foreach (string d in pathRec) { getFiles(d, searchPattern, recursiveFlag, returnList); } } private static void getFiles(string[] pathRec, string searchPattern, Boolean recursiveFlag, List<FileInfo> returnList) { foreach (string d in pathRec) { getFiles(d, searchPattern, recursiveFlag, returnList); } } private static void getFiles(string pathRec, string searchPattern, Boolean recursiveFlag, List<FileInfo> returnList) { string dirPart; string filePart; if (File.Exists(pathRec)) { try { FileInfo addf = (new FileInfo(pathRec)); if (((addf.Attributes & FileAttributes.ReparsePoint) == 0) && CheckNames(addf.FullName)) returnList.Add(addf); } catch (Exception e) { WriteErr("Add file error: " + e.Message); } } else if (Directory.Exists(pathRec)) { try { DirectoryInfo Dir = new DirectoryInfo(pathRec); foreach (FileInfo addf in (Dir.GetFiles(searchPattern))) { if (((addf.Attributes & FileAttributes.ReparsePoint) == 0) && CheckNames(addf.FullName)) returnList.Add(addf); } } catch (Exception e) { WriteErr("Add files from Directory error: " + e.Message); } if (recursiveFlag) { try { getFiles((Directory.GetDirectories(pathRec)), searchPattern, recursiveFlag, returnList); } catch (Exception e) { WriteErr("Add Directory error: " + e.Message); } } } else { try { filePart = Path.GetFileName(pathRec); dirPart = Path.GetDirectoryName(pathRec); } catch (Exception e) { WriteErr("Parse error on: " + pathRec); WriteErr(@"Make sure you don't end a directory with a \\ when using quotes. The console arg parser doesn't accept that."); WriteErr("Exception: " + e.Message); return; } if (filePart.IndexOfAny(new char[] {'?','*'}) >= 0) { if ((dirPart == null) || (dirPart == "")) dirPart = Directory.GetCurrentDirectory(); if (Directory.Exists(dirPart)) { getFiles(dirPart, filePart, recursiveFlag, returnList); return; } } WriteErr("Invalid file path, directory path, file specification, or program option specified: " + pathRec); } } } }
combined_dataset/train/non-malicious/3899.ps1
3899.ps1
function Test-PoolCRUD { $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $poolId1 = "pool1" $poolId2 = "pool2" try { $osFamily = "4" $targetOSVersion = "*" $targetDedicated = 0 $vmSize = "small" $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) New-AzBatchPool $poolId1 -CloudServiceConfiguration $paasConfiguration -TargetDedicated $targetDedicated -VirtualMachineSize $vmSize -BatchContext $context $vmSize = "standard_a1" $publisher = "Canonical" $offer = "UbuntuServer" $osSKU = "16.04.0-LTS" $nodeAgent = "batch.node.ubuntu 16.04" $imageRef = New-Object Microsoft.Azure.Commands.Batch.Models.PSImageReference -ArgumentList @($offer, $publisher, $osSKU) $iaasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration -ArgumentList @($imageRef, $nodeAgent) New-AzBatchPool $poolId2 -VirtualMachineConfiguration $iaasConfiguration -TargetDedicated $targetDedicated -VirtualMachineSize $vmSize -BatchContext $context $pools = Get-AzBatchPool -Filter "id eq '$poolId1' or id eq '$poolId2'" -BatchContext $context $pool1 = $pools | Where-Object { $_.Id -eq $poolId1 } $pool2 = $pools | Where-Object { $_.Id -eq $poolId2 } Assert-NotNull $pool1 Assert-NotNull $pool2 $startTaskCmd = "/bin/bash -c 'echo start task'" $startTask = New-Object Microsoft.Azure.Commands.Batch.Models.PSStartTask -ArgumentList @($startTaskCmd) $pool2.StartTask = $startTask $pool2 | Set-AzBatchPool -BatchContext $context $updatedPool = Get-AzBatchPool $poolId2 -BatchContext $context Assert-AreEqual $startTaskCmd $updatedPool.StartTask.CommandLine } finally { Remove-AzBatchPool -Id $poolId1 -Force -BatchContext $context Remove-AzBatchPool -Id $poolId2 -Force -BatchContext $context foreach ($p in Get-AzBatchPool -BatchContext $context) { Assert-True { ($p.Id -ne $poolId1 -and $p.Id -ne $poolId2) -or ($p.State.ToString().ToLower() -eq 'deleting') } } } } function Test-ResizeAndStopResizePool { param([string]$poolId) $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $pool = Get-AzBatchPool -Id $poolId -BatchContext $context $initialTargetDedicated = $pool.TargetDedicatedComputeNodes $newTargetDedicated = $initialTargetDedicated + 1 Start-AzBatchPoolResize -Id $poolId -TargetDedicatedComputeNodes $newTargetDedicated -BatchContext $context $pool = Get-AzBatchPool -Id $poolId -BatchContext $context Assert-AreEqual $newTargetDedicated $pool.TargetDedicatedComputeNodes $pool | Stop-AzBatchPoolResize -BatchContext $context $pool = Get-AzBatchPool -Id $poolId -BatchContext $context Assert-AreEqual 'Stopping' $pool.AllocationState } function Test-AutoScaleActions { param([string]$poolId) $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $formula = '$TargetDedicatedNodes=0' $interval = ([TimeSpan]::FromMinutes(8)) $pool = Get-AzBatchPool $poolId -BatchContext $context Assert-False { $pool.AutoScaleEnabled } $pool | Enable-AzBatchAutoScale -AutoScaleFormula $formula -AutoScaleEvaluationInterval $interval -BatchContext $context $pool = Get-AzBatchPool -Filter "id eq '$poolId'" -BatchContext $context Assert-True { $pool.AutoScaleEnabled } Assert-AreEqual $interval $pool.AutoScaleEvaluationInterval $testFormula = '$TargetDedicatedNodes=1' $evalResult = Test-AzBatchAutoScale $poolId $testFormula -BatchContext $context Assert-True { $evalResult.Results.Contains($testFormula) } $pool | Disable-AzBatchAutoScale -BatchContext $context $pool = Get-AzBatchPool $poolId -BatchContext $context Assert-False { $pool.AutoScaleEnabled } } function Test-ChangeOSVersion { param([string]$poolId, [string]$specificOSVersion) $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $pool = Get-AzBatchPool $poolId -BatchContext $context Assert-AreNotEqual $specificOSVersion $pool.CloudServiceConfiguration.TargetOSVersion $pool | Set-AzBatchPoolOSVersion -TargetOSVersion $specificOSVersion -BatchContext $context $pool = Get-AzBatchPool $poolId -BatchContext $context Assert-AreEqual $specificOSVersion $pool.CloudServiceConfiguration.TargetOSVersion }