Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Fix AppDrive Bypass #1

Merged
merged 2 commits into from
May 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions Link-Pass.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -152,29 +152,35 @@
"print(\"Checking Done!\")\n",
"# ==============================================\n",
"print(\"Bypassing the Link...\")\n",
"def gplinks_bypass(url):\n",
" scraper = cloudscraper.create_scraper(allow_brotli=False)\n",
" res = scraper.get(url)\n",
"def gplinks_bypass(url: str):\n",
" client = cloudscraper.create_scraper(allow_brotli=False)\n",
" p = urlparse(url)\n",
" final_url = f'{p.scheme}://{p.netloc}/links/go'\n",
" \n",
" h = { \"referer\": res.url }\n",
" res = scraper.get(url, headers=h)\n",
" res = client.head(url)\n",
" header_loc = res.headers['location']\n",
" param = header_loc.split('postid=')[-1]\n",
" req_url = f'{p.scheme}://{p.netloc}/{param}'\n",
" \n",
" bs4 = BeautifulSoup(res.content, 'lxml')\n",
" p = urlparse(header_loc)\n",
" ref_url = f'{p.scheme}://{p.netloc}/'\n",
"\n",
" h = { 'referer': ref_url }\n",
" res = client.get(req_url, headers=h, allow_redirects=False)\n",
" bs4 = BeautifulSoup(res.content, 'html.parser')\n",
" inputs = bs4.find_all('input')\n",
" time.sleep(10) # !important\n",
" data = { input.get('name'): input.get('value') for input in inputs }\n",
"\n",
" \n",
" h = {\n",
" 'content-type': 'application/x-www-form-urlencoded',\n",
" 'x-requested-with': 'XMLHttpRequest'\n",
" }\n",
" \n",
" time.sleep(10) # !important\n",
" \n",
" p = urlparse(url)\n",
" final_url = f'{p.scheme}://{p.netloc}/links/go'\n",
" res = scraper.post(final_url, data=data, headers=h).json()\n",
"\n",
" return res\n",
" time.sleep(10)\n",
" res = client.post(final_url, headers=h, data=data)\n",
" try:\n",
" return res.json()['url'].replace('\/','/')\n",
" except: return 'Something went wrong :('\n",
"\n",
"# ==============================================\n",
"\n",
Expand Down Expand Up @@ -539,7 +545,7 @@
" \"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\"\n",
" })\n",
"\n",
" account_login(client, url, account['email'], account['passwd'])\n",
" account_login(client, url, email, passwd)\n",
" update_account(client, url, SHARED_DRIVE_ID, FOLDER_ID)\n",
"\n",
" res = client.get(url)\n",
Expand Down Expand Up @@ -689,4 +695,4 @@
"outputs": []
}
]
}
}