Changed file system

This commit is contained in:
BarsTiger
2022-01-23 22:15:06 +02:00
parent 89bef345cb
commit 79e2d7266f
10 changed files with 12 additions and 11 deletions

View File

@@ -1,9 +1,10 @@
import argparse
import tui as tui
from console import cls
from manager import *
from virustotal import add_to_cfg
from uploader import upload
import os
import modules.tui as tui
from modules.console import cls
from modules.manager import install, uninstall
from modules.virustotal import add_to_cfg
from modules.uploader import upload
# Getting the arguments
parser = argparse.ArgumentParser(description='horsy - the best package manager')

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -2,16 +2,16 @@ import json
import threading
from rich import print
import requests
import vars
import modules.vars as horsy_vars
from tqdm import tqdm
import os
import zipfile
from virustotal import get_key, scan_file, get_report
from modules.virustotal import get_key, scan_file, get_report
def install(package, is_gui=False):
horsypath = os.popen('echo %HORSYPATH%').read().replace('\n', '') + '/'
r = requests.get(f"{vars.protocol}{vars.server_url}/packages/json/{package}").text
r = requests.get(f"{horsy_vars.protocol}{horsy_vars.server_url}/packages/json/{package}").text
try:
r = json.loads(r)
except:

View File

@@ -2,9 +2,9 @@ import json
import time
import requests
from rich import print
from auth import get_auth, del_auth
from modules.auth import get_auth, del_auth
import re
import vars
import modules.vars as horsy_vars
import os
@@ -105,7 +105,7 @@ def upload():
r = None
while r is None:
try:
r = requests.post(vars.protocol + vars.server_url + '/packages/new', json=request).text
r = requests.post(horsy_vars.protocol + horsy_vars.server_url + '/packages/new', json=request).text
r = json.loads(r)
if r['message'] == 'Unauthorized':