Sunday, May 31, 2020

wget with Powershell

 function global:wget($Address, [switch]$NoCache)

{

 $client = New-Object Net.WebClient

 $proxy = New-object System.Net.WebProxy "10.0.0.10:8080"

 $proxy.Credentials = New-Object System.Net.NetworkCredential ("DOMAIN\user", "password") 

 $client.proxy=$proxy

 $Client.Headers.Add("user-agent", "Windows Powershell WebClient Header") 

 if ($NoCache) {

  # doesn't use the cache at all

  $client.CachePolicy = New-Object Net.Cache.RequestCachePolicy([Net.Cache.RequestCacheLevel]::NoCacheNoStore)

 }

 

 $client.DownloadString($Address)

}

 

wget -Address "http://be4sec.blogspot.com" -NoCache

No comments:

Post a Comment

A Sad Story: Don't Invest, Just Prodigalize

Last week, a friend called me, gave some bad news about a company. The company was looking for help since they became a victim of Egregor ra...