Hey guys! I wanted to share a quick executable I created for downloading files via Powershell.  It uses the webclient functionality. You can find it here: https://gameofpwnz.com/scripts/Powershell/psdownload.exe This is a Powershell…

Hey guys! I wanted to share a quick executable I created for downloading files via Powershell.  It uses the webclient functionality.

You can find it here: https://gameofpwnz.com/scripts/Powershell/psdownload.exe

This is a Powershell script turned into .EXE using PS2EXE.

 

The script is using a .NET class called System.Net.Webclient.  It’s used for downloading files.

Essentially, this is what it’d look like in Powershell:

PS> $url = “https://gameofpwnz.com/scripts/Powershell/psdownload.exe”

PS> $output = “OUTPUT/psdownload.exe”

PS> $wc = New-Object System.Net.WebClient

PS> $wc.DownloadFile($url, $output)

 

This tool was built because it was easier than going through the browser and downloading to download folder then moving it to where we wanted.  It was simpler. I might make the tool allow for multiple downloads at once.  This folder creates an output folder and then saves the file in that output folder. You must have write access from the directory you run this tool from.

It’s pretty funny the coincidence that a buddy of mine who is also in information security wrote a blog post about downloading files natively …at the same time I was building this small tool.  You can find his post here: Native Windows commands to download files by @hecky

 

Here’s it being run:

psdownload.exe Icon

 

 

 

 

 

 

When ran, this webform pops up

 

 

 

 

 

 

 

 

 

 

Enter the file you want to download and the output name for the file (include file extension – in this case it’s .exe)

 

 

 

 

 

Then you’ll have an output folder where you ran it and the file will be inside it

 

 

 

 

 

 

Ashton-Drake, aka GameOfPWNZ, is an information security professional and enthusiast He is the owner of this blog.

Leave a Reply