Sha256: 6a16e629180976432a8663100acdfe51dd9fe74dd3259fb48a0af95e1ccc4563

Contents?: true

Size: 507 Bytes

Versions: 43

Compression:

Stored size: 507 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), '..', '..'))

require 'test/unit'
require 'rex/text'
require 'rex/assembly/nasm'

class Rex::Assembly::Nasm::UnitTest < ::Test::Unit::TestCase

	Klass = Rex::Assembly::Nasm

	def test_assemble
		assert_equal("\x6a\x00", Klass.assemble("push byte 0x00"))
		assert_equal("\xb2\xb4", Klass.assemble("mov dl, 0xb4"))
	end

	def test_disassemble
		assert_equal("00000000  31C0              xor eax,eax\n", Klass.disassemble("\x31\xc0"))
	end

end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.63 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.54 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.53 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.52 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.51 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.50 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.49 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.48 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.47 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.46 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.44 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.43 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.42 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.41 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.40 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.39 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.38 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.37 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.36 lib/rex/assembly/nasm.rb.ut.rb