-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremote_upload_folder.py
147 lines (113 loc) · 5.33 KB
/
remote_upload_folder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
from racaty_upload import racaty_upload
try:
# upload racaty
print("Starting racaty_upload upload_link.txt ...")
racaty_upload("zfinal_hasil.txt")
print("racaty_upload completed. Continuing with the rest of the code...")
except Exception as e:
print(f"Error during racaty_upload: {e}")
import base64
import httpx
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
# Lanjutkan eksekusi kode
def encrypt_url(url, key):
# Pastikan kunci adalah 16-byte
key = key.encode('utf-8')
cipher = AES.new(key, AES.MODE_ECB)
# Pad URL menggunakan PKCS7
padded_url = pad(url.encode('utf-8'), AES.block_size)
# Enkripsi data
encrypted = cipher.encrypt(padded_url)
# Encode hasil enkripsi ke Base64 URL-safe
encrypted_base64 = base64.urlsafe_b64encode(encrypted).decode('utf-8')
return encrypted_base64
# API Keys
lulustream_api_key = '936yclje4cl5mud6kcw' # Lulustream API Key
streamhg_api_key = "2426evezy9bm5xz0uzzy"
veev_api_key = "81wfq1eryrdlombkfrej2ldx08p092x1rw"
vinovo_api_key = "8b857a827319ed70f22e4d0668853f"
dropload_api_key = "6228dp9snugc6viw066i"
bigwarp_api_key = "1185roh927m637ogi3lv"
key = "mysecretkey12345" # Kunci AES untuk enkripsi
lulustream_api_endpoint = "https://api.lulustream.com/api/upload/url"
streamhg_api_endpoint = "https://streamhgapi.com/api/upload/url"
veev_api_endpoint = "https://veev.to/api/upload/url"
vinovo_api_endpoint = "https://api.vinovo.si/api/upload/url"
dropload_endpoint = "https://dropload.io/api/upload/url"
bigwarp_api_endpoint = "https://bigwarp.io/api/upload/url"
# Variabel untuk menghitung jumlah sukses
success_count = 0
# Read URLs from output.txt
try:
with open('zfinal_hasil.txt', 'r') as file:
urls = file.readlines()
urls = [url.strip() for url in urls if url.strip()] # Remove empty lines and whitespace
# Encrypt each URL and send GET requests to both APIs
for url in urls:
# Enkripsi URL
encrypted = encrypt_url(url, key)
new_url = f"https://darenx-upbkafe.hf.space/ex/{encrypted}"
try:
# Lulustream request
response_lulustream = httpx.get(lulustream_api_endpoint, params={"key": lulustream_api_key, "url": new_url})
if response_lulustream.status_code == 200:
success_count += 1
else:
print(f"Failed: {url} - Lulustream Response: {response_lulustream.status_code} - {response_lulustream.text}")
except Exception as e:
print(f"Error during Lulustream request for {new_url}: {e}")
try:
# streamhg request
response_streamhg = httpx.get(streamhg_api_endpoint, params={"key": streamhg_api_key, "url": new_url})
if response_streamhg.status_code == 200:
success_count += 1
else:
print(f"Failed: {url} - StreamHG Response: {response_streamhg.status_code} - {response_streamhg.text}")
except Exception as e :
print(f"Error during StreamHG request for {new_url}: {e}")
try:
# veev request
response_veev = httpx.get(veev_api_endpoint, params={"key": veev_api_key, "url": new_url})
if response_veev.status_code == 200:
success_count += 1
else:
print(f"Failed: {url} - Veev Response: {response_veev.status_code} - {response_veev.text}")
except Exception as e:
print(f"Error during Veev request for {new_url}: {e}")
try:
# vinovo request
response_vinovo = httpx.get(vinovo_api_endpoint, params={"key": vinovo_api_key, "url": url})
if response_vinovo.status_code == 200:
success_count += 1
else:
print(f"Failed: {url} - Vinovo Response: {response_vinovo.status_code} - {response_vinovo.text}")
except Exception as e:
print(f"Error during Vinovo request for {url}: {e}")
try:
url_to_upload = f"{dropload_endpoint}?key={dropload_api_key}&url={new_url}"
# dropload request
response_dropload = httpx.get(url_to_upload)
if response_dropload.status_code == 200:
success_count += 1
else:
print(f"Failed: {url} - Dropload Response: {response_dropload.status_code} - {response_dropload.text}")
except Exception as e:
print(f"Error during Vinovo request for {url}: {e}")
try:
url_to_upload = f"{bigwarp_api_endpoint}?key={bigwarp_api_key}&url={new_url}"
# dropload request
response_bigwarp = httpx.get(url_to_upload)
if response_bigwarp.status_code == 200:
success_count += 1
else:
print(f"Failed: {url} - bigwarp Response: {response_bigwarp.status_code} - {response_bigwarp.text}")
except Exception as e:
print(f"Error during Vinovo request for {url}: {e}")
print(f"=====> SUCCES UPLOAD KE DropLOAD & Lulustream <============= ")
# Tampilkan total jumlah sukses
print("\n=========================================")
print(f"Total Successful Uploads: {success_count}")
print("=========================================")
except FileNotFoundError:
print("The file 'zfinal_hasil.txt' was not found. Please ensure it exists in the same directory.")