Python取证 – 索引

Python取证 – 索引

索引 实际上为调查员提供了对文件的完整观察,并从中收集潜在的证据。证据可能包含在文件、磁盘图像、内存快照或网络跟踪中。

索引有助于减少耗费时间的任务,如 关键词搜索。 法医调查还涉及交互式搜索阶段,其中索引被用来快速定位关键词。

索引也有助于在一个排序的列表中列出关键词。

例子

下面的例子显示了你如何在Python中使用 索引

aList = [123, 'sample', 'zara', 'indexing'];

print "Index for sample : ", aList.index('sample')
print "Index for indexing : ", aList.index('indexing')

str1 = "This is sample message for forensic investigation indexing";
str2 = "sample";

print "Index of the character keyword found is " 
print str1.index(str2)
Python

上述脚本将产生以下输出。

Python取证 - 索引

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程

登录

注册