Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   515

Simple Wallets Finder From Logs - Python

by nakedpoet - 06 February, 2024 - 12:38 PM
This post is by a banned member (nakedpoet) - Unhide
nakedpoet  
Registered
22
Posts
7
Threads
3 Years of service
#1
(This post was last modified: 06 February, 2024 - 12:40 PM by nakedpoet. Edited 2 times in total.)
Paste this script in Logs folder and run it in cmd
results save in folder name "Cold Wallets"
 
Code:
 
[font][font]import os
import shutil

class LogChecker:
    default_dir = str(os.path.abspath(os.getcwd()))
    main_dir_check = False
    wallet_count = 0
    wallet_destination_dir = ""

    def __main__(self):
        self.log_run()

    def log_run(self):
        for dir in os.listdir():
            if os.path.isdir(dir):
                os.chdir(dir)
                for wallet_dir_find in os.listdir():
                    if str(wallet_dir_find) == "Wallets":
                        self.main_dir_check_method()
                        self.how_much_wallets_check(wallet_dir_find)
                        self.wallet_path_create()
                        shutil.copytree(str(os.path.abspath(os.getcwd())), f"{self.wallet_destination_dir}/{str(os.path.basename(os.getcwd()) )}")
                        self.wallet_count = 0
                os.chdir(self.default_dir)



    def main_dir_check_method(self):
        if self.main_dir_check == False:
            cold_wallet_dir_find = False
            current_dir = str(os.path.abspath(os.getcwd()))
            os.chdir(self.default_dir)
            for dir in os.listdir():
                if str(dir) == ("Холодные кошельки"):
                    shutil.rmtree("Холодные кошельки")
            os.mkdir("Холодные кошельки")
            os.chdir(current_dir)
            self.main_dir_check = True

    def how_much_wallets_check(self, wallet_dir):
        current_dir = str(os.path.abspath(os.getcwd()))
        os.chdir(wallet_dir)
        for wallet in os.listdir():
            self.wallet_count += 1
        os.chdir(current_dir)

    def wallet_path_create(self):
        current_dir = str(os.path.abspath(os.getcwd()))
        wallet_count_found = False
        os.chdir(str(self.default_dir))
        os.chdir("Холодные кошельки")
        for wallet_count_dir in os.listdir():
            if str(wallet_count_dir) == str(self.wallet_count):
                wallet_count_found = True

        if wallet_count_found == True:
            os.chdir(str(self.wallet_count))
        else:
            os.mkdir(str(self.wallet_count))
            os.chdir(str(self.wallet_count))

        self.wallet_destination_dir = str(os.path.abspath(os.getcwd()))
        os.chdir(current_dir)


print("Start")
Checks = LogChecker()
Checks.log_run()
print("End")[/font][/font] 
This post is by a banned member (sawyer7) - Unhide

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)