forked from oisoumerlingithuub01/BYPASS-BOT
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdroplink.py
42 lines (31 loc) · 1.03 KB
/
droplink.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
import re
import time
import requests
from bs4 import BeautifulSoup
from urllib.parse import urlparse
url = open('1.txt', 'r').read()
print("You Have Entered:")
print(url)
print("Checking Link!")
# ==============================================
print("Bypassing Link...")
def droplink_bypass(url):
client = requests.Session()
res = client.get(url)
ref = re.findall("action[ ]{0,}=[ ]{0,}['|\"](.*?)['|\"]", res.text)[0]
h = {'referer': ref}
res = client.get(url, headers=h)
bs4 = BeautifulSoup(res.content, 'lxml')
inputs = bs4.find_all('input')
data = { input.get('name'): input.get('value') for input in inputs }
h = {
'content-type': 'application/x-www-form-urlencoded',
'x-requested-with': 'XMLHttpRequest'
}
p = urlparse(url)
final_url = f'{p.scheme}://{p.netloc}/links/go'
time.sleep(3.1)
res = client.post(final_url, data=data, headers=h).json()
return res
# ==============================================
print(droplink_bypass(url) ,file=open("2.txt", "w"))