Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "../class/simple_html_dom.php";
- $USERNAME = 'iamtherealginger13@gmail.com';
- $PASSWORD = '******';
- $COOKIEJAR = 'cookies.txt';
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $COOKIEJAR);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $COOKIEJAR);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120);
- curl_setopt($ch, CURLOPT_TIMEOUT, 120);
- curl_setopt($ch, CURLOPT_URL,
- 'https://accounts.google.com/ServiceLogin?hl=en&service=alerts&continue=http://www.google.com/alerts/manage');
- $data = curl_exec($ch);
- $formFields = getFormFields($data);
- $formFields['Email'] = $USERNAME;
- $formFields['Passwd'] = $PASSWORD;
- unset($formFields['PersistentCookie']);
- $post_string = '';
- foreach($formFields as $key => $value) {
- $post_string .= $key . '=' . urlencode($value) . '&';
- }
- $post_string = substr($post_string, 0, -1);
- curl_setopt($ch, CURLOPT_URL, 'https://accounts.google.com/ServiceLoginAuth');
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
- $result = curl_exec($ch);
- curl_setopt($ch, CURLOPT_URL, "https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://gdata.youtube.com&access_type=offline&redirect_uri=urn:ietf:wg:oauth:2.0:oob&pageId=none&client_id=911313852664-tir6o945mdn2bouorh\
- palkecrg23dng9.apps.googleusercontent.com&hl=fr&from_login=1&as=-5df191bb4410a26d&pli=1&authuser=0");
- curl_setopt($ch, CURLOPT_POST, 0);
- curl_setopt($ch, CURLOPT_POSTFIELDS, null);
- $result = curl_exec($ch);
- echo $result;
- // AFFICHE LA PAGE AVEC LE BOUTON ACCEPTER
- $formFields = getFormFieldsAccess($result);
- $formFields["bgresponse"] = "js_disabled";
- $formFields["submit_access"] = "true";
- $post_string = '';
- foreach($formFields as $key => $value) {
- $post_string .= $key . '=' . $value . '&';
- }
- $post_string = substr($post_string, 0, -1);
- echo 'Donneees post : ';
- preg_match_all('!https://accounts[\S]+!', $result, $matches);
- $all_urls = $matches[0][2];
- $all_urls = urldecode(substr($all_urls, 0, -1));
- var_dump($all_urls);
- curl_setopt($ch, CURLOPT_URL, $all_urls);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
- curl_setopt($ch, CURLOPT_REFERER, 'https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/youtube.upload&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=911313852664-tir6o945mdn2bouorhpalkecr\
- g23dng9.apps.googleusercontent.com&access_type=offline&pageId=none');
- $result = curl_exec($ch);
- echo $result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement