-
Notifications
You must be signed in to change notification settings - Fork 0
/
bypasser.py
1010 lines (821 loc) · 33.7 KB
/
bypasser.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import re
import requests
import base64
from urllib.parse import unquote, urlparse, parse_qs
import time
import cloudscraper
from bs4 import BeautifulSoup
from lxml import etree
import hashlib
import json
from config import APIs, Creds, sys
from dotenv import load_dotenv
load_dotenv()
###############################################
# katdrive
def parse_info_katdrive(res):
info_parsed = {}
title = re.findall('>(.*?)<\/h4>', res.text)[0]
info_chunks = re.findall('>(.*?)<\/td>', res.text)
info_parsed['title'] = title
for i in range(0, len(info_chunks), 2):
info_parsed[info_chunks[i]] = info_chunks[i+1]
return info_parsed
def katdrive_dl(url,katcrypt):
client = requests.Session()
client.cookies.update({'crypt': katcrypt})
res = client.get(url)
info_parsed = parse_info_katdrive(res)
info_parsed['error'] = False
up = urlparse(url)
req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download"
file_id = url.split('/')[-1]
data = { 'id': file_id }
headers = {'x-requested-with': 'XMLHttpRequest'}
try:
res = client.post(req_url, headers=headers, data=data).json()['file']
except:
return {'error': True, 'src_url': url}
gd_id = re.findall('gd=(.*)', res, re.DOTALL)[0]
info_parsed['gdrive_url'] = f"https://drive.google.com/open?id={gd_id}"
info_parsed['src_url'] = url
return info_parsed['gdrive_url']
###############################################
# hubdrive
def parse_info_hubdrive(res):
info_parsed = {}
title = re.findall('>(.*?)<\/h4>', res.text)[0]
info_chunks = re.findall('>(.*?)<\/td>', res.text)
info_parsed['title'] = title
for i in range(0, len(info_chunks), 2):
info_parsed[info_chunks[i]] = info_chunks[i+1]
return info_parsed
def hubdrive_dl(url,hcrypt):
client = requests.Session()
client.cookies.update({'crypt': hcrypt})
res = client.get(url)
info_parsed = parse_info_hubdrive(res)
info_parsed['error'] = False
up = urlparse(url)
req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download"
file_id = url.split('/')[-1]
data = { 'id': file_id }
headers = {'x-requested-with': 'XMLHttpRequest'}
try:
res = client.post(req_url, headers=headers, data=data).json()['file']
except:
return {'error': True, 'src_url': url}
gd_id = re.findall('gd=(.*)', res, re.DOTALL)[0]
info_parsed['gdrive_url'] = f"https://drive.google.com/open?id={gd_id}"
info_parsed['src_url'] = url
return info_parsed['gdrive_url']
#################################################
# drivefire
def parse_info_drivefire(res):
info_parsed = {}
title = re.findall('>(.*?)<\/h4>', res.text)[0]
info_chunks = re.findall('>(.*?)<\/td>', res.text)
info_parsed['title'] = title
for i in range(0, len(info_chunks), 2):
info_parsed[info_chunks[i]] = info_chunks[i+1]
return info_parsed
def drivefire_dl(url,dcrypt):
client = requests.Session()
client.cookies.update({'crypt': dcrypt})
res = client.get(url)
info_parsed = parse_info_drivefire(res)
info_parsed['error'] = False
up = urlparse(url)
req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download"
file_id = url.split('/')[-1]
data = { 'id': file_id }
headers = {'x-requested-with': 'XMLHttpRequest'}
try:
res = client.post(req_url, headers=headers, data=data).json()['file']
except:
return {'error': True, 'src_url': url}
decoded_id = res.rsplit('/', 1)[-1]
info_parsed = f"https://drive.google.com/file/d/{decoded_id}"
return info_parsed
##################################################
# kolop
def parse_info_kolop(res):
info_parsed = {}
title = re.findall('>(.*?)<\/h4>', res.text)[0]
info_chunks = re.findall('>(.*?)<\/td>', res.text)
info_parsed['title'] = title
for i in range(0, len(info_chunks), 2):
info_parsed[info_chunks[i]] = info_chunks[i+1]
return info_parsed
def kolop_dl(url,kcrypt):
client = requests.Session()
client.cookies.update({'crypt': kcrypt})
res = client.get(url)
info_parsed = parse_info_kolop(res)
info_parsed['error'] = False
up = urlparse(url)
req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download"
file_id = url.split('/')[-1]
data = { 'id': file_id }
headers = { 'x-requested-with': 'XMLHttpRequest'}
try:
res = client.post(req_url, headers=headers, data=data).json()['file']
except:
return {'error': True, 'src_url': url}
gd_id = re.findall('gd=(.*)', res, re.DOTALL)[0]
info_parsed['gdrive_url'] = f"https://drive.google.com/open?id={gd_id}"
info_parsed['src_url'] = url
return info_parsed['gdrive_url']
##################################################
# mediafire
def mediafire(url):
res = requests.get(url, stream=True)
contents = res.text
for line in contents.splitlines():
m = re.search(r'href="((http|https)://download[^"]+)', line)
if m:
return m.groups()[0]
####################################################
# zippyshare
def zippyshare(url):
resp = requests.get(url).text
surl = resp.split("document.getElementById('dlbutton').href = ")[1].split(";")[0]
parts = surl.split("(")[1].split(")")[0].split(" ")
val = str(int(parts[0]) % int(parts[2]) + int(parts[4]) % int(parts[6]))
surl = surl.split('"')
burl = url.split("zippyshare.com")[0]
furl = burl + "zippyshare.com" + surl[1] + val + surl[-2]
return furl
####################################################
# filercrypt
def getlinks(dlc,client):
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0',
'Accept': 'application/json, text/javascript, */*',
'Accept-Language': 'en-US,en;q=0.5',
# 'Accept-Encoding': 'gzip, deflate',
'X-Requested-With': 'XMLHttpRequest',
'Origin': 'http://dcrypt.it',
'Connection': 'keep-alive',
'Referer': 'http://dcrypt.it/',
}
data = {
'content': dlc,
}
response = client.post('http://dcrypt.it/decrypt/paste', headers=headers, data=data).json()["success"]["links"]
links = ""
for link in response:
links = links + link + "\n"
return links[:-1]
def filecrypt(url):
client = cloudscraper.create_scraper(allow_brotli=False)
headers = {
"authority": "filecrypt.co",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"dnt": "1",
"origin": "https://filecrypt.co",
"referer": url,
"sec-ch-ua": '"Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"',
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "Windows",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "same-origin",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
}
resp = client.get(url, headers=headers)
soup = BeautifulSoup(resp.content, "html.parser")
buttons = soup.find_all("button")
for ele in buttons:
line = ele.get("onclick")
if line !=None and "DownloadDLC" in line:
dlclink = "https://filecrypt.co/DLC/" + line.split("DownloadDLC('")[1].split("'")[0] + ".html"
break
resp = client.get(dlclink,headers=headers)
return getlinks(resp.text,client)
#####################################################
# dropbox
def dropbox(url):
return url.replace("www.","").replace("dropbox.com","dl.dropboxusercontent.com").replace("?dl=0","")
######################################################
# shareus
def shareus(url):
token = url.split("=")[-1]
bypassed_url = APIs[0] + token
response = requests.get(bypassed_url).text
return response
#######################################################
# shortingly
def shortlingly(url):
client = cloudscraper.create_scraper(allow_brotli=False)
if 'shortingly.me' in url:
DOMAIN = "https://go.techyjeeshan.xyz"
else:
return "Incorrect Link"
url = url[:-1] if url[-1] == '/' else url
code = url.split("/")[-1]
final_url = f"{DOMAIN}/{code}"
resp = client.get(final_url)
soup = BeautifulSoup(resp.content, "html.parser")
try: inputs = soup.find(id="go-link").find_all(name="input")
except: return "Incorrect Link"
data = { input.get('name'): input.get('value') for input in inputs }
h = { "x-requested-with": "XMLHttpRequest" }
time.sleep(5)
r = client.post(f"{DOMAIN}/links/go", data=data, headers=h)
try:
return r.json()['url']
except: return "Something went wrong :("
#######################################################
# Gyanilinks - gtlinks.me
def gyanilinks(url):
client = cloudscraper.create_scraper(allow_brotli=False)
if 'gtlinks.me' in url:
DOMAIN = "https://go.bloggertheme.xyz"
else:
return "Incorrect Link"
url = url[:-1] if url[-1] == '/' else url
code = url.split("/")[-1]
final_url = f"{DOMAIN}/{code}"
resp = client.get(final_url)
soup = BeautifulSoup(resp.content, "html.parser")
try: inputs = soup.find(id="go-link").find_all(name="input")
except: return "Incorrect Link"
data = { input.get('name'): input.get('value') for input in inputs }
h = { "x-requested-with": "XMLHttpRequest" }
time.sleep(5)
r = client.post(f"{DOMAIN}/links/go", data=data, headers=h)
try:
return r.json()['url']
except: return "Something went wrong :("
#######################################################
# anonfiles
def anonfile(url):
headersList = { "Accept": "*/*"}
payload = ""
response = requests.request("GET", url, data=payload, headers=headersList).text.split("\n")
for ele in response:
if "https://cdn" in ele and "anonfiles.com" in ele and url.split("/")[-2] in ele:
break
return ele.split('href="')[1].split('"')[0]
##########################################################
# pixl
def pixl(url):
count = 1
dl_msg = ""
currentpage = 1
settotalimgs = True
totalimages = ""
client = cloudscraper.create_scraper(allow_brotli=False)
resp = client.get(url)
if resp.status_code == 404:
return "File not found/The link you entered is wrong!"
soup = BeautifulSoup(resp.content, "html.parser")
if "album" in url and settotalimgs:
totalimages = soup.find("span", {"data-text": "image-count"}).text
settotalimgs = False
thmbnailanch = soup.findAll(attrs={"class": "--media"})
links = soup.findAll(attrs={"data-pagination": "next"})
try:
url = links[0].attrs["href"]
except BaseException:
url = None
for ref in thmbnailanch:
imgdata = client.get(ref.attrs["href"])
if not imgdata.status_code == 200:
time.sleep(5)
continue
imghtml = BeautifulSoup(imgdata.text, "html.parser")
downloadanch = imghtml.find(attrs={"class": "btn-download"})
currentimg = downloadanch.attrs["href"]
currentimg = currentimg.replace(" ", "%20")
dl_msg += f"{count}. {currentimg}\n"
count += 1
currentpage += 1
fld_msg = f"Your provided Pixl.is link is of Folder and I've Found {count - 1} files in the folder.\n"
fld_link = f"\nFolder Link: {url}\n"
final_msg = fld_link + "\n" + fld_msg + "\n" + dl_msg
return final_msg
############################################################
# sirigan ( unused )
def siriganbypass(url):
client = requests.Session()
res = client.get(url)
url = res.url.split('=', maxsplit=1)[-1]
while True:
try: url = base64.b64decode(url).decode('utf-8')
except: break
return url.split('url=')[-1]
############################################################
# shorte
def sh_st_bypass(url):
client = requests.Session()
client.headers.update({'referer': url})
p = urlparse(url)
res = client.get(url)
sess_id = re.findall('''sessionId(?:\s+)?:(?:\s+)?['|"](.*?)['|"]''', res.text)[0]
final_url = f"{p.scheme}://{p.netloc}/shortest-url/end-adsession"
params = {
'adSessionId': sess_id,
'callback': '_'
}
time.sleep(5) # !important
res = client.get(final_url, params=params)
dest_url = re.findall('"(.*?)"', res.text)[1].replace('\/','/')
return {
'src': url,
'dst': dest_url
}['dst']
#############################################################
# gofile
def gofile_dl(url,password=""):
api_uri = APIs[3]
client = requests.Session()
res = client.get(api_uri+'/createAccount').json()
data = {
'contentId': url.split('/')[-1],
'token': res['data']['token'],
'websiteToken': '12345',
'cache': 'true',
'password': hashlib.sha256(password.encode('utf-8')).hexdigest()
}
res = client.get(api_uri+'/getContent', params=data).json()
content = []
for item in res['data']['contents'].values():
content.append(item)
return {
'accountToken': data['token'],
'files': content
}["files"][0]["link"]
###############################################################
# psa
def try2link_bypass(url):
client = cloudscraper.create_scraper(allow_brotli=False)
url = url[:-1] if url[-1] == '/' else url
params = (('d', int(time.time()) + (60 * 4)),)
r = client.get(url, params=params, headers= {'Referer': 'https://newforex.online/'})
soup = BeautifulSoup(r.text, 'html.parser')
inputs = soup.find(id="go-link").find_all(name="input")
data = { input.get('name'): input.get('value') for input in inputs }
time.sleep(7)
headers = {'Host': 'try2link.com', 'X-Requested-With': 'XMLHttpRequest', 'Origin': 'https://try2link.com', 'Referer': url}
bypassed_url = client.post('https://try2link.com/links/go', headers=headers,data=data)
return bypassed_url.json()["url"]
def try2link_scrape(url):
client = cloudscraper.create_scraper(allow_brotli=False)
h = {
'upgrade-insecure-requests': '1', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
}
res = client.get(url, cookies={}, headers=h)
url = 'https://try2link.com/'+re.findall('try2link\.com\/(.*?) ', res.text)[0]
return try2link_bypass(url)
def psa_bypasser(psa_url):
client = cloudscraper.create_scraper(allow_brotli=False)
r = client.get(psa_url)
soup = BeautifulSoup(r.text, "html.parser").find_all(class_="dropshadowboxes-drop-shadow dropshadowboxes-rounded-corners dropshadowboxes-inside-and-outside-shadow dropshadowboxes-lifted-both dropshadowboxes-effect-default")
links = ""
for link in soup:
try:
exit_gate = link.a.get("href")
links = links + try2link_scrape(exit_gate) + '\n'
except: pass
return links
################################################################
# sharer pw
def parse_info_sharer(res):
f = re.findall(">(.*?)<\/td>", res.text)
info_parsed = {}
for i in range(0, len(f), 3):
info_parsed[f[i].lower().replace(' ', '_')] = f[i+2]
return info_parsed
def sharer_pw(url,Laravel_Session, XSRF_TOKEN, forced_login=False):
client = cloudscraper.create_scraper(allow_brotli=False)
client.cookies.update({
"XSRF-TOKEN": XSRF_TOKEN,
"laravel_session": Laravel_Session
})
res = client.get(url)
token = re.findall("_token\s=\s'(.*?)'", res.text, re.DOTALL)[0]
ddl_btn = etree.HTML(res.content).xpath("//button[@id='btndirect']")
info_parsed = parse_info_sharer(res)
info_parsed['error'] = True
info_parsed['src_url'] = url
info_parsed['link_type'] = 'login'
info_parsed['forced_login'] = forced_login
headers = {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
'x-requested-with': 'XMLHttpRequest'
}
data = {
'_token': token
}
if len(ddl_btn):
info_parsed['link_type'] = 'direct'
if not forced_login:
data['nl'] = 1
try:
res = client.post(url+'/dl', headers=headers, data=data).json()
except:
return info_parsed
if 'url' in res and res['url']:
info_parsed['error'] = False
info_parsed['gdrive_link'] = res['url']
if len(ddl_btn) and not forced_login and not 'url' in info_parsed:
# retry download via login
return sharer_pw(url,Laravel_Session, XSRF_TOKEN, forced_login=True)
return info_parsed["gdrive_link"]
#################################################################
# gdtot
def gdtot(url,GDTot_Crypt):
client = cloudscraper.create_scraper(allow_brotli=False)
match = re.findall(r"https?://(.+)\.gdtot\.(.+)\/\S+\/\S+", url)[0]
client.cookies.update({ "crypt": GDTot_Crypt })
res = client.get(url)
res = client.get(f"https://{match[0]}.gdtot.{match[1]}/dld?id={url.split('/')[-1]}")
url = re.findall(r'URL=(.*?)"', res.text)[0]
info = {}
info["error"] = False
params = parse_qs(urlparse(url).query)
if "gd" not in params or not params["gd"] or params["gd"][0] == "false":
info["error"] = True
if "msgx" in params:
info["message"] = params["msgx"][0]
else:
info["message"] = "Invalid link"
else:
decoded_id = base64.b64decode(str(params["gd"][0])).decode("utf-8")
drive_link = f"https://drive.google.com/open?id={decoded_id}"
info["gdrive_link"] = drive_link
if not info["error"]:
return info["gdrive_link"]
else:
return "Could not generate GDrive URL for your GDTot Link :("
##################################################################
# adfly
def decrypt_url(code):
a, b = '', ''
for i in range(0, len(code)):
if i % 2 == 0: a += code[i]
else: b = code[i] + b
key = list(a + b)
i = 0
while i < len(key):
if key[i].isdigit():
for j in range(i+1,len(key)):
if key[j].isdigit():
u = int(key[i]) ^ int(key[j])
if u < 10: key[i] = str(u)
i = j
break
i+=1
key = ''.join(key)
decrypted = base64.b64decode(key)[16:-16]
return decrypted.decode('utf-8')
def adfly(url):
client = cloudscraper.create_scraper(allow_brotli=False)
res = client.get(url).text
out = {'error': False, 'src_url': url}
try:
ysmm = re.findall("ysmm\s+=\s+['|\"](.*?)['|\"]", res)[0]
except:
out['error'] = True
return out
url = decrypt_url(ysmm)
if re.search(r'go\.php\?u\=', url):
url = base64.b64decode(re.sub(r'(.*?)u=', '', url)).decode()
elif '&dest=' in url:
url = unquote(re.sub(r'(.*?)dest=', '', url))
out['bypassed_url'] = url
return out
##############################################################################################
# gplinks
def gplinks(url: str):
client = cloudscraper.create_scraper(allow_brotli=False)
p = urlparse(url)
final_url = f"{p.scheme}://{p.netloc}/links/go"
res = client.head(url)
header_loc = res.headers["location"]
param = header_loc.split("postid=")[-1]
req_url = f"{p.scheme}://{p.netloc}/{param}"
p = urlparse(header_loc)
ref_url = f"{p.scheme}://{p.netloc}/"
h = {"referer": ref_url}
res = client.get(req_url, headers=h, allow_redirects=False)
bs4 = BeautifulSoup(res.content, "html.parser")
inputs = bs4.find_all("input")
time.sleep(10) # !important
data = { input.get("name"): input.get("value") for input in inputs }
h = {
"content-type": "application/x-www-form-urlencoded",
"x-requested-with": "XMLHttpRequest"
}
time.sleep(10)
res = client.post(final_url, headers=h, data=data)
try:
return res.json()["url"].replace("/","/")
except:
return "Could not Bypass your URL :("
######################################################################################################
# droplink
def droplink(url):
api = APIs[1]
client = cloudscraper.create_scraper(allow_brotli=False)
resp = client.get(url)
if resp.status_code == 404:
return "File not found/The link you entered is wrong!"
try:
resp = client.post(api, json={"type": "droplink", "url": url})
res = resp.json()
except BaseException:
return "API UnResponsive / Invalid Link !"
if res["success"] is True:
return res["url"]
else:
return res["msg"]
#####################################################################################################################
# link vertise
def linkvertise(url):
api = APIs[1]
client = cloudscraper.create_scraper(allow_brotli=False)
resp = client.get(url)
if resp.status_code == 404:
return "File not found/The link you entered is wrong!"
try:
resp = client.post(api, json={"type": "linkvertise", "url": url})
res = resp.json()
except BaseException:
return "API UnResponsive / Invalid Link !"
if res["success"] is True:
return res["url"]
else:
try:
payload = {"url": url}
url_bypass = requests.post(APIs[2], data=payload).json()
bypassed = url_bypass["destination"]
return bypassed
except:
return "Could not Bypass your URL :("
###################################################################################################################
# others
# api from https://github.com/bypass-vip/bypass.vip
def others(url):
try:
payload = {"url": url}
url_bypass = requests.post(APIs[2], data=payload).json()
bypassed = url_bypass["destination"]
return bypassed
except:
return "Could not Bypass your URL :("
#################################################################################################################
# ouo
# RECAPTCHA v3 BYPASS
# code from https://github.com/xcscxr/Recaptcha-v3-bypass
def RecaptchaV3(ANCHOR_URL):
url_base = 'https://www.google.com/recaptcha/'
post_data = "v={}&reason=q&c={}&k={}&co={}"
client = requests.Session()
client.headers.update({
'content-type': 'application/x-www-form-urlencoded'
})
matches = re.findall('([api2|enterprise]+)\/anchor\?(.*)', ANCHOR_URL)[0]
url_base += matches[0]+'/'
params = matches[1]
res = client.get(url_base+'anchor', params=params)
token = re.findall(r'"recaptcha-token" value="(.*?)"', res.text)[0]
params = dict(pair.split('=') for pair in params.split('&'))
post_data = post_data.format(params["v"], token, params["k"], params["co"])
res = client.post(url_base+'reload', params=f'k={params["k"]}', data=post_data)
answer = re.findall(r'"rresp","(.*?)"', res.text)[0]
return answer
# code from https://github.com/xcscxr/ouo-bypass/
ANCHOR_URL = 'https://www.google.com/recaptcha/api2/anchor?ar=1&k=6Lcr1ncUAAAAAH3cghg6cOTPGARa8adOf-y9zv2x&co=aHR0cHM6Ly9vdW8uaW86NDQz&hl=en&v=1B_yv3CBEV10KtI2HJ6eEXhJ&size=invisible&cb=4xnsug1vufyr'
def ouo(url):
client = requests.Session()
tempurl = url.replace("ouo.press", "ouo.io")
p = urlparse(tempurl)
id = tempurl.split('/')[-1]
res = client.get(tempurl)
next_url = f"{p.scheme}://{p.hostname}/go/{id}"
for _ in range(2):
if res.headers.get('Location'):
break
bs4 = BeautifulSoup(res.content, 'lxml')
inputs = bs4.form.findAll("input", {"name": re.compile(r"token$")})
data = { input.get('name'): input.get('value') for input in inputs }
ans = RecaptchaV3(ANCHOR_URL)
data['x-token'] = ans
h = {
'content-type': 'application/x-www-form-urlencoded'
}
res = client.post(next_url, data=data, headers=h, allow_redirects=False)
next_url = f"{p.scheme}://{p.hostname}/xreallcygo/{id}"
return res.headers.get('Location')
####################################################################################################################
# mdisk
def mdisk(url):
api = APIs[1]
client = cloudscraper.create_scraper(allow_brotli=False)
resp = client.get(url)
if resp.status_code == 404:
return "File not found/The link you entered is wrong!"
try:
resp = client.post(api, json={"type": "mdisk", "url": url})
res = resp.json()
except BaseException:
return "API UnResponsive / Invalid Link !"
if res["success"] is True:
return res["url"]
else:
return res["msg"]
##################################################################################################################
# rocklinks
def rocklinks(url):
client = cloudscraper.create_scraper(allow_brotli=False)
if 'rocklinks.net' in url:
DOMAIN = "https://blog.disheye.com"
else:
DOMAIN = "https://rocklinks.net"
url = url[:-1] if url[-1] == '/' else url
code = url.split("/")[-1]
if 'rocklinks.net' in url:
final_url = f"{DOMAIN}/{code}?quelle="
else:
final_url = f"{DOMAIN}/{code}"
resp = client.get(final_url)
soup = BeautifulSoup(resp.content, "html.parser")
try: inputs = soup.find(id="go-link").find_all(name="input")
except: return "Incorrect Link"
data = { input.get('name'): input.get('value') for input in inputs }
h = { "x-requested-with": "XMLHttpRequest" }
time.sleep(10)
r = client.post(f"{DOMAIN}/links/go", data=data, headers=h)
try:
return r.json()['url']
except: return "Something went wrong :("
###################################################################################################################
# pixeldrain
def pixeldrain(url):
api = APIs[1]
client = cloudscraper.create_scraper(allow_brotli=False)
resp = client.get(url)
if resp.status_code == 404:
return "File not found/The link you entered is wrong!"
try:
resp = client.post(api, json={"type": "pixeldrain", "url": url})
res = resp.json()
except BaseException:
return "API UnResponsive / Invalid Link !"
if res["success"] is True:
return res["url"]
else:
return res["msg"]
####################################################################################################################
# we transfer
def wetransfer(url):
api = APIs[1]
client = cloudscraper.create_scraper(allow_brotli=False)
resp = client.get(url)
if resp.status_code == 404:
return "File not found/The link you entered is wrong!"
try:
resp = client.post(api, json={"type": "wetransfer", "url": url})
res = resp.json()
except BaseException:
return "API UnResponsive / Invalid Link !"
if res["success"] is True:
return res["url"]
else:
return res["msg"]
##################################################################################################################
# megaup
def megaup(url):
api = APIs[1]
client = cloudscraper.create_scraper(allow_brotli=False)
resp = client.get(url)
if resp.status_code == 404:
return "File not found/The link you entered is wrong!"
try:
resp = client.post(api, json={"type": "megaup", "url": url})
res = resp.json()
except BaseException:
return "API UnResponsive / Invalid Link !"
if res["success"] is True:
return res["url"]
else:
return res["msg"]
##################################################################################################################
# AppDrive or DriveApp etc. Look-Alike Link and as well as the Account Details (Required for Login Required Links only)
def unified(url):
try:
Email = Creds[0]
Password = Creds[1]
account = {"email": Email, "passwd": Password}
client = cloudscraper.create_scraper(allow_brotli=False)
client.headers.update(
{
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36"
}
)
data = {"email": account["email"], "password": account["passwd"]}
client.post(f"https://{urlparse(url).netloc}/login", data=data)
res = client.get(url)
key = re.findall('"key",\s+"(.*?)"', res.text)[0]
ddl_btn = etree.HTML(res.content).xpath("//button[@id='drc']")
info = re.findall(">(.*?)<\/li>", res.text)
info_parsed = {}
for item in info:
kv = [s.strip() for s in item.split(":", maxsplit=1)]
info_parsed[kv[0].lower()] = kv[1]
info_parsed = info_parsed
info_parsed["error"] = False
info_parsed["link_type"] = "login"
headers = {
"Content-Type": f"multipart/form-data; boundary={'-'*4}_",
}
data = {"type": 1, "key": key, "action": "original"}
if len(ddl_btn):
info_parsed["link_type"] = "direct"
data["action"] = "direct"
while data["type"] <= 3:
boundary = f'{"-"*6}_'
data_string = ""
for item in data:
data_string += f"{boundary}\r\n"
data_string += f'Content-Disposition: form-data; name="{item}"\r\n\r\n{data[item]}\r\n'
data_string += f"{boundary}--\r\n"
gen_payload = data_string
try:
response = client.post(url, data=gen_payload, headers=headers).json()
break
except BaseException:
data["type"] += 1
if "url" in response:
info_parsed["gdrive_link"] = response["url"]
elif "error" in response and response["error"]:
info_parsed["error"] = True
info_parsed["error_message"] = response["message"]
else:
info_parsed["error"] = True
info_parsed["error_message"] = "Something went wrong :("
if info_parsed["error"]:
return info_parsed
if urlparse(url).netloc == "driveapp.in" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"
)[0]
info_parsed["gdrive_link"] = drive_link
info_parsed["src_url"] = url
if urlparse(url).netloc == "drivehub.in" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"
)[0]
info_parsed["gdrive_link"] = drive_link
if urlparse(url).netloc == "gdflix.pro" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"
)[0]
info_parsed["gdrive_link"] = drive_link
if urlparse(url).netloc == "drivesharer.in" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"
)[0]
info_parsed["gdrive_link"] = drive_link
if urlparse(url).netloc == "drivebit.in" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"
)[0]
info_parsed["gdrive_link"] = drive_link
if urlparse(url).netloc == "drivelinks.in" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"
)[0]
info_parsed["gdrive_link"] = drive_link
if urlparse(url).netloc == "driveace.in" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"
)[0]
info_parsed["gdrive_link"] = drive_link
if urlparse(url).netloc == "drivepro.in" and not info_parsed["error"]:
res = client.get(info_parsed["gdrive_link"])
drive_link = etree.HTML(res.content).xpath(
"//a[contains(@class,'btn')]/@href"