Skip to content

Instantly share code, notes, and snippets.

@icy
Last active September 25, 2019 11:11
Show Gist options
  • Select an option

  • Save icy/5db8aed50a74423ef66839f57ef4e5e8 to your computer and use it in GitHub Desktop.

Select an option

Save icy/5db8aed50a74423ef66839f57ef4e5e8 to your computer and use it in GitHub Desktop.
secure_sudo.sh
# author : ky-anh huynh
# license : mit
# purpose : the most secure way to execute sudo on linux system
# usage : secure_sudo your_command
# warning : more ram and cpu are required, for a sake of security ;)
secure_sudo() {
s="";
eval $(for _ in $(seq 1 999); do s="$s sudo"; done; echo $s) "$@";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment