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://www.be4sec.com” -NoCache

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s