Temporary Advertisements:
Ad
Ad
Ad
[LOCALLY] search for information in hundreds of txt
by Noelia - Saturday August 3, 2024 at 02:30 PM
#1
I make this script in python to find information in txt. It is very simple.

You just have to past a directory folder like F:/user/db
and the information you want to found in the lot of document you have in the directory folder. like [email protected]

If you know some tool to do that you can say it or if you want to add some feature i can edit the post. Sometime they are some bugs and the script doesn't want to open the file but it work the most of the time. It is for windows.




import os

def find(directory, search_string):
        files_find = []
        for file_name in os.listdir(directory):
                if file_name.endswith('.txt'):
                        file_path = os.path.join(directory, file_name)
                        with open(file_path, 'r', encoding='utf-8') as file:
                                content = file.read()
                                if search_string in content:
                                        files_find.append(file_path)
        if files_find:
                for file in files_find:
                        print(f"data find in : {file}")
                        os.startfile(file)
        else:
                print("not found")

directory = input("Enter the path to the folder containing your files: ")
search_string = input("Enter the sequence of characters to search for: ")
find(directory, search_string)

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#2
How to run this or set up, I am a noob
Reply
#3
(Aug 03, 2024, 04:39 PM)Nikkimous Wrote: How to run this or set up, I am a noob

Before you need to download python and install the requierment ( os )
you can copy it in a txt file and change the expension

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#4
(Aug 03, 2024, 02:30 PM)Noelia Wrote: I make this script in python to find information in txt. It is very simple.

You just have to past a directory folder like F:/user/db
and the information you want to found in the lot of document you have in the directory folder. like [email protected]

If you know some tool to do that you can say it or if you want to add some feature i can edit the post. Sometime they are some bugs and the script doesn't want to open the file but it work the most of the time. It is for windows.




import os

def find(directory, search_string):
        files_find = []
        for file_name in os.listdir(directory):
                if file_name.endswith('.txt'):
                        file_path = os.path.join(directory, file_name)
                        with open(file_path, 'r', encoding='utf-8') as file:
                                content = file.read()
                                if search_string in content:
                                        files_find.append(file_path)
        if files_find:
                for file in files_find:
                        print(f"data find in : {file}")
                        os.startfile(file)
        else:
                print("not found")

directory = input("Enter the path to the folder containing your files: ")
search_string = input("Enter the sequence of characters to search for: ")
find(directory, search_string)

The difference with ctrl+F is just the listing of information?
Reply
#5
(Aug 03, 2024, 05:33 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 02:30 PM)Noelia Wrote: I make this script in python to find information in txt. It is very simple.

You just have to past a directory folder like F:/user/db
and the information you want to found in the lot of document you have in the directory folder. like [email protected]

If you know some tool to do that you can say it or if you want to add some feature i can edit the post. Sometime they are some bugs and the script doesn't want to open the file but it work the most of the time. It is for windows.




import os

def find(directory, search_string):
        files_find = []
        for file_name in os.listdir(directory):
                if file_name.endswith('.txt'):
                        file_path = os.path.join(directory, file_name)
                        with open(file_path, 'r', encoding='utf-8') as file:
                                content = file.read()
                                if search_string in content:
                                        files_find.append(file_path)
        if files_find:
                for file in files_find:
                        print(f"data find in : {file}")
                        os.startfile(file)
        else:
                print("not found")

directory = input("Enter the path to the folder containing your files: ")
search_string = input("Enter the sequence of characters to search for: ")
find(directory, search_string)

The difference with ctrl+F is just the listing of information?

I wish you good luck in doing ctrl+f in a hundred txt files

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#6
(Aug 03, 2024, 05:43 PM)Noelia Wrote:
(Aug 03, 2024, 05:33 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 02:30 PM)Noelia Wrote: I make this script in python to find information in txt. It is very simple.

You just have to past a directory folder like F:/user/db
and the information you want to found in the lot of document you have in the directory folder. like [email protected]

If you know some tool to do that you can say it or if you want to add some feature i can edit the post. Sometime they are some bugs and the script doesn't want to open the file but it work the most of the time. It is for windows.




import os

def find(directory, search_string):
        files_find = []
        for file_name in os.listdir(directory):
                if file_name.endswith('.txt'):
                        file_path = os.path.join(directory, file_name)
                        with open(file_path, 'r', encoding='utf-8') as file:
                                content = file.read()
                                if search_string in content:
                                        files_find.append(file_path)
        if files_find:
                for file in files_find:
                        print(f"data find in : {file}")
                        os.startfile(file)
        else:
                print("not found")

