This repository has been archived by the owner on May 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import os | ||
import time | ||
import random | ||
import ctypes | ||
import json | ||
import requests | ||
from colorama import Fore | ||
try: | ||
import colorama | ||
except ModuleNotFoundError: | ||
os.system("pip install colorama") | ||
from datetime import datetime | ||
from colorama import Fore | ||
while True: | ||
os.system('cls') | ||
print(Fore.RED + " ██████╗ ██╗████████╗██╗████████╗██████╗ █████╗ ██████╗██╗ ██╗") | ||
print(Fore.YELLOW + "██╔════╝ ██║╚══██╔══╝██║╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██║ ██╔╝") | ||
print(Fore.GREEN + "██║ ███╗██║ ██║ ██║ ██║ ██████╔╝███████║██║ █████╔╝ ") | ||
print(Fore.BLUE + "██║ ██║██║ ██║ ██║ ██║ ██╔══██╗██╔══██║██║ ██╔═██╗ ") | ||
print(Fore.LIGHTRED_EX + "╚██████╔╝██║ ██║ ██║ ██║ ██████╔╝██║ ██║╚██████╗██║ ██╗") | ||
print(Fore.CYAN + " ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝") | ||
print(Fore.WHITE + "") | ||
now = datetime.now() | ||
ctypes.windll.kernel32.SetConsoleTitleW("GitItBack | Advanced Github Repo Backup Tool | Created By Gam3rr#0015") | ||
url = input("Enter Github URL : ") | ||
lol = input("Use Discord Webhook Y/N : ") | ||
if lol == "y": | ||
webhook = input("Enter Webhook URL: ") | ||
if lol == "n": | ||
print() | ||
else: | ||
print() | ||
cwd = os.getcwd() | ||
alr = random.randint(0,100000000) | ||
fl1 = cwd + "/Folder_Backups/GitItBack" + str(alr) + "/" | ||
isFile = os.path.isfile(cwd + "/Zip_Backups/") | ||
if isFile == True: | ||
os.system('cls') | ||
if isFile == False: | ||
os.makedirs(cwd + "/Zip_Backups/", exist_ok=True) | ||
os.system("git clone " + url + " " + fl1 ) | ||
os.system("powershell Compress-Archive -LiteralPath " + fl1 +" -DestinationPath "+ cwd + "/Zip_Backups/GitItBack" + str(alr) + ".zip") | ||
kalr = os.popen('curl -F "file=@' + cwd + "/Zip_Backups/GitItBack" + str(alr) + ".zip" + '" https://api.anonfiles.com/upload').read() | ||
|
||
a = json.loads(kalr) | ||
if a["status"] == False: | ||
print("Error!") | ||
print("Reason: " + a['message']) | ||
print("Type: " + a['type']) | ||
print("Code: " + a['code']) | ||
if a["status"] == True: | ||
os.system('cls') | ||
print(Fore.RED + " ██████╗ ██╗████████╗██╗████████╗██████╗ █████╗ ██████╗██╗ ██╗") | ||
print(Fore.YELLOW + "██╔════╝ ██║╚══██╔══╝██║╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██║ ██╔╝") | ||
print(Fore.GREEN + "██║ ███╗██║ ██║ ██║ ██║ ██████╔╝███████║██║ █████╔╝ ") | ||
print(Fore.BLUE + "██║ ██║██║ ██║ ██║ ██║ ██╔══██╗██╔══██║██║ ██╔═██╗ ") | ||
print(Fore.LIGHTRED_EX + "╚██████╔╝██║ ██║ ██║ ██║ ██████╔╝██║ ██║╚██████╗██║ ██╗") | ||
print(Fore.CYAN + " ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝") | ||
print(Fore.WHITE + "") | ||
dt_string = now.strftime("%m/%d/%Y %H:%M:%S") | ||
print("URL: " + Fore.GREEN + ['data']['file']['url']['short']) | ||
print("Name: " +Fore.RED+ a['data']['file']['metadata']['name']) | ||
print("Size: " +Fore.CYAN+ a['data']['file']['metadata']['size']['readable']) | ||
print("Time: " +Fore.LIGHTGREEN_EX+ dt_string) | ||
if lol == "y": | ||
data = { | ||
"embeds": [{ | ||
"color": "32768", | ||
"username" : "GitItBack | By Gam3rr", | ||
"author": { | ||
"name": "GitItBack", | ||
"url": "https://github.com/Gam3rrXD", | ||
"icon_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" | ||
}, | ||
"description": "**URL:** " + a['data']['file']['url']['short'] + " \n**File Name:** " + a['data']['file']['metadata']['name'] + " \n**Size:** " + a['data']['file']['metadata']['size']['readable'] + "\n**Time:** " + dt_string + " \n Created By: Gam3rr#0015" | ||
|
||
}] | ||
} | ||
requests.post(webhook, json=data) | ||
if lol == "n": | ||
print() | ||
else: | ||
print() | ||
|
||
else: | ||
print("Unknown Error has occord!") | ||
time.sleep(86400) |