- Python Forensics - Home
- Python Forensics - Introduction
- Python Forensics - Installation of Python
- Python Forensics - Overview of Python
- Python Forensics - Basic Forensic Application
- Python Forensics - Hash Function
- Python Forensics - Cracking an Encryption
- Python Forensics - Virtualization
- Python Forensics - Network Forensics
- Python Forensics - Python Modules
- Python Forensics - Dshell and Scapy
- Python Forensics - Searching
- Python Forensics - Indexing
- Python Forensics - Python Imaging Library
- Python Forensics - Mobile Forensics
- Python Forensics - Network Time Protocol
- Python Forensics - Multiprocessing Support
- Python Forensics - Memory & Forensics
- Python Forensics - Forensics in Linux
- Python Forensics - Indicators of Compromise
- Python Forensics - Implementation of Cloud
- Python Forensic Resources
- Python Forensics - Quick Guide
- Python Forensics - Useful Resources
- Python Forensics - Discussion
Selected Reading
Python Forensic - Indexing
Indexing actually provides the investigator have a complete look at a file and gather potential evidence from it. The evidence could be contained within a file, a disk image, a memory snapshot, or a network trace.
Indexing helps in reducing time for time-consuming tasks such as keyword searching. Forensic investigation also involves interactive searching phase, where the index is used to rapidly locate keywords.
Indexing also helps in listing the keywords in a sorted list.
Example - Usage of Indexing
The following example shows how you can use indexing in Python.
main.py
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))
Output
The above script will produce the following output.
Index for sample : 1 Index for indexing : 3 Index of the character keyword found is 8
Advertisements