directory = input("Enter the path to the folder containing your files: ")
search_string = input("Enter the sequence of characters to search for: ")
find(directory, search_string)

The difference with ctrl+F is just the listing of information?

I wish you good luck in doing ctrl+f in a hundred txt files

lool, I misread it, it's on unopened files right?
Reply
#7
(Aug 03, 2024, 05:48 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 05:43 PM)Noelia Wrote:
(Aug 03, 2024, 05:33 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 02:30 PM)Noelia Wrote: I make this script in python to find information in txt. It is very simple.

You just have to past a directory folder like F:/user/db
and the information you want to found in the lot of document you have in the directory folder. like [email protected]

If you know some tool to do that you can say it or if you want to add some feature i can edit the post. Sometime they are some bugs and the script doesn't want to open the file but it work the most of the time. It is for windows.




import os

def find(directory, search_string):
        files_find = []
        for file_name in os.listdir(directory):
                if file_name.endswith('.txt'):
                        file_path = os.path.join(directory, file_name)
                        with open(file_path, 'r', encoding='utf-8') as file:
                                content = file.read()
                                if search_string in content:
                                        files_find.append(file_path)
        if files_find:
                for file in files_find:
                        print(f"data find in : {file}")
                        os.startfile(file)
        else:
                print("not found")

directory = input("Enter the path to the folder containing your files: ")
search_string = input("Enter the sequence of characters to search for: ")
find(directory, search_string)

The difference with ctrl+F is just the listing of information?

I wish you good luck in doing ctrl+f in a hundred txt files

lool, I misread it, it's on unopened files right?

yes and it opens if there is what you are looking for

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#8
(Aug 03, 2024, 05:50 PM)Noelia Wrote:
(Aug 03, 2024, 05:48 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 05:43 PM)Noelia Wrote:
(Aug 03, 2024, 05:33 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 02:30 PM)Noelia Wrote: I make this script in python to find information in txt. It is very simple.

You just have to past a directory folder like F:/user/db
and the information you want to found in the lot of document you have in the directory folder. like [email protected]

If you know some tool to do that you can say it or if you want to add some feature i can edit the post. Sometime they are some bugs and the script doesn't want to open the file but it work the most of the time. It is for windows.




import os

def find(directory, search_string):
        files_find = []
        for file_name in os.listdir(directory):
                if file_name.endswith('.txt'):
                        file_path = os.path.join(directory, file_name)
                        with open(file_path, 'r', encoding='utf-8') as file:
                                content = file.read()
                                if search_string in content:
                                        files_find.append(file_path)
        if files_find:
                for file in files_find:
                        print(f"data find in : {file}")
                        os.startfile(file)
        else:
                print("not found")

directory = input("Enter the path to the folder containing your files: ")
search_string = input("Enter the sequence of characters to search for: ")
find(directory, search_string)

The difference with ctrl+F is just the listing of information?

I wish you good luck in doing ctrl+f in a hundred txt files

lool, I misread it, it's on unopened files right?

yes and it opens if there is what you are looking for

no matter what the file size?
if I want to search for an e-mail in all my databases, will it work?
Reply
#9
(Aug 03, 2024, 05:52 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 05:50 PM)Noelia Wrote:
(Aug 03, 2024, 05:48 PM)Elgrandetiti777 Wrote:
(Aug 03, 2024, 05:43 PM)Noelia Wrote:
(Aug 03, 2024, 05:33 PM)Elgrandetiti777 Wrote: The difference with ctrl+F is just the listing of information?

I wish you good luck in doing ctrl+f in a hundred txt files

lool, I misread it, it's on unopened files right?

yes and it opens if there is what you are looking for

no matter what the file size?
if I want to search for an e-mail in all my databases, will it work?

yes you can search for an email but your db must be in .txt then for the maximum size I admit that I don't know.

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#10
SMART ASS NIGGA
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How To Hack WhatsApp Of Your Friend By Sending A Single Link HackingRealm 2,745 204,149 26 minutes ago
Last Post: 2Fe
  BTMOB 3.6.3 Rat Turioal A-Z Understanding CrimsonVoid 5 404 33 minutes ago
Last Post: relic1086
  Stealer Discord Python FUD Steal crypto,cookies,files Nightowl 98 8,426 1 hour ago
Last Post: relic1086
  How to buy crypto [NO KYC] [NEW METHOD] hecker111 232 8,296 3 hours ago
Last Post: Frings158
  How to make money with hacking ssrf 1,302 100,848 3 hours ago
Last Post: rshiesty

Forum Jump:


 Users browsing this forum: