• XSS.stack #1 – первый литературный журнал от юзеров форума

Simple Wallets Finder From Logs

nakedpoet

ripper
КИДАЛА
Регистрация
15.08.2020
Сообщения
235
Реакции
55
Гарант сделки
1
Пожалуйста, обратите внимание, что пользователь заблокирован
Paste this script in Logs folder and run it in cmd
results save in folder name "Cold Wallets"

Python:
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")
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх