mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Compare commits
5 Commits
55e4f86-dev
...
main-cli
| Author | SHA1 | Date | |
|---|---|---|---|
| 25d72dfbf9 | |||
| b3f72406e0 | |||
| 4052e14f41 | |||
| 628e9ee2c4 | |||
| 42eea1f371 |
@@ -1,63 +1,35 @@
|
||||
# PirateLauncher - A Download Manager/Launcher
|
||||
# SoftwareManager - A Download Manager/Launcher
|
||||
|
||||
## Description
|
||||
PirateLauncher is a Python-based GUI/TUI tool that simplifies downloading and managing pirated software from various sources.
|
||||
SoftwareManager is a Python-based GUI/TUI tool that simplifies downloading and managing free software from various sources.
|
||||
|
||||
## Features
|
||||
- VPN Binding (impl. soon)
|
||||
- Bandwidth/Download speed limiting (impl. soon)
|
||||
- UI Theming
|
||||
- Start downloads via a predefined magnet URI.
|
||||
- View detailed download information (name, speed, and status).
|
||||
|
||||
## Requirements
|
||||
- Python 3.x
|
||||
- `aria2c` (installed and available in your PATH)
|
||||
- Python libraries:
|
||||
- `aria2p`
|
||||
- `keyboard`
|
||||
- View detailed download information (name, speed, and status). (improved impl. soon)
|
||||
|
||||
## Installation
|
||||
1. Download the binary file for your operating system from releases
|
||||
https://github.com/KeksPirates/SoftwareManager/releases
|
||||
2. Run the file
|
||||
|
||||
## Manual Installation
|
||||
1. Ensure Python 3.x is installed on your system.
|
||||
2. Install Aria2:
|
||||
2. Install Dependencies:
|
||||
```bash
|
||||
sudo apt install aria2 # For Debian/Ubuntu/Mint
|
||||
paru/yay -S aria2 # For Arch from AUR
|
||||
brew install aria2 # For macOS
|
||||
choco install aria2 # For Windows
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
4. Install the required Python libraries:
|
||||
3. Run main.py:
|
||||
```bash
|
||||
pip install aria2p keyboard
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
## Usage
|
||||
1. Clone or download PirateLauncher to your local machine.
|
||||
2. Run the launcher:
|
||||
```bash
|
||||
python pirate_launcher.py
|
||||
```
|
||||
3. Use the following keyboard controls:
|
||||
- Press **`d`** to start/resume a download.
|
||||
- Press **`s`** to pause all downloads.
|
||||
- Press **`q`** to quit the launcher.
|
||||
|
||||
|
||||
## Configuration
|
||||
- To use a different magnet URI, update the `magnet_uri` variable in the script.
|
||||
- Ensure the RPC port (default: 6800) is open and accessible.
|
||||
|
||||
## Example
|
||||
Run the following command to launch PirateLauncher and control downloads:
|
||||
|
||||
```bash
|
||||
python pirate_launcher.py
|
||||
```
|
||||
|
||||
Press `d` to start the predefined download, `s` to pause, and `q` to quit.
|
||||
|
||||
## Notes
|
||||
- Aria2 must be installed and accessible from your command line.
|
||||
- If you want to host your own server, clone the server branch of this repo, enter your cookie for rutracker.org and run server.py. Detailed Instructions on how to get your rutracker cookie are in the README of its branch.
|
||||
- This tool is for educational purposes only. Use it responsibly.
|
||||
|
||||
---
|
||||
|
||||
**Disclaimer:** PirateLauncher is intended for legal and ethical use only. Ensure compliance with applicable laws and regulations when using this tool.
|
||||
|
||||
**Disclaimer:** SoftwareManager is intended for legal and ethical use only. Ensure compliance with applicable laws and regulations when using this tool.
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
import aria2p
|
||||
import subprocess
|
||||
import keyboard
|
||||
import os
|
||||
# from .scraper import uri
|
||||
|
||||
aria2 = aria2p.API(
|
||||
aria2p.Client(
|
||||
host="http://localhost",
|
||||
port=6800,
|
||||
secret=""
|
||||
)
|
||||
)
|
||||
|
||||
download_paused = False
|
||||
def pauseDownload(_):
|
||||
global download_paused
|
||||
if download_paused == True:
|
||||
print("Error: Download already paused.")
|
||||
else:
|
||||
print("Download is being paused...")
|
||||
download_paused = True
|
||||
aria2.pause_all()
|
||||
|
||||
def startDownload(_):
|
||||
global download_paused
|
||||
if download_paused == True:
|
||||
aria2.resume_all()
|
||||
print("Download Resumed!")
|
||||
download_paused = False
|
||||
else:
|
||||
print("Download Started!")
|
||||
download = aria2.add_magnet(uri)
|
||||
download_paused = False
|
||||
|
||||
def terminate():
|
||||
return
|
||||
|
||||
# print("Enter Download URL: ")
|
||||
# uri = input()
|
||||
|
||||
#Magnet Download
|
||||
# downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads")
|
||||
# subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"])
|
||||
# magnet_uri = "magnet:?xt=urn:btih:7FBF03CCC9115260DC50102E5A31E83E91422A79&dn=Ready+or+Not%3A+LSPD+Bundle+%28v66884+%2B+4+DLCs%2FBonuses+%2B+Windows+7+Fix%2C+MULTi12%29+%5BFitGirl+Repack%2C+Selective+Download+-+from+34.7+GB%5D&tr=udp%3A%2F%2Fopentor.net%3A6969&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&tr=udp%3A%2F%2Ftracker.theoks.net%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.ccp.ovh%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=http%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=https%3A%2F%2Ftracker.tamersunion.org%3A443%2Fannounce&tr=udp%3A%2F%2Fexplodie.org%3A6969%2Fannounce&tr=http%3A%2F%2Ftracker.bt4g.com%3A2095%2Fannounce&tr=udp%3A%2F%2Fbt2.archive.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fbt1.archive.org%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.filemail.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker1.bt.moack.co.kr%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=http%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Fopentracker.i2p.rocks%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.zer0day.to%3A1337%2Fannounce"
|
||||
|
||||
# #Torrent Download
|
||||
# downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads")
|
||||
# subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"])
|
||||
# torrent_path = "C:/Users/Downloads/Ready or Not.torrent"
|
||||
|
||||
#Direct Download
|
||||
downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads")
|
||||
subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"])
|
||||
uri
|
||||
|
||||
downloads = aria2.get_downloads()
|
||||
|
||||
for download in downloads:
|
||||
print(download.name, downloads.download_speed, download.status)
|
||||
|
||||
keyboard.on_press_key("d", startDownload, suppress=False)
|
||||
keyboard.on_press_key("s", pauseDownload, suppress=False)
|
||||
keyboard.on_press_key("q", pauseDownload, terminate)
|
||||
keyboard.wait("q")
|
||||
@@ -0,0 +1,21 @@
|
||||
import aria2p
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
def run_aria2p():
|
||||
|
||||
aria2 = aria2p.API(
|
||||
aria2p.Client(
|
||||
host="http://localhost",
|
||||
port=6800,
|
||||
secret=""
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads")
|
||||
subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"])
|
||||
|
||||
|
||||
return aria2
|
||||
@@ -0,0 +1,19 @@
|
||||
from .aria2p_server import run_aria2p
|
||||
import aria2p
|
||||
import subprocess
|
||||
import os
|
||||
# from .scraper import uri
|
||||
def start_client():
|
||||
global aria2
|
||||
aria2 = run_aria2p()
|
||||
|
||||
def add_magnet(uri):
|
||||
aria2.add_magnet(uri)
|
||||
|
||||
|
||||
def terminate():
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QLayoutItem, QLineEdit, QWidget, QVBoxLayout, QHBoxLayout, QListWidget, QListWidgetItem, QLabel, QPushButton
|
||||
import sys
|
||||
from uztracker_scraper import scrape_uztracker
|
||||
|
||||
|
||||
class MainWindow(QtWidgets.QMainWindow, QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
searchresults = []
|
||||
|
||||
self.setWindowTitle("Software Manager")
|
||||
self.setGeometry(100, 100, 800, 600)
|
||||
|
||||
self.controls = QWidget()
|
||||
self.controlsLayout = QVBoxLayout()
|
||||
|
||||
# Widgets
|
||||
self.searchbar = QLineEdit()
|
||||
self.searchbar.setPlaceholderText("Search for software...")
|
||||
self.searchbar.setClearButtonEnabled(True)
|
||||
self.searchbar.setMinimumHeight(30)
|
||||
self.searchbar.returnPressed.connect(self.return_pressed)
|
||||
|
||||
self.button = QtWidgets.QPushButton("Download")
|
||||
self.softwareList = QListWidget()
|
||||
|
||||
container = QWidget()
|
||||
containerLayout = QVBoxLayout()
|
||||
containerLayout.addWidget(self.searchbar)
|
||||
|
||||
containerLayout.addWidget(self.softwareList)
|
||||
self.softwareList.addItems(searchresults)
|
||||
|
||||
|
||||
containerLayout.addWidget(self.button)
|
||||
self.button.clicked.connect(lambda: print(f"Downloading {self.softwareList.currentItem().text()}"), )
|
||||
|
||||
|
||||
container.setLayout(containerLayout)
|
||||
self.setCentralWidget(container)
|
||||
|
||||
containerLayout.setAlignment(Qt.AlignmentFlag.AlignBottom)
|
||||
|
||||
def return_pressed(self):
|
||||
search_text = self.searchbar.text()
|
||||
self.postnames, self.postlinks = scrape_uztracker(search_text)
|
||||
self.softwareList.clear()
|
||||
if self.postnames:
|
||||
self.softwareList.addItems(self.postnames)
|
||||
print("User searched for:", search_text)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run_gui():
|
||||
app = QtWidgets.QApplication([])
|
||||
|
||||
widget = MainWindow()
|
||||
widget.show()
|
||||
|
||||
sys.exit(app.exec())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_gui()
|
||||
@@ -91,12 +91,6 @@ def get_magnet_link(post_url):
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
search_input = input("Enter the Name of the Program you want to search for: ")
|
||||
selected = scrape_uztracker(search_input)
|
||||
maintitle = get_post_title(selected)
|
||||
magnetlink = get_magnet_link(selected)
|
||||
print(maintitle)
|
||||
print(magnetlink)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,64 @@
|
||||
from core.gui import run_gui
|
||||
from ui.clinterface import asciititle;
|
||||
from core.uztracker_scraper import scrape_uztracker
|
||||
from core.uztracker_scraper import get_magnet_link
|
||||
from core.downloading.download import start_client
|
||||
from core.downloading.download import add_magnet
|
||||
import os
|
||||
|
||||
|
||||
|
||||
def search():
|
||||
asciititle()
|
||||
searchquery = input("Enter Search Query: ")
|
||||
result = scrape_uztracker(searchquery)
|
||||
if result is None:
|
||||
clear()
|
||||
asciititle()
|
||||
print("No results found for your Query.\n")
|
||||
return
|
||||
return result
|
||||
|
||||
def select_result(result):
|
||||
resulttitles, resultlinks = result
|
||||
clear()
|
||||
asciititle()
|
||||
for i, title in enumerate(resulttitles, 1):
|
||||
print(f"({i}) {title}")
|
||||
selection = input("\n Enter the Number of the Program you want to download: ")
|
||||
|
||||
|
||||
try:
|
||||
index = int(selection) - 1
|
||||
if 0 <= index < len(resultlinks): # note for myself: py starts counting at 0; check if number is not negative, check if number is not more than list length.
|
||||
selected = "https://uztracker.net/" + resultlinks[index].lstrip("./")
|
||||
post_url = selected
|
||||
return selected
|
||||
else:
|
||||
print("Invalid Selection.")
|
||||
|
||||
except ValueError:
|
||||
print(Exception)
|
||||
return
|
||||
|
||||
|
||||
def clear():
|
||||
os.system('cls' if os.name == 'nt' else 'clear')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
clear()
|
||||
results = search()
|
||||
selected = select_result(results)
|
||||
print(selected)
|
||||
uri = get_magnet_link(selected)
|
||||
start_client()
|
||||
add_magnet(uri)
|
||||
|
||||
|
||||
|
||||
|
||||
run_gui()
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
def asciititle():
|
||||
print(f"""
|
||||
|
||||
_____ __ _ __ __
|
||||
/ ____| / _| | | \/ |
|
||||
| (___ ___ | |_| |___ ____ _ _ __ ___| \ / | __ _ _ __ __ _ __ _ ___ _ __
|
||||
\___ \ / _ \| _| __\ \ /\ / / _` | '__/ _ \ |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
|
||||
____) | (_) | | | |_ \ V V / (_| | | | __/ | | | (_| | | | | (_| | (_| | __/ |
|
||||
|_____/ \___/|_| \__| \_/\_/ \__,_|_| \___|_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
|
||||
__/ |
|
||||
|___/
|
||||
|
||||
""")
|
||||
|
||||
Reference in New Issue
Block a user