News for hackers. Stuff that matters.
Re:The increased use of PowerShell in attacks [pdf] by throwaway7645 on Friday May 19, 2017 @08:56PM (#14380420)
Does DOS have anything like "locate x"? Or do you have to use the horribly inefficient graphical search which takes AGES. The Unix terminal takes a little while to learn, but it is powerful. Windows is mind-numbing.
Re:The increased use of PowerShell in attacks [pdf] by pcwalton on Friday May 19, 2017 @09:28PM (#14380543)
Re:The increased use of PowerShell in attacks [pdf] by cesarb on Friday May 19, 2017 @09:42PM (#14380593)
That's for PowerShell, not DOS. IIRC, for DOS you could do something like "dir /s *.txt" to list all files with .txt extension in all subdirectories of the current directory, so "dir /s x" would be somewhat equivalent to Unix's "find -name x" (not as fast as "locate x", but should return the same if run on the root directory, and if there were no changes since the locate database was last rebuilt).
Re:The increased use of PowerShell in attacks [pdf] by throwaway7645 on Friday May 19, 2017 @09:33PM (#14380558)
I've used that before and the functionality isn't even close. The UNIX command is fast, while the recursive PS command takes forever and prints tons of garbage to your console when it tries to read from certain directories. It also isn't near as intuitive as locate and takes longer to write-out. You're right that it is better than the graphical way though!
Re:The increased use of PowerShell in attacks [pdf] by secabeen on Saturday May 20, 2017 @12:19AM (#14381017)
locate is fast because there's a cron job that does the heavy lifting of scanning and indexing the filesystem. Without that, find is about as fast as PS.
Re:The increased use of PowerShell in attacks [pdf] by throwaway7645 on Saturday May 20, 2017 @12:17PM (#14383064)
Yes and it puts it in a database updated regularly for fast access. I'm not sure why this isn't default on Windows. How often does one need to search for a random file in the OS?