Searching in Python Forensics

Vicky Bal

a day ago

Python Forensics | Insideaiml
Python Forensics | Insideaiml

What is Searching in forensics?

Table of Content
  • What is Searching in forensics?
  • Example
      One of the most important parts of forensic investigation is Searching. It is mostly equivalent to the investigation of who is running the evidence.
Searching is a keyword from the message, we can search for evidence with the help of this keyword. We can perform our tasks with some knowledge and expertise if we know what to search in a file along with the deleted files.
Python provides us a built-in mechanism with a standard library to perform our searching task. With the help of searching, we can find answers to questions like ‘who’, ‘what’, ‘where’, and ‘when’, etc.

Let’s take an example


     In the example take taken here, we have taken two strings and used find function to check whether the first string contains the second one or not.
# Searching a particular word from a given string
str1 = "This is a InsideAIML. How may I help you"
str2 = "InsideAIML"

print(str1.find(str2, 10))
print(str1.find(str2, 40))
The above program output-
Python provides a function “find” which helps us to search a message or a paragraph.

Submit Review