Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AvenCores committed Apr 22, 2023
0 parents commit f89de75
Show file tree
Hide file tree
Showing 7 changed files with 793 additions and 0 deletions.
20 changes: 20 additions & 0 deletions BUILD/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from sys import platform
from os import system
import getpass

user = getpass.getuser()


if platform == "win32":
system("rd /s /q build")
system("rd /s /q dist")
system("del /q *.spec")
system(f'pyinstaller --noconfirm --onefile --windowed --uac-admin --icon "../tlauncher.ico" --add-data "C:/Users/{user}/AppData/Local/Programs/Python/Python311/Lib/site-packages/customtkinter;customtkinter/" "../main.pyw"')
system("del /q *.spec")
system("rd /s /q build")
system("rd /s /q %USERPROFILE%\AppData\Local\pyinstaller")
system("explorer dist")

if platform == "linux" or platform == "linux2" or platform == "unix":
print("Для данной системы не поддерживается автоматическая сборка (возможно в будущем добавлю)!")
input()
3 changes: 3 additions & 0 deletions BUILD/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
customtkinter
pyinstaller
tkinter
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[![Youtube](https://user-images.githubusercontent.com/64781822/185656066-cdb875f1-ade6-4499-ae50-79a4f61fdc3e.png)](https://www.youtube.com/@hzfmain/) [![Telegram](https://user-images.githubusercontent.com/64781822/185657127-657c530b-3849-4931-ab91-63d6f0508330.png)](https://t.me/hzfnews) [![VK](https://user-images.githubusercontent.com/64781822/185657778-21a240e2-da1f-4b72-b37e-447c9adebfcb.png)](https://vk.com/hzforum1) [![Discord](https://user-images.githubusercontent.com/64781822/185659753-b997c6db-c91a-42c0-8876-6826d46568ba.png)](https://discord.com/invite/7bneGfUS5h)
___
# 💻 Меню
![menu-windows](https://i.imgur.com/3pXAk74.png)
___
# 👻 Установка
* **pip install -r requirements.txt**
___
# 💎 Запуск
* **python main.pyw** or **main.exe**
___
# 💰 Поддержать проект:

+ #### **QIWI Кошелёк**
+ [**`Перевод по никнейму`**](https://qiwi.com/n/AVENCORESDONATE)
+ **Сбер:** 2202 2050 7215 4401
+ **ВТБ:** 2200 2404 1001 8580
Binary file added main.exe
Binary file not shown.
79 changes: 79 additions & 0 deletions main.pyw
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
from tkinter.messagebox import showerror, showinfo
import customtkinter
import webbrowser
import tkinter


infotext = """Данный патч отключает рекламу в TLauncher.
После нажатия кнопки "Патч" происходит запись серверов, откуда грузится реклама в файл Hosts.
После патча желательно открыть командную строку и ввести команду "ipconfig /flushdns".
Если реклама осталась - перезагружай ПК, отключай VPN."""

def openavtor():
webbrowser.open("https://t.me/avencores")

def tllegavy():
webbrowser.open("https://tlaun.ch/?lang=ru")

def openyt():
webbrowser.open("https://www.youtube.com/watch?v=XnjADh9xxYI")

def patcher():
try:
patchtodir = "C:\Windows\System32\drivers\etc\hosts"

f = open(patchtodir, "a")
f.writelines("\n\n# Tlauncher patcher by avencores (Tkinter version)")
f.writelines("\n127.0.0.1 repo.tlauncher.org")
f.writelines("\n127.0.0.1 advancedrepository.com")
f.writelines("\n127.0.0.1 page.tlauncher.org")
f.writelines("\n127.0.0.1 tmonitoring.com")
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/downloads/configs/inner_servers.json")
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/lch/additional_hot_servers.json")
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/lch/servers/hot_servers-1.0.json")
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/lch/additional_hot_servers-1.0.json")
f.writelines("\n127.0.0.1 ad.tlauncher.org")
f.writelines("\n127.0.0.1 promo.tlauncher.org")
f.writelines("\n127.0.0.1 stats.tlauncher.org")
f.writelines("\n127.0.0.1 statistics.tlauncher.org")
f.writelines("\n127.0.0.1 analytics.tlauncher.org")
f.writelines("\n# End Tlauncher patcher by avencores (Tkinter version)")
showinfo(title="Успешно", message="Патч был успешно установлен!")
except:
showerror(title="Ошибка", message="Патч не был установлен!")


customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("blue")

class App(customtkinter.CTk):
def __init__(self):
super().__init__()

self.geometry("400x400")
self.title("Tlauncher RemoveAD")
self.iconbitmap("tlauncher.ico") # не работает при сборке
self.resizable(False, False)

self.frame = customtkinter.CTkTextbox(self, width=350, height=190, border_width=2)
self.frame.place(x=200, y=130, anchor=tkinter.CENTER)
self.frame.insert("0.0", infotext)

self.button = customtkinter.CTkButton(self, text="Патч", width=200, command=patcher)
self.button.place(x=200, y=250, anchor=tkinter.CENTER)

self.button = customtkinter.CTkButton(self, text="Автор утилиты", width=200, command=openavtor)
self.button.place(x=200, y=290, anchor=tkinter.CENTER)

self.button = customtkinter.CTkButton(self, text="Видео гайд (YouTube)", width=200, command=openyt)
self.button.place(x=200, y=330, anchor=tkinter.CENTER)

self.button = customtkinter.CTkButton(self, text="Скачать TLaucnher (TL Legacy)", width=200, command=tllegavy)
self.button.place(x=200, y=370, anchor=tkinter.CENTER)

if __name__ == "__main__":
app = App()
app.mainloop()
Binary file added tlauncher.ico
Binary file not shown.

0 comments on commit f89de75

Please sign in to comment.