[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Tools for working with x86 assembly in Ruby?

ljp

2/15/2008 8:10:00 PM

Hi all,

I'm starting a project that will involve injecting instructions into
x86 assembly code. I'd like to write this tool in Ruby. In the
interest of not reinventing wheels, I'm appealing to the Ruby
community: does anyone know of some serviceable source code for
parsing x86 assembly, and ideally for editing (e.g., ability to update
offsets when an instruction is moved around)? Or perhaps someone
knows of an assembler written in Ruby that I could pilfer? My Google-
fu hasn't turned up anything.

(I know of Racc - it will be my starting point if I can't find an
existing parser)

Many thanks =)
2 Answers

Matt Lawrence

2/15/2008 8:29:00 PM

0

On Sat, 16 Feb 2008, ljp wrote:

> I'm starting a project that will involve injecting instructions into
> x86 assembly code. I'd like to write this tool in Ruby. In the
> interest of not reinventing wheels, I'm appealing to the Ruby
> community: does anyone know of some serviceable source code for
> parsing x86 assembly, and ideally for editing (e.g., ability to update
> offsets when an instruction is moved around)? Or perhaps someone
> knows of an assembler written in Ruby that I could pilfer? My Google-
> fu hasn't turned up anything.

You may want to take a look at Metasploit, I think it does some of that.

-- Matt
It's not what I know that counts.
It's what I can remember in time to use.

M. Edward (Ed) Borasky

2/16/2008 4:16:00 AM

0

ljp wrote:
> Hi all,
>
> I'm starting a project that will involve injecting instructions into
> x86 assembly code. I'd like to write this tool in Ruby. In the
> interest of not reinventing wheels, I'm appealing to the Ruby
> community: does anyone know of some serviceable source code for
> parsing x86 assembly, and ideally for editing (e.g., ability to update
> offsets when an instruction is moved around)? Or perhaps someone
> knows of an assembler written in Ruby that I could pilfer? My Google-
> fu hasn't turned up anything.
>
> (I know of Racc - it will be my starting point if I can't find an
> existing parser)
>
> Many thanks =)

Have a look at RubyInline. It lets you put C code in line in Ruby code.
I would imagine that "C code" on a Gnu/Linux system could include Gnu
Assembler code as well. I can't help you on Windows, however. ;)
>
>