Jump to content
co4ie

RudraScript .. Run code in every language from inside Lua scripts.

Recommended Posts

Posted

Lua is a powerful, fast, lightweight, embeddable scripting language. It is heavily used in the game industry and security tools such as Wireshark, Snort, nmap and Sandcat also make use of it.

The language combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Push the boundaries. Run code in every language from inside Lua scripts.

RudraScript™ is an experimental Lua extension library that allows you to run code written in nearly every scripting language from within Lua scripts.

Currently JavaScript, PascalScript, Perl, PHP, Python, Ruby & VBScript are supported. RudraScript was designed by Syhunt for use in the next release of the Sandcat Browser, but can also be used separately.

How To Use It

RudraScript is effortless to use. Just load RudraScript using require and call [languagename] [YOUR_CODE_STRING] to execute your code (for example: php [[echo('Hello');]]). All global and local Lua variables (string, number, boolean and nil) are automatically made accessible from within the code just like if they were part of the Lua script that is running it, as shown in the examples below. More examples are included within the library distribution

Example 1 - JavaScript in Lua

-- This prints "HELLO WORLD from Rudra" followed by "Bye!"
require "RudraScript"
msg = 'Hello World'

function sayhello(s) javascript
[[

Rudra.WriteLn(msg.toUpperCase()+' From '+s);
msg = 'Bye!'

]]
end

sayhello('Rudra')
print(msg)

Example 2 - PHP in Lua

require "RudraScript"

function sayhello(a, php
[[

echo("Hello $a from $b");
$a = 'Bye!';

]]
print(a)
end

sayhello('World','Rudra')

Example 3 - Ruby in Lua

require "RudraScript"

function sayhello(a, ruby
[[

puts("Hello "+a+" from "+
a = 'Bye!'

]]
print(a)
end

sayhello('World','Rudra')

RudraScript Compiler

By using the RudraScript Compiler, you can turn your script into a small executable (this is entirely optional).

System Requirements

128 MB of memory

100 MB of free disk space

Windows XP, 2003, 2008, Vista or 7.

As a user of a more recent Windows version you may need to be logged in with full administration rights

Additional Requirements

Already included:

Not included, must be downloaded separately:

  • ActivePerl (optional), for running Perl scripts
  • Python (optional), for running Python scripts

More Info

Download

Sursa

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...