Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scriptpath = $MyInvocation.MyCommand.Path
- $storageDir = Split-Path $scriptpath
- $downloadlinks = @(
- "http://www.bleepingcomputer.com/download/combofix/dl/12/",
- "http://www.bleepingcomputer.com/download/adwcleaner/dl/125/",
- "http://www.bleepingcomputer.com/download/rkill/dl/10/",
- "http://www.bleepingcomputer.com/download/minitoolbox/dl/65/"
- )
- $downloadparse = @(
- 's@^.*<a href=\x27\(http://download[.]bleepingcomputer[.]com/dl/[0-9A-Fa-f]\+/[0-9A-Fa-f]\+/windows/security/anti[-]virus/c/combofix/ComboFix[.]exe\)\x27>.*$@\1@p',
- 's@^.*<a href=\x27\(http://download[.]bleepingcomputer[.]com/dl/[0-9A-Fa-f]\+/[0-9A-Fa-f]\+/windows/security/security[-]utilities/a/adwcleaner/adwcleaner[_][0-9A-Fa-f]\+[.][0-9A-Fa-f]\+[.]exe\)\x27>.*$@\1@p',
- 's@^.*<a href=\x27\(http://download[.]bleepingcomputer[.]com/dl/[0-9A-Fa-f]\+/[0-9A-Fa-f]\+/windows/security/security[-]utilities/r/rkill/rkill[.]exe\)\x27>.*$@\1@p',
- 's@^.*<a href=\x27\(http://download[.]bleepingcomputer[.]com/dl/[0-9A-Fa-f]\+/[0-9A-Fa-f]\+/windows/security/security[-]utilities/m/minitoolbox/MiniToolBox[.]exe\)\x27>.*$@\1@p'
- )
- $downloadname = @(
- "ComboFix",
- "ADWCleaner",
- "rkill",
- "MiniToolBox"
- )
- $dlinksarraylength = $downloadlinks.length
- $dlinksarraylength--
- $i = 0
- while ($i -le $dlinksarraylength)
- {
- $dlink = $downloadlinks[$i]
- $dname = $downloadname[$i]
- $dparse = $downloadparse[$i]
- $webclient = New-Object System.Net.WebClient
- $htmlfile = "$storageDir\Download.html"
- $webclient.DownloadFile($dlink,$htmlfile)
- $purl= $(.\sed.exe -ne $dparse $storageDir\Download.html)
- Write-host "Downloading $dname"
- Write-host "-------------------"
- $dfilename = "$storageDir\files\$dname.exe"
- $webclient.DownloadFile($purl,$dfilename)
- Remove-Item "$storageDir\Download.html"
- $i++
- }
Add Comment
Please, Sign In to add comment