Skip to content

Instantly share code, notes, and snippets.

@nuke99
Created May 1, 2012 14:45
Show Gist options
  • Save nuke99/2568450 to your computer and use it in GitHub Desktop.
Save nuke99/2568450 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require "readline"
while cmd = Readline.readline(("line ")+"> ", true)
puts cmd
method, commands,para = cmd.split
if method
if respond_to?(method)
parameter_count = method(method.to_sym).arity
puts parameter_count
if parameter_count == 1
send(method, commands)
else
send(method)
end
else
puts "[*] Unknown Command '#{method}' "
end
else
return true
end
end
def banner
puts "This is a banner"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment