yusuf68700 adlı üyeden alıntı: mesajı görüntüle
Teşekkürler hocam bana otomatik kod üretme lazım
Biraz uğraştırdı ama tamamladım, sunucuda test etmedim ancak localde sorunsuz çalışıyor.
  • Bu kodda ReCaptcha'yı bypass etmek için ücretli bir çözüm olan 2Captcha kullanıldı, 2Captcha'ya kayıt olup bakiye yüklemeniz gerek ve api anahtarınızı ilgili yere gireceksiniz.
  • Sırf ReCaptcha çözümü bile 1.5dk'ya kadar uzayabiliyor ondan dolayı 6-7 dk civarı kod çalışıyor.
  • Ben burada e-posta adresi almak için kendi geçici e-posta sitemi kullandım, siz kendinize göre düzenlersiniz.
Bu kodu kullanmadan önce composer ile 2captcha kütüphanesini dahil etmeniz gerekli: composer require 2captcha/2captcha
Eğer composer kullanmıyorsa şu zip dosyasının içindekileri kodun bulunduğu dizine atın: https://gofile.io/d/VgFkPI

ini_set('max_execution_time', 0);
set_time_limit(0);

include 'vendor/autoload.php';

$TwoCaptchaApiKey = '2Captcha.com Api Anahtarınızı Buraya Girin';

$PleskPageUrl = 'https://www.plesk.com/plesk-free-download/';
$PleskFormId = 55;

$CurlDefaultOptions = [
CURLOPT_USERAGENT => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/32.0.1700.107 Chrome/32.0.1700.107 Safari/537.36',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIESESSION => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_COOKIEJAR => '',
CURLOPT_COOKIEFILE => ''
];

$User = [
'name' => 'Braum',
'lastname' => 'Groves',
'job' => 'Cloud/Hosting Reseller - Agency Owner',
'experience' => 'Junior',
'country' => 'Turkey'
];

$ch = curl_init();
curl_setopt_array($ch, $CurlDefaultOptions);
curl_setopt($ch, CURLOPT_URL, $PleskPageUrl);
curl_setopt($ch, CURLOPT_POST, false);

$response = curl_exec($ch);

$PleskRecaptchaSiteKey = explode('"', explode('data-sitekey="', $response)[1])[0];
$ZeroSpamKey = explode("'", explode(".attr( 'value', '", $response)[1])[0];
$State = explode('"', explode('name="state_'.$PleskFormId.'" value="', $response)[1])[0];

curl_setopt($ch, CURLOPT_URL, 'https://10minutesemail.net/getEmailAddress');
curl_setopt($ch, CURLOPT_POST, true);

$TempMail = json_decode(curl_exec($ch))->address;

$Solver = new \TwoCaptcha\TwoCaptcha($TwoCaptchaApiKey);

$SolverResult = $Solver->recaptcha([
'sitekey' => $PleskRecaptchaSiteKey,
'url' => $PleskPageUrl,
]);

if(isset($SolverResult->code)) {
$RecaptchaResponse = $SolverResult->code;
curl_setopt($ch, CURLOPT_URL, $PleskPageUrl);
curl_setopt($ch, CURLOPT_POST, true);
$Content = [
'input_1.3' => $User['name'],
'input_1.6' => $User['lastname'],
'input_2' => $TempMail,
'input_15' => $User['job'],
'input_16' => $User['experience'],
'input_17' => $User['country'],
'g-recaptcha-response' => $RecaptchaResponse,
'is_submit_'.$PleskFormId => 1,
'gform_submit' => $PleskFormId,
'gform_unique_id' => '',
'state_'.$PleskFormId => $State,
'gform_target_page_number_'.$PleskFormId => 0,
'gform_source_page_number_'.$PleskFormId => 1,
'gform_field_values' => '',
'gf_zero_spam_key' => $ZeroSpamKey
];
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($Content));
$response = curl_exec($ch);
$Inbox = '';
while(strpos($Inbox, 'Please confirm your email address') === false) {
sleep(5);
curl_setopt($ch, CURLOPT_URL, 'https://10minutesemail.net/getInbox');
curl_setopt($ch, CURLOPT_POST, true);
$Inbox = curl_exec($ch);
}
$Link = 'https://hpemail'.rtrim(explode('"', explode('href=\\"https://hpemail', $Inbox)[1])[0], '\\');
curl_setopt($ch, CURLOPT_URL, $Link);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);
$Link = explode('"', explode('<a href="', $response)[1])[0];
curl_setopt($ch, CURLOPT_URL, $Link);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);
if(strpos($response, 'CONFIRM MY EMAIL') !== false) {
$Link = ltrim(explode('"', explode('target="_blank" href="', $response)[1])[0], '/~/');
curl_setopt($ch, CURLOPT_URL, $Link);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);
}
$Inbox = '';
while(strpos($Inbox, 'Your Plesk Trial Activation Code') === false) {
sleep(10);
curl_setopt($ch, CURLOPT_URL, 'https://10minutesemail.net/getInbox');
curl_setopt($ch, CURLOPT_POST, true);
$Inbox = curl_exec($ch);
}
$Key = explode('<', explode('<strong>', explode("Now here's your unique activation code:", $Inbox)[1])[1])[0];
print 'Plesk Activation Key: '.$Key;
}
else {
echo '2Captcha failed!';
}