samples/peldr.rb in metasm-1.0.1 vs samples/peldr.rb in metasm-1.0.2
- old
+ new
@@ -146,11 +146,11 @@
if e = pe.export.exports.find { |e_| e_.name == v.name and e_.target }
DL.new_caller_for(cp, v, v.name.downcase, @load_address + pe.label_rva(e.target))
end
}
- cp.numeric_constants.each { |k, v|
+ cp.numeric_constants.each { |k, v, f|
n = k.upcase
n = "C#{n}" if n !~ /^[A-Z]/
DL.const_set(n, v) if not DL.const_defined?(n) and v.kind_of? Integer
}
end
@@ -176,10 +176,10 @@
set[0x30, @@peb] # peb
end
def self.populate_peb
DL.memory_write(@@peb, 0.chr*4096)
- set = lambda { |off, val| DL.memory_write_int(@@peb+off, val) }
+ #set = lambda { |off, val| DL.memory_write_int(@@peb+off, val) }
end
def self.teb ; @@teb ; end
def self.peb ; @@peb ; end