|
本帖最后由 330wang 于 2014-6-10 11:56 编辑
下面是使用方法:
通过研究得到,SQLite数据库中的表占用一定的页,如果有删除数据的话,痕迹有可能保存在数据库中表占用过的页中.
这些删除的数据不会跑到别的页上.
这就是说,为了精确定位页,可以对数据库把这个表所占用的页全部提取出来.
下面的脚本可以把通话记录这个表中的数据完全提取出来(针对页大小为1024定制的):
运行脚本的时候要在D盘下建立330wang这个文件夹.
- messagebox "请保存所有的文件,再点(ok/确定)!!"
- messagebox "再次确认,保存所有文件了吗?"
- closeall
- create "d:\330wang\calls.txt" 0
- write "contacts pages are:"
- write 0x0d0a
- save
- create "d:\330wang\calls.db"0
- messagebox "请打开数据库文件"
- open ?
- find "tablecallscalls" down
- iffound
- move 15
- read pageid 1 //这个值有可能需要修改
- goto (1024*(pageid-1))
- assign pageoffset currentpos
- [hide]read pagetype 1
- move 2
- read entry1 1
- read entry2 1
- assign entry (entry1*256+entry2)
- Release entry1
- Release entry2
- read entrybegin1 1[/hide]read entrybegin2 1
- assign entrybegin (entrybegin1*256+entrybegin2)
- Release entrybegin1
- Release entrybegin2
- move 1
- read lastpage1 1
- read lastpage2 1
- read lastpage3 1
- read lastpage4 1
- assign lastpage (lastpage1*16777216+lastpage2*65536+lastpage3*256+lastpage4)
- IntToStr lastpages lastpage
- Release lastpage1
- Release lastpage2
- Release lastpage3
- Release lastpage4
- {
- read a1 1
- read a2 1
- assign a (a1*256+a2)
- Release a1
- Release a2
- assign offset currentpos
- goto (a+pageoffset)
- read data1 1
- read data2 1
- read data3 1
- read data4 1
- assign data (data1*16777216+data2*65536+data3*256+data4)
- goto (1024*(data-1))
- read db 1024
- nextobj
- IntToStr datas data
- write datas
- write 0x0d0a
- save
- nextobj
- write db
- save
- nextobj
- goto offset
- }[entry]
- nextobj
- write lastpages
- save
- nextobj
- nextobj
- goto (1024*(lastpage-1))
- read lastpagedb 1024
- nextobj
- nextobj
- write lastpagedb
- save
复制代码
|
|