full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-JS.ps1 | Out-JS.ps1 | function Out-JS
{
<#
.SYNOPSIS
Nishang script useful for creating "weaponized" JavaScript file which could be used to run PowerShell commands and scripts.
.DESCRIPTION
The script generates a JavaScript file. The JavaScript file (default name Style.js) needs to be sent to a target.
As soon as a target user ope... |
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-Shortcut.ps1 | Out-Shortcut.ps1 |
function Out-Shortcut
{
<#
.SYNOPSIS
Nishang script which creates a shortcut capable of launching PowerShell commands and scripts.
.DESCRIPTION
The script generates a shortcut (.lnk). When a target opens the shortcut, the predefined powershell scripts and/or commands get executed.
A hotkey for the shortcut c... |
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-Word.ps1 | Out-Word.ps1 | function Out-Word
{
<#
.SYNOPSIS
Nishang Script which can generate as well as "infect" existing word files with an auto executable macro.
.DESCRIPTION
The script can create as well as "infect" existing word files with an auto executable macro. Powershell payloads
could be exeucted using the genereated files. ... |
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-SCT.ps1 | Out-SCT.ps1 | function Out-SCT
{
<#
.SYNOPSIS
Nishang script useful for creating "weaponized" SCT files which could be used to run PowerShell commands and scripts.
.DESCRIPTION
The script generates a SCT file with an XML extension. The file (default name UpdateCheck.xml) needs to be
hosted on a web server and using regsvr3... |
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-SCF.ps1 | Out-SCF.ps1 | function Out-SCF
{
<#
.SYNOPSIS
Nishang script useful for creating SCF files which could be used to capture NTLM hashes.
.DESCRIPTION
The script generates a SCF file. The file (default name "SystemCatalog.scf") needs to be
put on a share. Whenever a user opens the file on the share, his credentials are sent t... |
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-CHM.ps1 | Out-CHM.ps1 |
function Out-CHM
{
<#
.SYNOPSIS
Nishang script useful for creating Compiled HTML Help file (.CHM) which could be used to run PowerShell commands and scripts.
.DESCRIPTION
The script generates a CHM file which needs to be sent to a target.
You must have hhc.exe (HTML Help Workshop) on your machine to use th... |
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-Excel.ps1 | Out-Excel.ps1 |
function Out-Excel
{
<#
.SYNOPSIS
Nishang Script which can generate and "infect" existing excel files with an auto executable macro.
.DESCRIPTION
The script can create as well as "infect" existing excel files with an auto executable macro. Powershell payloads
could be exeucted using the genereated files. ... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/jQuery.UI.Combined.1.8.24/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $juiFileNameRegEx ... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/jQuery.UI.Combined.1.8.24/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/jQuery.1.8.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/jQuery.1.8.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/kneuse_MVC.Net-SampleApp/MVC.Net/packages/jQuery.1.8.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/EntityFramework.6.0.0-rc1/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/EntityFramework.6.0.0-rc1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/jQuery.1.8.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/jQuery.1.8.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/jweisman_MyAlmaLibrary/packages/jQuery.1.8.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/imsanjeev4_AzureResourceGroup1/AzureResourceGroup1/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'AzureResourceGroup1',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageCon... |
PowerShellCorpus/Github/imsanjeev4_AzureResourceGroup1/AzureResourceGroup1/RSVaultAutomate/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'RSVaultAutomate',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageContain... |
PowerShellCorpus/Github/imsanjeev4_AzureResourceGroup1/AzureResourceGroup1/Sanjeev/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'SanjeevTest',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageContainerNa... |
PowerShellCorpus/Github/adampie_dotfiles/Windows/SETUP-WINDOWS.ps1 | SETUP-WINDOWS.ps1 | # My edited version @adampie
##################################################
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
##########
# Ask for elevated permissions if required
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIde... |
PowerShellCorpus/Github/beneth86_Windows-Build-Scripts/build-serverpostreboot.ps1 | build-serverpostreboot.ps1 | # Set up and start logging
function Start-Log {
param(
[string]$sessName
)
try {Stop-Transcript} catch {}
$filename = (Get-Date).ToString('MMddyyyyhhmmss');
if ([System.String]::IsNullOrEmpty($sessName)){
Start-Transcript -Path "$PSScriptRoot\$filename.txt" -NoClobb... |
PowerShellCorpus/Github/beneth86_Windows-Build-Scripts/build-server.ps1 | build-server.ps1 | function Start-Log {
param(
[string]$sessName
)
try {Stop-Transcript} catch {}
$filename = (Get-Date).ToString('MMddyyyyhhmmss');
if ([System.String]::IsNullOrEmpty($sessName)){
Start-Transcript -Path "$PSScriptRoot\$filename.txt" -NoClobber
}
else {
... |
PowerShellCorpus/Github/cdhgee_sharepoint2013-tools/Get-EnabledFeature.ps1 | Get-EnabledFeature.ps1 | <#
.SYNOPSIS
Lists each site collection within the specified web application and the status of the specified feature for each.
.PARAMETER WebApplication
The full URL of the web application.
.PARAMETER Feature
The site-collection scoped feature, specified either as a feature name or GUID.
.NOT... |
PowerShellCorpus/Github/cdhgee_sharepoint2013-tools/Publish-AllFiles.ps1 | Publish-AllFiles.ps1 | <#
.SYNOPSIS
Publishes multiple files in the specified SharePoint folder.
.PARAMETER Url
The full URL of the SharePoint site or sub-site.
.PARAMETER Folder
The path to the folder containing the files to publish, relative to the Url parameter.
.PARAMETER Comment
An optional comment to pro... |
PowerShellCorpus/Github/cdhgee_sharepoint2013-tools/Disable-SPDesigner.ps1 | Disable-SPDesigner.ps1 | <#
.SYNOPSIS
Disables SharePoint designer and other related settings for the specified web application.
.PARAMETER WebApplication
The full URL of the SharePoint web application.
.DESCRIPTION
Disables SharePoint designer, as well as the following related SPD settings: managing site URL structure,... |
PowerShellCorpus/Github/haidouks_powershell/highCharts.ps1 | highCharts.ps1 | function highChart_SplitLines($title,$subtitle,$categories,$series,$metric,$toolTip,$outputPath)
{
$html = @"
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="C:\temp\jquery-3.1.1.min.js"></script>
<script type='text/javascript'>//<![CDATA[
`$(function () {
Highcharts.chart('container'... |
PowerShellCorpus/Github/haidouks_powershell/RelationalDBOps.ps1 | RelationalDBOps.ps1 | function select-Oracle
{
[CmdletBinding()]
Param(
[Parameter(Position=0,Mandatory=$true)]
[string]$connStr,
[Parameter(Position=1,Mandatory=$true)]
[string]$query
)
try
{
Add-Type -Path "C:\oracle\ODP.NET_Managed121012\odp.net\managed\common\Oracle.ManagedDataAcces... |
PowerShellCorpus/Github/haidouks_powershell/workflows/CheckHttpCodes.ps1 | CheckHttpCodes.ps1 | workflow HttpCodeCheck-Parallelism
{
Param([string[]]$urls, [int]$threads, [int]$delay)
foreach -Parallel -throttlelimit $threads ($url in $urls)
{
InlineScript{
try {
$statusCode = (Invoke-WebRequest -Uri $using:url -TimeoutSec $using:delay -UseBasicParsing -ErrorAction SilentlyContinu... |
PowerShellCorpus/Github/haidouks_powershell/DSC/ServerLevelProvisioning.ps1 | ServerLevelProvisioning.ps1 | configuration InstallWebServer
{
Import-DscResource -ModuleName 'PSDesiredStateConfiguration'
node "localhost"
{
WindowsFeature IIS
{
Ensure = "Present"
Name = "Web-Server"
IncludeAllSubFeature = $true
}
... |
PowerShellCorpus/Github/haidouks_powershell/DSC/ApplicationLevelProvisioning.ps1 | ApplicationLevelProvisioning.ps1 | Configuration ProvisionAppEnv
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -ModuleName xWebAdministration -ModuleVersion "1.15.0.0"
Node "localhost"
{
# Create a Web Application Pool
$appPoolName = $OctopusParameters['DSC__WebSite__ApplicationP... |
PowerShellCorpus/Github/haidouks_powershell/DSC/EnsureConfig.ps1 | EnsureConfig.ps1 | Configuration changeConfig
{
Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
Node "localhost"
{
foreach($key in ($OctopusParameters.keys | ? {$_ -like "DSC__Config__NodePath*"} ))
{
$attributeName = $OctopusParameters[$key].Split('>')[-1]
wr... |
PowerShellCorpus/Github/haidouks_powershell/ADOperations/ResetADPassword.ps1 | ResetADPassword.ps1 | $email=$env:email
$verbose=[System.Convert]::ToBoolean($env:details)
$user=$env:BUILD_USER
$password=$env:password
$sendMail=[System.Convert]::ToBoolean($env:sendMail)
$env:ADPS_LoadDefaultDrive = 0
$PSModuleAutoloadingPreference = “none”
import-module ActiveDirectory -Cmdlet Get-ADUser,Unlock-ADAccount,Set-ADAc... |
PowerShellCorpus/Github/haidouks_powershell/ADOperations/AddUserToADGroup.ps1 | AddUserToADGroup.ps1 | #set jenkins parameters
$emailAdd=$env:emailAdd
$groups=$env:groups
$info=[System.Convert]::ToBoolean($env:details)
$user=$env:BUILD_USER
$sendMail=[System.Convert]::ToBoolean($env:sendMail)
Write-Verbose "----------------------PARAMETERS----------------------" -verbose:$info
Write-Verbose "groups:$groups"... |
PowerShellCorpus/Github/haidouks_powershell/IIS/CI_CDSupp.ps1 | CI_CDSupp.ps1 | function Wait-NoReqForWebSite($siteName,$maxSec,[switch]$verbose)
{
$secCounter = 0
write-verbose -Message "importing webadministration PSSnapin" -Verbose
Add-PSSnapin WebAdministration -ErrorAction SilentlyContinue
write-verbose -Message "importing webadministration Module" -Verbose
Import-Mo... |
PowerShellCorpus/Github/haidouks_powershell/NetScaler/getServiceBindings.ps1 | getServiceBindings.ps1 | try{
write-host "This script will be executed on $env:COMPUTERNAME"
Import-Module -Name Netscaler -ErrorAction Stop
$info = $true
$daysToExpire = $env:daysToExpire
$Nsips = $env:Nsips
$Username = $env:Username
$Password = $env:Password
$key = $env:keyword
if([String]::IsNullOrEmpty($key) -or $key.Trim().Length... |
PowerShellCorpus/Github/haidouks_powershell/InputOutput/FastRead&Search.ps1 | FastRead&Search.ps1 | $path = 'C:\Users\cnsn\Downloads\cnsn\cnsn\data.sql' #path for source text
$r = [IO.File]::OpenText($path)
while ($r.Peek() -ge 0) {
$line = $r.ReadLine()
if($line.Contains("Cansin") -and $line.Contains("ISTANBUL") -and $line.Contains("DENEME") )
{
$line
}
# Process $line here...
}
... |
PowerShellCorpus/Github/haidouks_powershell/CD-CI/TeamcityFunctions.ps1 | TeamcityFunctions.ps1 | function Get-AllBuilds
{
Param(
[string] $server = "TeamCityServer",
[string] $port = "TeamCityPort",
[string] $TCProjectName
)
write-verbose -Message "Getting all builds for project :$TCProjectName" -Verbose
$authInfo = "userName" + ":" + "password"
$ApiCredentialsBase64 = ... |
PowerShellCorpus/Github/amadrigal1001_Caso3/ACME/ACME/packages/Microsoft.Bcl.Build.1.0.14/tools/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
# This is the MSBuild targets file to add
$targetsFile = [System.IO.Path]::Combine($toolsPath, $package.Id + '.targets')
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=ne... |
PowerShellCorpus/Github/amadrigal1001_Caso3/ACME/ACME/packages/Microsoft.Bcl.Build.1.0.14/tools/Uninstall.ps1 | Uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
# Grab the loaded MSBuild project for the project
# Normalize project path before calli... |
PowerShellCorpus/Github/amadrigal1001_Caso3/ACME/ACME/packages/Microsoft.ApplicationInsights.0.16.1-build00418/tools/net40/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Checking if Path exists because the websites don't have a project file
if ([System.IO.File]::Exists($project.FullName))
{
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu... |
PowerShellCorpus/Github/amadrigal1001_Caso3/ACME/ACME/packages/Microsoft.ApplicationInsights.0.16.1-build00418/tools/net40/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# Checking if Path exists because the websites don't have a project file
if ([System.IO.File]::Exists($project.FullName))
{
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ... |
PowerShellCorpus/Github/amadrigal1001_Caso3/ACME/ACME/packages/EntityFramework.6.1.1/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/amadrigal1001_Caso3/ACME/ACME/packages/EntityFramework.6.1.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/ttab_exchperm/fullsendaccess.ps1 | fullsendaccess.ps1 | # Powershell script created by chralp
########### Load necessary module and snapin
############################################
import-module ActiveDirectory
if ((Get-PSSnapin -Name Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue) -eq $null ){
add-pssnapin Microsoft.Exchange.... |
PowerShellCorpus/Github/penspinnerqwe_SMARTEXLAB/SmartLabApp/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/penspinnerqwe_SMARTEXLAB/SmartLabApp/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/cpumagicman_PowerShell-Talk/Talk Demo Scripts.ps1 | Talk Demo Scripts.ps1 | # Execution Policy Demo
# Keyboard shortcuts
# tab completion
# Arrow keys
# (`) for line break
# Ctrl-S to pause output
# F7 for command history
# F8 to search for previous commands
# F9 to run a specific command,
# Page Up/Down
Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned
#------------------... |
PowerShellCorpus/Github/csandoval63_GSC/Keylogger.ps1 | Keylogger.ps1 | function Get-Keystrokes {
<#
.SYNOPSIS
Logs keys pressed, time and the active window.
PowerSploit Function: Get-Keystrokes
Original Authors: Chris Campbell (@obscuresec) and Matthew Graeber (@mattifestation)
Revised By: Jesse Davis (@secabstraction)
License: BSD 3-Clause
Required... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1489025141896/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/kimizhu_test718.de-de/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1 Download buildcore script to local
echo "download build core script to local with source ur... |
PowerShellCorpus/Github/LogRhythm-Labs_SRP-DisableADAccount/Disable_Windows_AD_Account.ps1 | Disable_Windows_AD_Account.ps1 | #==========================================#
# LogRhythm Threat Research #
# DisableADAccount - SmartResponse #
# matt . willems @ logrhythm . com #
# v0.1 -- April, 2016 #
#==========================================#
# Copyright 2016 LogRhythm Inc.
# Lice... |
PowerShellCorpus/Github/enddo_HatDBG/hatdbg.ps1 | hatdbg.ps1 | Add-Type -TypeDefinition @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Collections.Generic;
[Flags]
public enum CONSTANT : uint
{
DEBUG_PROCESS = 0x00000001,
CREATE_NEW_CONSOLE = 0x00000010,
PROCESS_ALL_ACCESS = 0x001F0FFF,
INFINITE ... |
PowerShellCorpus/Github/alivira_VMSStemplates/testscript.ps1 | testscript.ps1 | Write-Host "Hello, World!"
|
PowerShellCorpus/Github/alivira_VMSStemplates/cscript.ps1.ps1 | cscript.ps1.ps1 | Write-Host "Hello, World!"
|
PowerShellCorpus/Github/baseclass_Contrib.Nuget/Baseclass.Contrib.Nuget.Linked/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package)
Import-Module (Join-Path $toolsPath Baseclass.Contrib.Nuget.Linked.psm1) |
PowerShellCorpus/Github/baseclass_Contrib.Nuget/Baseclass.Contrib.Nuget.GitIgnoreContent/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package)
$modulePath = Join-Path $toolsPath Baseclass.Contrib.Nuget.GitIgnoreContent.psm1
Import-Module $modulePath
. (Join-Path $toolsPath 'GitIgnoreNugetContentRegisterEvents.ps1')
Function Create-RestoreTool {
$modulePath = Join-Path $toolsPath Baseclass.Contrib.Nuget.G... |
PowerShellCorpus/Github/baseclass_Contrib.Nuget/Baseclass.Contrib.Nuget.GitIgnoreContent/tools/GitIgnoreNugetContentRegisterEvents.ps1 | GitIgnoreNugetContentRegisterEvents.ps1 | $PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
$modulePath = Join-Path $PSScriptRoot Baseclass.Contrib.Nuget.GitIgnoreContent.psm1
$module = Import-Module $modulePath -PassThru
$componentModel = Get-VSComponentModel
$packageInstallerEvents = $componentModel.GetService([NuGet.VisualS... |
PowerShellCorpus/Github/baseclass_Contrib.Nuget/Baseclass.Contrib.Nuget.GitIgnoreContent/tools/RestoreNugetContent.ps1 | RestoreNugetContent.ps1 | $PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
$modulePath = Join-Path $PSScriptRoot Baseclass.Contrib.Nuget.GitIgnoreContent.psm1
Import-Module $modulePath
Restore-NugetContentFiles $PSScriptRoot |
PowerShellCorpus/Github/llehsrewop_demo/_.ps1 | _.ps1 | function Invoke-Shellcode
{
<#
.SYNOPSIS
Inject shellcode into the process ID of your choosing or within the context of the running PowerShell process.
PowerSploit Function: Invoke-Shellcode
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: N... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/VolumeShadowCopyTools.ps1 | VolumeShadowCopyTools.ps1 | function Get-VolumeShadowCopy
{
<#
.SYNOPSIS
Lists the device paths of all local volume shadow copies.
PowerSploit Function: Get-VolumeShadowCopy
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
Version: 2.0... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Invoke-CredentialInjection.ps1 | Invoke-CredentialInjection.ps1 | function Invoke-CredentialInjection
{
<#
.SYNOPSIS
This script allows an attacker to create logons with clear-text credentials without triggering a suspicious Event ID 4648 (Explicit Credential Logon).
The script either creates a suspended winlogon.exe process running as SYSTEM, or uses an existi... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Invoke-NinjaCopy.ps1 | Invoke-NinjaCopy.ps1 | function Invoke-NinjaCopy
{
<#
.SYNOPSIS
This script can copy files off an NTFS volume by opening a read handle to the entire volume (such as c:) and parsing the NTFS structures. This requires you
are an administrator of the server. This allows you to bypass the following protections:
1. Files which are ope... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Get-TimedScreenshot.ps1 | Get-TimedScreenshot.ps1 | function Get-TimedScreenshot
{
<#
.SYNOPSIS
Takes screenshots at a regular interval and saves them to disk.
PowerSploit Function: Get-TimedScreenshot
Author: Chris Campbell (@obscuresec)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
A function that tak... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Invoke-TokenManipulation.ps1 | Invoke-TokenManipulation.ps1 | function Invoke-TokenManipulation
{
<#
.SYNOPSIS
This script requires Administrator privileges. It can enumerate the Logon Tokens available and use them to create new processes. This allows you to use
anothers users credentials over the network by creating a process with their logon token. This will work even wi... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Get-VaultCredential.ps1 | Get-VaultCredential.ps1 | function Get-VaultCredential
{
<#
.SYNOPSIS
Displays Windows vault credential objects including cleartext web credentials.
PowerSploit Function: Get-VaultCredential
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Ge... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Invoke-Mimikatz.ps1 | Invoke-Mimikatz.ps1 | function Invoke-Mimikatz
{
<#
.SYNOPSIS
This script leverages Mimikatz 2.0 and Invoke-ReflectivePEInjection to reflectively load Mimikatz completely in memory. This allows you to do things such as
dump credentials without ever writing the mimikatz binary to disk.
The script has a ComputerName parameter which a... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Get-Keystrokes.ps1 | Get-Keystrokes.ps1 | function Get-Keystrokes {
<#
.SYNOPSIS
Logs keys pressed, time and the active window.
PowerSploit Function: Get-Keystrokes
Author: Chris Campbell (@obscuresec) and Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Get-GPPPassword.ps1 | Get-GPPPassword.ps1 | function Get-GPPPassword {
<#
.SYNOPSIS
Retrieves the plaintext password and other information for accounts pushed through Group Policy Preferences.
PowerSploit Function: Get-GPPPassword
Author: Chris Campbell (@obscuresec)
License: BSD 3-Clause
Required Dependencies: None
Optional D... |
PowerShellCorpus/Github/llehsrewop_demo/Exfiltration/Out-Minidump.ps1 | Out-Minidump.ps1 | function Out-Minidump
{
<#
.SYNOPSIS
Generates a full-memory minidump of a process.
PowerSploit Function: Out-Minidump
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Out-Minidump writes a... |
PowerShellCorpus/Github/llehsrewop_demo/CodeExecution/Invoke-Shellcode.ps1 | Invoke-Shellcode.ps1 | # The actual Invoke-Shellcode has moved to Invoke--Shellcode.ps1.
# This was done to make a point that you have no security sense
# if you think it's okay to blindly download/exec code directly
# from a GitHub repo you don't control. This will undoubedtly break
# many scripts that have this path hardcoded. If you d... |
PowerShellCorpus/Github/llehsrewop_demo/CodeExecution/Invoke--Shellcode.ps1 | Invoke--Shellcode.ps1 | function Invoke-Shellcode
{
<#
.SYNOPSIS
Inject shellcode into the process ID of your choosing or within the context of the running PowerShell process.
PowerSploit Function: Invoke-Shellcode
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: N... |
PowerShellCorpus/Github/llehsrewop_demo/CodeExecution/Invoke-ShellcodeMSIL.ps1 | Invoke-ShellcodeMSIL.ps1 | function Invoke-ShellcodeMSIL
{
<#
.SYNOPSIS
Execute shellcode within the context of the running PowerShell process without making any Win32 function calls.
PowerSploit Function: Invoke-ShellcodeMSIL
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: N... |
PowerShellCorpus/Github/llehsrewop_demo/CodeExecution/Invoke-DllInjection.ps1 | Invoke-DllInjection.ps1 | function Invoke-DllInjection
{
<#
.SYNOPSIS
Injects a Dll into the process ID of your choosing.
PowerSploit Function: Invoke-DllInjection
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Invoke-DllInjection injects a ... |
PowerShellCorpus/Github/llehsrewop_demo/CodeExecution/Invoke-ReflectivePEInjection.ps1 | Invoke-ReflectivePEInjection.ps1 | function Invoke-ReflectivePEInjection
{
<#
.SYNOPSIS
This script has two modes. It can reflectively load a DLL/EXE in to the PowerShell process,
or it can reflectively load a DLL in to a remote process. These modes have different parameters and constraints,
please lead the Notes section (GENERAL NOTES) for in... |
PowerShellCorpus/Github/llehsrewop_demo/AntivirusBypass/Find-AVSignature.ps1 | Find-AVSignature.ps1 | function Find-AVSignature
{
<#
.SYNOPSIS
Locate tiny AV signatures.
PowerSploit Function: Find-AVSignature
Authors: Chris Campbell (@obscuresec) & Matt Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Locates single Byte AV signature... |
PowerShellCorpus/Github/llehsrewop_demo/ScriptModification/Out-CompressedDll.ps1 | Out-CompressedDll.ps1 | function Out-CompressedDll
{
<#
.SYNOPSIS
Compresses, Base-64 encodes, and outputs generated code to load a managed dll in memory.
PowerSploit Function: Out-CompressedDll
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION... |
PowerShellCorpus/Github/llehsrewop_demo/ScriptModification/Out-EncryptedScript.ps1 | Out-EncryptedScript.ps1 | function Out-EncryptedScript
{
<#
.SYNOPSIS
Encrypts text files/scripts.
PowerSploit Function: Out-EncryptedScript
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Out-EncryptedScript will encrypt a script (or any tex... |
PowerShellCorpus/Github/llehsrewop_demo/ScriptModification/Remove-Comments.ps1 | Remove-Comments.ps1 | function Remove-Comments
{
<#
.SYNOPSIS
Strips comments and extra whitespace from a script.
PowerSploit Function: Remove-Comments
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Remove-Comments strips out comments a... |
PowerShellCorpus/Github/llehsrewop_demo/ScriptModification/Out-EncodedCommand.ps1 | Out-EncodedCommand.ps1 | function Out-EncodedCommand
{
<#
.SYNOPSIS
Compresses, Base-64 encodes, and generates command-line output for a PowerShell payload script.
PowerSploit Function: Out-EncodedCommand
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DE... |
PowerShellCorpus/Github/llehsrewop_demo/Recon/Invoke-ReverseDnsLookup.ps1 | Invoke-ReverseDnsLookup.ps1 | function Invoke-ReverseDnsLookup
{
<#
.SYNOPSIS
Perform a reverse DNS lookup scan on a range of IP addresses.
PowerSploit Function: Invoke-ReverseDnsLookup
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Invoke-Reve... |
PowerShellCorpus/Github/llehsrewop_demo/Recon/Get-HttpStatus.ps1 | Get-HttpStatus.ps1 | function Get-HttpStatus
{
<#
.SYNOPSIS
Returns the HTTP Status Codes and full URL for specified paths.
PowerSploit Function: Get-HttpStatus
Author: Chris Campbell (@obscuresec)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
A script to check for the existen... |
PowerShellCorpus/Github/llehsrewop_demo/Recon/Invoke-Portscan.ps1 | Invoke-Portscan.ps1 | function Invoke-Portscan
{
<#
.SYNOPSIS
Simple portscan module
PowerSploit Function: Invoke-Portscan
Author: Rich Lundeen (http://webstersProdigy.net)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Does a simple port scan using regular sockets, based (prett... |
PowerShellCorpus/Github/llehsrewop_demo/Recon/Get-ComputerDetails.ps1 | Get-ComputerDetails.ps1 | function Get-ComputerDetails
{
<#
.SYNOPSIS
This script is used to get useful information from a computer.
Function: Get-ComputerDetails
Author: Joe Bialek, Twitter: @JosephBialek
Required Dependencies: None
Optional Dependencies: None
Version: 1.1
.DESCRIPTION
This script is used to get useful infor... |
PowerShellCorpus/Github/EricJSoler_Advising-System/aDVISING5_5/packages/EntityFramework.6.1.1/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/EricJSoler_Advising-System/aDVISING5_5/packages/EntityFramework.6.1.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/yurayolkin_Documents/01-Implementation/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/yurayolkin_Documents/01-Implementation/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/SzumigalskiS_TabCompletionScripts/ADTasks.ps1 | ADTasks.ps1 |
$Groupbase = {
param($CommandName, $ParameterName, $OUwordToComplet, $CommandAst, $fakeBoundParameter)
$Groups = Get-ADGroup -Filter * |Where-Object -FilterScript {$PSItem.name -match $OUWordToComplete}
foreach ($Group in $Groups) {
New-CompletionResult -CompletionText $Group.Name -ListIte... |
PowerShellCorpus/Github/SzumigalskiS_TabCompletionScripts/EventInstanceID.ps1 | EventInstanceID.ps1 | $EventID = {
param($CommandName, $ParameterName, $WordToComplete)
$Instances = Import-Csv D:\PSTesting\Events.csv
foreach($Instance in $Instances){
New-CompletionResult -CompletionText $Instance.EventID -ToolTip $Instance.Message -ListItemText $Instance.EventID
}
}
Register-ArgumentComp... |
PowerShellCorpus/Github/mlbrown7_scripts/BitBucketTeamCloneAll.ps1 | BitBucketTeamCloneAll.ps1 | $urlBase = "https://api.bitbucket.org/2.0"
$team = "<team name>"
$apiUser = "<bitbucket api user name>"
$apiPass = "<bitbucket api password>"
$authHeader = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $apiUser,$apiPass)))
$bitBucketUser = "<user>"
$bitBucketPass = "<password>"
$backupD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.