日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

如何从Android so中提取URL

發布時間:2023/12/15 28 生活家
生活随笔 收集整理的這篇文章主要介紹了 如何从Android so中提取URL 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

  由于工作需要,研究了一下如何從Android so中提取URL。Android so實際上是一個ELF(Executable and Linking Format)格式的文件,要從中提取URL就需要首先了解ELF文件格式。URL實際上就是一個字符串,要從Android so中提取URL,實際上我們只需知道ELF文件的字符串存儲在哪個區段就可以了。以下為ELF文件區塊表的介紹:

.text where code stands, as said above. objdump -drS .process.o will show you that
.data where global tables, variables, etc. stand. objdump -s -j .data .process.o will hexdump it.
.bss don't look for bits of .bss in your file: there's none. That's where your uninitialized arrays and variable are, and the loader 'knows' they should be filled with zeroes ... there's no point storing more zeroes on your disk than there already are, is it?
.rodata that's where your strings go, usually the things you forgot when linking and that cause your kernel not to work. objdump -s -j .rodata .process.o will hexdump it. Note that depending on the compiler, you may have more sections like this.
.comment & .note just comments put there by the compiler/linker toolchain
.stab & .stabstr debugging symbols & similar information.

  注:要想了解詳細的ELF文件格式見http://wiki.osdev.org/ELF。此文只介紹與主題相關的知識。

從表中的粗體字可以知道.rodata區段便是ELF文件字符串的存儲位置,使用objdump -s -j .rodata filename命令可以獲取所有字符串信息,然后就可以提取URL了。

總結

以上是生活随笔為你收集整理的如何从Android so中提取URL的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。