Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I already use https://github.com/lukesampson/psutils which has a sudo.ps1, which I install via scoop (I know that's a mouthful, but I just install scoop and run `scoop install sudo`). I used it from powershell literally just before I opened this article (after copy-pasting a password, I copy some random text laying around in the browser, like "com", then run `sudo restart-service -name 'cbdhsvc*'` to clear the clipboard history -- does not clear the current value). There is a UAC prompt, but it's perfectly adequate for interactive work.


Same here, and if you look at the output of whoami /priv you'll find that using luke's sudo provides exactly the same priviledge escalation as 'run as administrator' does


Mind that Windows has clipboard (win+v) history and you may've that enabled


That is precisely what I'm clearing.


Scoop install gsudo is even better (still run as sudo).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: