Skip to content

Instantly share code, notes, and snippets.

@davehardy20
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davehardy20/a1b7d17f78e1347624c0 to your computer and use it in GitHub Desktop.
Save davehardy20/a1b7d17f78e1347624c0 to your computer and use it in GitHub Desktop.
Remove-Module PowerSploit -ErrorAction SilentlyContinue
$webclient = New-Object System.Net.WebClient
$url = "https://github.com/mattifestation/PowerSploit/archive/master.zip"
$file = "$($env:TEMP)\PowerSploit.zip"
$webclient.DownloadFile($url,$file)
#Unblock-File -Path $file
$targetondisk = "$([System.Environment]::GetFolderPath('MyDocuments'))\WindowsPowerShell\Modules"
New-Item -ItemType Directory -Force -Path $targetondisk | out-null
$shell_app=new-object -com shell.application
$zip_file = $shell_app.namespace($file)
$destination = $shell_app.namespace($targetondisk)
$destination.Copyhere($zip_file.items(), 0x10)
Rename-Item -Path ($targetondisk+"\PowerSploit-master") -NewName "PowerSploit" -Force
set-location $targetondisk"\PowerSploit"; Import-Module .\PowerSploit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment