-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUPX Soft Global.py
52 lines (47 loc) · 1.68 KB
/
UPX Soft Global.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import glob
import os
from os import walk
from time import sleep
import ctypes
from win32api import GetLogicalDriveStrings
from colorama import Fore
from config import *
ctypes.windll.kernel32.SetConsoleTitleW('UPX Soft by httpshotmaker')
def clean():
os.system('cls' if os.name == 'nt' else 'clear')
clean()
def banner():
print(Fore.RED +
' __ __ .______ ___ ___ _______. ______ _______ .___________.\n',
'| | | | | _ \ \ \ / / / | / __ \ | ____|| |\n',
'| | | | | |_) | \ V / | (----`| | | | | |__ `---| |----`\n',
'| | | | | ___/ > < \ \ | | | | | __| | | \n',
"| `--' | | | / . \ .----) | | `--' | | | | | \n",
' \______/ | _| /__/ \__\ |_______/ \______/ |__| |__| \n',
'by httpshotmaker\n\n'
)
banner()
print(Fore.GREEN + 'Работа программы может занять длительное время, ожидайте')
i = 0
for drive in GetLogicalDriveStrings().split('\000')[:-1]:
if f'{os.getenv("SystemDrive")}' in drive:
continue
sleep(drv)
for root, _, _ in walk(drive):
sleep(fol)
ctypes.windll.kernel32.SetConsoleTitleW('UPX Soft by httpshotmaker')
root = "".join(root)
targetPattern = rf"{root}\*.exe"
soft = glob.glob(targetPattern)
if soft == list():
continue
i += 1
ctypes.windll.kernel32.SetConsoleTitleW(f'Folders found: {i}')
for j in soft:
clean()
banner()
print(Fore.GREEN + '')
ctypes.windll.kernel32.SetConsoleTitleW(f'Working with {j}')
os.system(f'upx --best "{j}"')
clean()
banner()