-
-
Save nuke99/e5922bc7be3bd9ba5159 to your computer and use it in GitHub Desktop.
This file contains 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/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 |
This file contains 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
{"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"}} | |
============================================= |
This file contains 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/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