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

Commit

Permalink
Merge pull request #1 from majnurangeela/main
Browse files Browse the repository at this point in the history
Fix AppDrive Bypass
  • Loading branch information
TheCaduceus authored May 16, 2022
2 parents 2140d68 + 058b2a2 commit e39376e
Showing 1 changed file with 23 additions and 17 deletions.
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": []
}
]
}
}

0 comments on commit e39376e

Please sign in to comment.