Skip to content

This project was a PoC generated which later became the scripting shell in IronWASP

Notifications You must be signed in to change notification settings

msaindane/MultiREPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MultiREPL

This project was a PoC written in 2011 which later on became the Scripting Shell in IronWASP. It uses the Microsoft DLR Hosting API to run Python and Ruby code on .Net

In this PoC, I was experimenting with calling Python functions from Ruby code and vice versa. This sounds crazy, but has some good usecases. E.g. Since most security libraries and tools are written in Python (and I'm a Ruby fan!), I wanted IronWASP to have the ability to reuse code written once in either Python or Ruby and allow it to be extended from either languages.

IronWASP allows you to write a plugin in Ruby for example and then use it from within another plugin that is written in Python and viceversa.

Compiling

You can compile the code using:

msbuild MultiREPL.sln

Sample Execution

After compiling, run the exe from the MultiREPL/bin/Release folder

# cd MultiREPL/bin/Release
# MultiREPL.exe
# Type #help to know more.
rb> #help
  Available commands:
	#ls	Lists all Languages supported.
	#rb	Change language to Ruby.
	#py	Change language to Python.
	#exit	Exits the application.
	#help	This cruft
rb> #ls
IronRuby
IronPython 2.6.1
rb> class Dog
rb| 	def says
rb| 		puts "Woof Woof!"
rb| 	end
rb| end
=> nil
rb> Dog.new.says
Woof Woof!
=> nil
rb> #py
py> import Dog
py> Dog().says()
Woof Woof!
py> class Cat(object):
py| 	def says(self):
py| 		print "Meow Meow!"
py|
py> Cat().says()
Meow Meow!
py> #rb
rb> Cat().new.says
Meow Meow!
=> nil
rb> #exit

You can see that a class "Dog" defined in Ruby can be instantiated and methods on that object can be called from Python. Similarly, a class "Cat" defined in Python can be instantiated and called from Ruby.

References:

About

This project was a PoC generated which later became the scripting shell in IronWASP

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages