Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.UNIX.SHELL
bit BASHing
From
Rick Hohensee
@21:1/5 to
All
on Mon Aug 28 19:49:01 2023
The Bash/dd/od code after the #### produces this from an Android .dex file I had laying
around.
dex magic present. Feel it?
API version 035
0x3076b1f2 Adler32 checksum
0xfec24ca94c6da7e5a218946a98f885c887dd67cb sha1 hash
0x002fe7d0 file size
0x00000070 header size (0x70)
0x12345678 endianness constant
0x00000000 links size (0)
0x00000000 links offset
0x002fe6f4 map offset
0x000066f7 string IDs size
0x00000070 string IDs offset
0x00000c54 type IDs size
0x00019c4c type IDs index
0x00001346 proto IDs size
0x0001cd9c proto IDs index
0x0000500e field IDs size
0x0002b4e4 field IDs offset
0x00006383 method IDs size
0x00053554 method IDs offset
0x0000090e class defs size
0x0008516c class defs offset
0x002674a4 data size
0x0009732c data offset
##### view a .dex header
lop () {
dd if=$1 of=tmp bs=112 count=1 > tmp
}
hexbytes () {
od -An -w1 -v -t x1 tmp > tmp2
}
dexhead () { # < tmp2
let i=0
while read
do
b[$i]=$REPLY
let i+=1
done
if test ${b[0]} = 64 -a ${b[1]} = 65 -a ${b[2]} = 78
then
echo "dex magic present. Feel it?"
else
echo "No .dex magic tag. GAME OVER"
return
fi
echo -n "API version "
dd if=tmp bs=1 skip=4 count=3 of=version status=none
cat version
echo
printf "0x%s%s%s%s Adler32 checksum\n" ${b[11]} ${b[10]} ${b[9]} ${b[8]} printf "0x%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s sha1 hash\n" ${b[31]} ${b[30]} ${b[29]} ${b[28]}${b[27]} ${b[26]} ${b[25]} ${b[24]}${b[23]} ${b[22]} ${b[21]} ${b[20]}${b[19]} ${b[18]} ${b[17]} ${b[16]}${b[15]} ${b[14]} ${b[13]} ${b[12]}
printf "0x%s%s%s%s file size \n"${b[35]} ${b[34]} ${b[33]} ${b[32]}
printf "0x%s%s%s%s header size (0x70)\n" ${b[39]} ${b[38]} ${b[37]} ${b[36]}
printf "0x%s%s%s%s endianness constant\n" ${b[43]} ${b[42]}${b[41]} ${b[40]}
printf "0x%s%s%s%s links size (0)\n" ${b[47]} ${b[46]}${b[45]} ${b[44]} printf "0x%s%s%s%s links offset \n" ${b[51]} ${b[50]}${b[49]} ${b[48]} printf "0x%s%s%s%s map offset\n" ${b[55]} ${b[54]}${b[53]} ${b[52]}
printf "0x%s%s%s%s string IDs size\n" ${b[59]} ${b[58]} ${b[57]} ${b[56]} printf "0x%s%s%s%s string IDs offset \n" ${b[63]} ${b[62]}${b[61]} ${b[60]}
printf "0x%s%s%s%s type IDs size\n" ${b[67]} ${b[66]}${b[65]} ${b[64]} printf "0x%s%s%s%s type IDs index\n" ${b[71]} ${b[70]} ${b[69]} ${b[68]}
printf "0x%s%s%s%s proto IDs size\n" ${b[75]} ${b[74]} ${b[73]} ${b[72]}
printf "0x%s%s%s%s proto IDs index\n" ${b[79]} ${b[78]} ${b[77]} ${b[76]}
printf "0x%s%s%s%s field IDs size\n" ${b[83]} ${b[82]} ${b[81]} ${b[80]}
printf "0x%s%s%s%s field IDs offset\n" ${b[87]} ${b[86]} ${b[85]} ${b[84]}
printf "0x%s%s%s%s method IDs size\n" ${b[91]} ${b[90]} ${b[89]} ${b[88]}
printf "0x%s%s%s%s method IDs offset\n" ${b[95]} ${b[94]} ${b[93]} ${b[92]}
printf "0x%s%s%s%s class defs size\n" ${b[99]} ${b[98]} ${b[97]} ${b[96]}
printf "0x%s%s%s%s class defs offset\n" ${b[103]} ${b[102]} ${b[101]} ${b[100]}
printf "0x%s%s%s%s data size\n" ${b[107]} ${b[106]} ${b[105]} ${b[104]} printf "0x%s%s%s%s data offset\n" ${b[111]} ${b[110]} ${b[109]} ${b[108]}
}
##### Rick rickfordictator.com Hohensee Aug. 2023
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Krenn
Sat Jun 6 11:38:56 2026
from
Sydney, Nsw
via
Telnet
Furryboy
Sat Jun 6 10:56:29 2026
from
Romania, Galati
via
SSH
Centurion
Fri Jun 5 22:28:01 2026
from
Berea, Ohio
via
Telnet
Ab Cadd
Fri Jun 5 17:52:51 2026
from
Sheboygan, Wi
via
Telnet
Gwylbert
Fri Jun 5 06:28:52 2026
from
Sydney, Nsw
via
Telnet
Centurion
Thu Jun 4 23:42:23 2026
from
Berea, Ohio
via
Telnet
Michal Wronka
Thu Jun 4 23:19:58 2026
from
Wroclaw, Poland
via
Telnet
Michal Wronka
Thu Jun 4 23:17:20 2026
from
Wroclaw, Poland
via
SSH
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
715
Nodes:
16 (
3
/
13
)
Uptime:
143:01:10
Calls:
12,089
Calls today:
2
Files:
14,998
Messages:
6,517,457