Cisco 3G MicroCell Bedienungsanleitung Seite 31

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 32
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 30
!OO1-.3S7(T7*1-C64"+5E&"51U%"
#!/usr/bin/env ruby
def hex(hex)
return(hex.to_s(16).rjust(2, "0"))
end
def hexToAddr(hex)
# 01234567
# 54cc2780
# should be
# 8027cc54
return hex(hex[3])+hex(hex[2])+hex(hex[1])+hex(hex[0])
end
off_base = 0x80000000
off_start = 0x27cc4c
off_end = 0x286fbd
addr_off_start = 0x2761c4
addr_off_end = 0x27a8c4
f_ramdisk = "ramdisk"
separator = 0x00
f = File.open(f_ramdisk, "r")
file = f.read()
ctr = 0
func = ""
addr_str_link = {}
for i in (0 .. (addr_off_end - addr_off_start)/8)
# 0 = [0 .. 3] : [4 .. 7]
# 1 = [8 .. 11] : [12 .. 15]
# 2 = [16 .. 20] : [21 .. 25]
str_addr_start = 8 * i
str_addr_end = str_addr_start + 3
func_addr_start = str_addr_end + 1
func_addr_end = func_addr_start + 3
str_addr = hexToAddr(file[addr_off_start+str_addr_start ..
addr_off_start+str_addr_end])
func_addr = hexToAddr(file[addr_off_start+func_addr_start ..
addr_off_start+func_addr_end])
addr_str_link[str_addr] = func_addr
end
#addr_str_link.each { |k,v| puts "#{k} => #{v}" }
last_addr_str = off_base + off_start
file[off_start .. off_end].split(//).each do |f_c|
if(f_c != "\0") then
func = func + f_c
Seitenansicht 30
1 2 ... 26 27 28 29 30 31 32

Kommentare zu diesen Handbüchern

Keine Kommentare