This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'open3' | |
| class RunningMan | |
| def initialize(*cmd) | |
| @cmd = cmd | |
| end | |
| attr_reader :status, :output, :error | |
| def run | |
| input, output, err = Open3.popen3(*@cmd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # | |
| # This program encrypts and decrypts messages at the command line. | |
| # It runs setuid root, so that it can be used by users without giving | |
| # them access to the (root-owned) secret encryption key. | |
| require 'openssl' | |
| SECRET_KEY="/etc/secrypt.key" | |
| OUTPUT_FILE="/tmp/secrypt.out" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'tempfile' | |
| KEYGEN = "/usr/bin/ssh-keygen" | |
| KEYSFILE = "authorized_keys" | |
| keys = [] | |
| File.open(KEYSFILE).each_line do |l| | |
| next if (l =~ /\A\s*\Z/) # blank line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICqdotjoqQesY9TuSLKBak7pmT83yxcfKTmzun/DalZv [email protected] |
OlderNewer