Владелец задачи: directman, Екатеринбург - Россия
Текущий статус:
Новая разработка
Получение оценок школьника в сетевом городе ИРТЕХ
пока не получается авторизоваться на сайте
Сценарий и явки пароли:
php $cookie_file = ROOT . 'cached/starline_cookie.txt'; //в этом файле будет храниться сессия
//$cookie_file = 'dialog_cookie.txt'; //в этом файле будет храниться сессия
// STEP 1 -- LOGIN
$url = 'http://eda.lyceum130.ru/asp/postlogin.asp'; // ссылка, по которой нам надо зайти
// задаём поля, которые будут отправлены при логине
$fields = array(
'VER'=>'598620975',
'PW2'=>'b6e21e171d0840ba437679dc65f430a8',
'LT'=>'579475287',
'LoginType'=>'1',
'ECardID'=>'',
'CID'=>'2',
'SID'=>'66',
'PID'=>'-1',
'CN'=>'3',
'SFT'=>'2',
'SCID'=>'1',
'UN'=>'оСанниковД1',
'PW'=>'b6e21e'
// 'LoginForm[login]' => gg('balance.StarlineLogin'), // номер телефона
// 'LoginForm[rememberMe]' => 'on',
//'LoginForm[pass]' => gg('balance.StarlinePass')
);
//print_r($fields);
echo "<br>";
$fields_string = '';
foreach ($fields as $key => $value) {
$fields_string .= urlencode($key) . '=' . urlencode($value) . '&';
}
//rtrim($fields_string, '&');
//echo $fields_string."<br>";
$fields_string=substr ($fields_string,0,-1);
//echo $fields_string."<br>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
//curl_setopt($ch, CURLOPT_POST, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Encoding:gzip, deflate',
'Accept-Language:ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control:max-age=0',
'Content-Length:197',
'Content-Type:application/x-www-form-urlencoded',
'Cookie:ASPSESSIONIDCCCACRTS=OCHHFOOAEKHGKCEEAAILKDCM; ASPSESSIONIDAACDBQTS=AGLCGIIAKGKEDFPKPKPOENML; ASPSESSIONIDCCACBRTT=BCBNEEFBNIHMPOJFMFJEDHPI; ASPSESSIONIDACACCQTS=IGNPLKDBCGGHCGCFDLEKMKBO; ASPSESSIONIDACADBRTT=PAGCMHABOFPGAOLEPBHCNEMB; ASPSESSIONIDAACDBQTT=BHFCNBKAJLDCLICNBEGIKFFF; ASPSESSIONIDAADBDRSS=MMLFKJDCNDCJBMDGGCLMMKAB; ASPSESSIONIDACDCBQST=CDCLCDFCIGIADMEBFDELFLLH; ASPSESSIONIDACBDDQSS=DKDGKGACFCECLINHMEECMCPL; ASPSESSIONIDAADDDRSS=FDEGLAKBLNBMJDGMHEEKPFAH; ASPSESSIONIDACDCARSS=CEOPKDNBIGFOIBLDGACNNPLJ; ASPSESSIONIDACADCQST=IJKCEKLBDPPHIBHHKLCGHGFD; ASPSESSIONIDCAACCQTT=DDNICGICBMHEOMNACOIHNFEE; ASPSESSIONIDAAADDRTT=LHMBJPJCLJEAGKHJPJFNDKFJ; ASPSESSIONIDCCDDARTT=FAMGDACCBKNOFEKOBOBIEKCO; ASPSESSIONIDCACDDRTS=MJEOACFDIHAKKLHBMCMGHOPG; ASPSESSIONIDCCCABRTT=BLEKHLGDKCFLMAPJKMBBOCLH; ASPSESSIONIDACADCRTT=BBDFBPBDNFHGHBECIPLEACGA; ASPSESSIONIDCABBDRSS=JJJOAFIDAINKPIPNCGGLBCKG; ASPSESSIONIDCCBCCRTS=DOHJPNBAMNIJDEPFIINJJFAA; ASPSESSIONIDACBACRTT=OKPKHOJDHJCECNMNHHEDCKCD; ASPSESSIONIDACBADRSS=KKEDAILDFOGLELFANOPDNCJP; ASPSESSIONIDCAAADRTT=CJGAHBNDPMEIOLGLOACGMGDB; ASPSESSIONIDAACCBQSS=OBEPOAFAOAKNNCJBNJNLICNN; ASPSESSIONIDCADDCSRT=PLHMPKODNBDLNNEKEKGIGHDC; ASPSESSIONIDCAABCQST=GGEJFANADCADBNCHNIGFINGA; ASPSESSIONIDCADDBRSS=HCNPDKOAJELBCEKDFNANLIFG; ASPSESSIONIDCABCCRSS=AFBEOGLABCBBFICNIGBODMBH; ASPSESSIONIDACBAAQSS=EKBIFNJAKFEKNPCBHPJFLMHC; TTSLogin=SID=66&CID=2&PID=%2D1&SCID=1&BSP=0&CN=3&SFT=2; ASPSESSIONIDAACCDQTS=GGPLEDABKDLLCKFGKPGHEKKJ; ASPSESSIONIDCABACQST=GADLODIAFNBFOFKJPGPKKBNE; ASPSESSIONIDACAADQSS=AAOMCFDCNDGBNHJFNBHEKGHF; ASPSESSIONIDCABDDQSS=IOMHKBICMGOEPOCILHMHOOPI; ASPSESSIONIDCAAABRTT=FDJCKELCOPCNLIPECANMGPAO; ASPSESSIONIDACBBAQST=KINPAOMCDAHHKJDNBMGAPGNM; ASPSESSIONIDCCCDBRTT=PPOGKHOCILJCLLNEFDLFBIOK; ASPSESSIONIDAADDARTT=NLEPINEDHJLMDLIPJHMFABBB; ASPSESSIONIDACDDAQTT=JBGEAEDDLOJKILCKOBBNGPCA; ASPSESSIONIDCACCBRST=ABEHJKBDOABPOGIEKINLAGKC; ASPSESSIONIDACACBQTS=EIJJIAIDDIGIHOFBJLGIHGHI; ASPSESSIONIDCCDADRST=HEPNPJJDMFHKDAAKIIHILJBB; ASPSESSIONIDCCACDQTS=ABKAAHGDMOJFDCKKIJHDDJOA; ASPSESSIONIDCACBARST=OLJEIDLDBHGGKAEJPAONCCIH; ASPSESSIONIDCCADARST=HCKNHJBABLMALLLDEHICAODG; ASPSESSIONIDCCBDBQTT=MIICPMMDIMDJBNPGKAPMNAIF; _ym_uid=1513136265667279584; ASPSESSIONIDACDBDQST=LLNLOPPDBOBMJFNGCABJOKPP; ASPSESSIONIDAACCARSS=EJGCPCDAEEDJLONNAHAFPAPI; ASPSESSIONIDCCBACRTS=CCMBHMEANPEPNANKPAJJAMJC; ASPSESSIONIDACADCRTS=CKNPNFGAHDJOIPDLEPKOEECO; ASPSESSIONIDAAAACQSS=OAIJNLMAJKMKEDKPLJHPHBOL; ASPSESSIONIDCAADBRTT=IPBLMOPANKLPPKJIJMHBMOGL; ASPSESSIONIDAAAADQTT=OMOFGFOABOOFPMNNAHEEGPFN; ASPSESSIONIDAABCBRTT=BJDGGCLAECGMABNKGECHLJML; ASPSESSIONIDCCCCARSS=MNDKNIJAOGEPFINAMOGGGKCF; ASPSESSIONIDACCACRSS=MJOBMEGBFDFDCACLNAEOKFDB; ASPSESSIONIDAACCARTT=NBFJFOHBHJILFGHGFJCKGGGM; ASPSESSIONIDCCADBQTT=GAOKFIBBCFLLOCLGHOIAFEDB; ASPSESSIONIDACCCAQST=DCOIMBDBLONBBIONBHAPBPOM; ASPSESSIONIDAABDCQST=GJONBGBDKNMFMKJCALKAGEBB; ASPSESSIONIDCACCBQTS=CNALIPCDAKOCKCPABOJJGPDI; ASPSESSIONIDCACDAQTS=KOFCDDOCPNOHMOKJADEOBKGK; ASPSESSIONIDCCDCARTS=LLBADNHCMFBMGIFPMJLBGDHK; ASPSESSIONIDAABDBQSS=CDPFKJMCIPACELJBNBKMMEJC; ASPSESSIONIDCADBBQST=OCEFAPKDHAIPDIFEOPIFIOAA; ASPSESSIONIDCABCAQST=FMFGICGDILKPFOHJMENOMKPB; ASPSESSIONIDCACACRTS=AHMLBMHDIHLOMKKPFENJBHOI; ASPSESSIONIDACCBARST=GMBKHFJDCHNLNBPIPFCNMKEH; ASPSESSIONIDACDCCTQT=HKDAACODBMPMLNAJENPJJIBP; ASPSESSIONIDCCDCBRSS=BIBEPHEAEGOKOPNKDEIDNJCB; ASPSESSIONIDACBBDQTS=HNBOGLPDDJEGDLHLOMOPFGDG; ASPSESSIONIDCACCCSRS=GEEFHIMDFHBBBGPNONJDHLMG; ASPSESSIONIDCACBDRTT=LGCCGBGAEBBFGONDNHLIPNPC; ASPSESSIONIDAAACARST=DIGNOKHALACEFNAHPBEPPFGP; ASPSESSIONIDACCADQSS=LOBIHOCADPHAIHCGFJHFKLNE; ASPSESSIONIDCCDBDQTT=LGGMFEJAGFDJBAEGIGKLLJND; ASPSESSIONIDCCCABQST=EEGHONKAOHBLPHGBLAEIOKIK; ASPSESSIONIDCCACAQSS=GOBEOAOAPKNECMKCIMLCNFFN; ASPSESSIONIDCCADBQTS=BPMNEKPAMPCNDEGCBOINEBIL; _ym_isad=2; ASPSESSIONIDCABADQST=GPFGGHMADDDELMDCAEBMMCCO; ASPSESSIONIDACABCRTT=AIBMNDBBIDBILJDHENNCJGMJ; NSSESSIONID=895636493898858670330478; ESRNSec=ESRNSECR%2D920009568=%2D1809242208%2D%2D1692954720&ESRNSECR77757376=1438978208%2D%2D1141792704&ESRNSECR%2D176808288=4125920%2D1170464096&ESRNSECR1702757856=1991957728%2D%2D1266211008&ESRNSECR%2D1357182304=1684516512%2D%2D954298784&ESRNSECR849960192=%2D1775664480%2D%2D43324096&ESRNSECR%2D1328568256=1544505792%2D%2D1063186464&ESRNSECR%2D504361088=%2D204216192%2D%2D1834414944',
'Host:eda.lyceum130.ru',
'Origin:http://eda.lyceum130.ru',
'Proxy-Connection:keep-alive',
'Referer:http://eda.lyceum130.ru/about.asp?AL=Y',
'Upgrade-Insecure-Requests:1',
'User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36'
));
$result = curl_exec($ch);
curl_close($ch);
echo $result;
//step2
$url = 'http://eda.lyceum130.ru/asp/Curriculum/Assignments.asp';
// ссылка, по которой нам надо зайти
// задаём поля, которые будут отправлены при логине
$data="AT=285636493898963146306384&VER=895091817";
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch, CURLOPT_URL, $url);
//curl_setopt($ch, CURLOPT_POST, count($fields));
//curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_POST, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0',
'Accept: application/json, text/javascript, */*; q=0.01',
'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
'X-Requested-With: XMLHttpRequest'
));
//$result = curl_exec($ch);
//curl_close($ch);
echo $result;
@unlink($cookie_file);
NeverMine17 | 50.00 RUB |
directman | 60.00 RUB |
directman | 6.17 RUB |
Вы можете помочь в развитии проекта, сообщив об ошибках, поделившись своими идеями или проголосовав за уже добавленные. В случае добавления ошибок, обязательно указывайте детали окружения (ОС, версия ПО и т.п.), сообщения об ошибках без деталей будут игнорироваться.
Selenium | +1 |
По поводу входа | +1 |