Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Opdis
A Ruby C extension (and gem) for the opdis library, available from http://freshmeat.net/projects/opdis .
The standard C extension build process is used:
bash# ruby1.9 extconf.rb
bash# make
Note that the Ruby headers must be installed. On Ubuntu, these are in the ruby-dev or ruby1.9-dev package.
The gem is built using the standard gem build command:
bash# gem build Opdis.gemspec
The top-level Makefile supports each of these builds with the commands 'make' and 'make gem'.
bash# make
# builds C extension
bash# make gem
# builds the gem
The implementation of binutils (and libopcodes) does not provide a way to determine the supported platforms at compile time, unless the config.h file used to build the binutils package is present.
The extconf.rb file has been modified in order to detect the architectures supported by the local copy of binutils, and to allow the user to specify which architectures they want supported.
It does this using the following steps:
1. run objdump -i to get the supported architectures
2. each line that matches one of binutils' known architectures is
added as a #define to CPPFLAGS
3. if no architectures have been found, or if objdump failed to run,
default to the i386 architecture.
The binary used in step 1 can be specified by the user via the --with-objdump flag. For example:
bash# cat /tmp/objdump.sh
#/bin/sh
echo 'arm'
echo 'sparc'
echo 'm68k'
bash# ruby1.9 extconf.rb --with-objdump=/tmp/objdump.sh
checking for init_disassemble_info() in -lopcodes... yes
Adding architecture 'arm'
Adding architecture 'sparc'
Adding architecture 'm68k'
creating Makefile
This makes it possible to force compilation of support for specific architectures when there is no working objdump present. Note that libopcodes must have been compiled with support for the architectures, or you will get runtime errors.
EXAMPLES
Extended examples are provided in the 'examples' directory. The following code snippets give a brief overview of using the BFD and Opdis extensions together.
require 'BFD' require 'Opdis'
Bfd::Target.new('/tmp/a.out') do |tgt| Opdis::Disassembler.new do |dis| dis.disasm_entry( tgt ) { |insn| puts insn } end end
tgt = Bfd::Target.new('/tmp/a.out') tgt.sections.values.each { |s| puts s.name } } Opdis::Disassembler.new do |dis| dis.disasm_section( tgt.sections['.text.] ) { |i| puts i } end
Opdis::Disassembler.architectures.each { |arch| puts arch }
Opdis::Disassembler.new( arch: 'x86_64_intel' ) do |dis| dis.disassemble( [0x90, 0xCC, 0x90] ) { |insn| puts insn } end
Opdis::Disassembler.new( arch: 'x86_intel' ) do |dis| dis.disassemble( "\x90\xCC\x90" ) { |insn| puts insn } end
FAQs
Unknown package
We found that Opdis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.