Skip to content

Instantly share code, notes, and snippets.

@nuke99

nuke99/banner.rb Secret

Created May 23, 2012 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuke99/e5922bc7be3bd9ba5159 to your computer and use it in GitHub Desktop.
Save nuke99/e5922bc7be3bd9ba5159 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require './lib/command_execution'
require './lib/helpset'
module Banner
Execution.register(self)
HelpSet.instance.set('banner','c','banner command will clear the screen and give you in a new ascii banner')
def banner
puts "This should run as the banner command"
end
end
#!/usr/bin/ruby
# HelpSet class collects command name , definition and type of the command
#
require 'singleton'
require 'pp'
class HelpSet
include Singleton
#attr_accessor :info
def initialize
@info = {}
end
def set(command,type,discription)
@info[command] = {:disc=>discription,:type=>type}
pp @info
puts "============================================="
end
def onit
return @info
end
end
{"setindex"=>{:type=>"c", :disc=>"will clean the screen "}}
=============================================
{"mod"=>
{:type=>"c",
:disc=>
"mod <module name> will execute the module . use help command to list modules"}}
=============================================
{"help"=>
{:type=>"c",
:disc=>"'help' command will help you get information about other commands"},
"mod"=>
{:type=>"c",
:disc=>
"mod <module name> will execute the module . use help command to list modules"}}
=============================================
{"credit"=>{:type=>"c", :disc=>"This command is for help ."},
"help"=>
{:type=>"c",
:disc=>"'help' command will help you get information about other commands"},
"mod"=>
{:type=>"c",
:disc=>
"mod <module name> will execute the module . use help command to list modules"}}
=============================================
{"credit"=>{:type=>"c", :disc=>"This command is for help ."},
"help"=>
{:type=>"c",
:disc=>"'help' command will help you get information about other commands"},
"update"=>
{:type=>"core",
:disc=>
"'update' command will update your database with the latest exploits and payloads"},
"mod"=>
{:type=>"c",
:disc=>
"mod <module name> will execute the module . use help command to list modules"}}
=============================================
{"clear"=>{:type=>"c", :disc=>"will clean the screen "},
"credit"=>{:type=>"c", :disc=>"This command is for help ."},
"help"=>
{:type=>"c",
:disc=>"'help' command will help you get information about other commands"},
"update"=>
{:type=>"core",
:disc=>
"'update' command will update your database with the latest exploits and payloads"},
"mod"=>
{:type=>"c",
:disc=>
"mod <module name> will execute the module . use help command to list modules"}}
=============================================
{"clear"=>{:type=>"c", :disc=>"will clean the screen "},
"credit"=>{:type=>"c", :disc=>"This command is for help ."},
"help"=>
{:type=>"c",
:disc=>"'help' command will help you get information about other commands"},
"banner"=>
{:type=>"c",
:disc=>
"banner command will clear the screen and give you in a new ascii banner"},
"update"=>
{:type=>"core",
:disc=>
"'update' command will update your database with the latest exploits and payloads"},
"mod"=>
{:type=>"c",
:disc=>
"mod <module name> will execute the module . use help command to list modules"}}
=============================================
#!/usr/bin/ruby
require 'lib/helpset'
require 'lib/command_execution'
require 'lib/code_mods'
class Test
include CodeMod
#CodeMod.code('test',self)
HelpSet.instance.set('setindex','c',"will clean the screen ")
def initialze
##nothing here yet
end
def inside
puts "Your inside"+self
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment