Re:The increased use of PowerShell in attacks [pdf]
by hackunomatter on Friday May 19, 2017 @05:11PM
(#14379388)
A judicious use of xargs, curl and grep would have done it in 1 line in Linux. I looked at your PowerShell code; that does look a bit complicated compared to what Linux offers.
[ Parent
| on HN ]
Re:The increased use of PowerShell in attacks [pdf]
by Numberwang on Friday May 19, 2017 @05:22PM
(#14379453)
I'm sure you are right. I was just trying to convey the positive impression I got from what little time I spent with PowerShell and the great documentation it has.
Especially the fact that I was able to accomplish what I set out to do in a very reasonable amount of time.
Re:The increased use of PowerShell in attacks [pdf]
by Arnavion on Friday May 19, 2017 @06:27PM
(#14379799)
You can do it in one line in PS too.
$sites = @('https://www.google.com/', 'https://www.example.com/')
$searchString = 'oogle'
$sites | %{ if ((iwr $_).Content -like "*$searchString*") { "$_;OK" } else { "$_;NOT OK" } } > C:\temp\output.csv