| M_script_ |
22.05.2010 10:45 |
Шаг 1
Код:
sUrl = "http://passport.yandex.ru/passport?mode=register&ncrnd=" +
sNcrnd;
sRequest = "idkey=" +
sIdKey +
"&step=one&filled=yes&fresh=1&iname=" +
MultibyteToUTF8(sFirstName) +
"&fname=" +
MultibyteToUTF8(sLastName) +
"&login=" +
sLogin +
"&done=%D0%94%D0%B0%D0%BB%D1%8C%D1%88%D0%B5+%E2%86%92";
Капча
Код:
sUrl = "http://passport.yandex.ru/digits?idkey=" +
sIdKey;
Шаг 2
Код:
sUrl = "http://passport.yandex.ru/passport?mode=register&ncrnd=" +
sNcrnd;
sRequest = "idkey=" +
sIdKey +
"&step=two&filled=yes&login=" +
sLogin +
"&fname=" +
MultibyteToUTF8(sLastName) +
"&iname=" +
MultibyteToUTF8(sFirstName) +
"&time=&gmt_offset=&passwd=" +
sPass +
"&passwd2=" +
sPass +
"&hintq=6&udhintq=&hinta=" +
sPassportNum +
"&email=&phonenumber=&code=" +
sCaptcha +
"&agreed=yes&newform=%D0%97%D0%B0%D1%80%D0%B5%D0%B3%D0%B8%D1%81%D1%82%D1%80%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C";
Проверка ответа после шага 2
Код:
if( sPage.Pos("302") &&
sPage.Pos("Location: http://passport-ckicheck.yandex.ru/passport?mode=ckicheck&step=three") &&
sPage.Pos("Location: http://pass.yandex.ru/login?retpath=") &&
sPage.Pos("Location: http://passport.yandex.ru/passport?mode=welcome") &&
sPage.Pos("200 OK"))
{
// good
}
else
{
// bad
}
BlackSite, реггер - http://mscript.biz/soft/yandex_ar.rar
библиотеки - http://mscript.biz/soft/libcurl.rar
|